https://github.com/viir/simplegamedev
Work around problem with Elm publish: copy package to dedicated repository. (https://discourse.elm-lang.org/t/how-to-fix-elm-publish-not-tagged-on-github-error/3625)
https://github.com/viir/simplegamedev
elm-publish
Last synced: 25 days ago
JSON representation
Work around problem with Elm publish: copy package to dedicated repository. (https://discourse.elm-lang.org/t/how-to-fix-elm-publish-not-tagged-on-github-error/3625)
- Host: GitHub
- URL: https://github.com/viir/simplegamedev
- Owner: Viir
- License: mit
- Created: 2019-05-10T19:11:44.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-05-22T11:44:42.000Z (about 5 years ago)
- Last Synced: 2025-03-07T17:05:02.881Z (over 1 year ago)
- Topics: elm-publish
- Language: Elm
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
This repository is obsolete since publishing to packages is not anymore necessary to use modules in an online editor.
[Elm Editor](https://elm-editor.com) now supports using modules without publishing them as a package.
This package supports the simple development of video games in [Ellie](https://github.com/ellie-app/ellie/issues/94#issuecomment-487252060).
The functions contained in this package make it easier to create a browser app and provide implementations for commonly used generic functionality.
The `composeSimpleGame` function provides a way to create a complete browser application without having to learn about subscriptions or how to combine the different kinds of updates into a single update function.
The following code example shows how it is used to compose a game app:
```elm
game : SimpleGame GameState ()
game =
composeSimpleGame
{ updateIntervalInMilliseconds = 125
, updatePerInterval = updatePerInterval
, updateOnKeyDown = updateOnKeyDown
, updateOnKeyUp = updateOnKeyUp
, renderToHtml = renderToHtml
, initialState = initialGameState
, updateForEventFromHtml = updateForEventFromHtml
}
```