Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 1 month 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)

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
}

```