For background, I am a moderately experienced programmer (mostly Haskell), but this is my first serious foray into web development.
I’m looking to build a simple 2D game, but I don’t know which technologies and libraries to get started with - there seem to be a dizzying array of options, and I don’t understand all of the different trade-offs. Among my requirements are:
I’d like to work with an API which allows me to easily fit the game to the viewport (not quite sure if that’s the right terminology), and work with relative coordinates e.g. (0.5,0.5) to refer to the centre point, regardless of resolution. I want to guarantee that there’ll be no scrollbars.
I don’t care if it looks bad on displays which don’t have a roughly 16:9 aspect ratio.
Ideally, I’d like to create SVG assets through an external tool (I have a particular one in mind), and load them from files. Some (though actually not many) of these will need to be animated. I figure I should be able to control particular sub-components (again, not sure of the right terminology here) of the SVG, based on their 'id’s.
evancz/elm-playground locks down a lot of what you can do for the sake of simplicity. You won’t be able to play audio, save your game state, or make http requests (besides loading images). If that’s a deal breaker, I recommend using ianmackenzie/elm-geometry-svg instead (along with elm/svg and ianmackenzie/elm-geometry as you’ll need these when working with elm-geometry-svg).
You can get your (0.5, 0.5) relative coordinates by setting the viewBox property in your top level svg tag.
elm-collage definitely seems cool. It’s even based on the Haskell diagrams library which is what I had been planning to use to build SVG. elm-animator also looks like it’ll be worth looking in to.