A couple of months ago, I decided to have a play with onAnimationFrameDelta
and ended up seeing if I could build a ‘clone’ of the old retro Space Invaders game.
After hacking together a single player, single life version over the course of a week, it became a bit of a labour of love. Having never built a game before, I thoroughly enjoyed refactoring and improving the gameplay to get it to where it is today. There’s still more that can be done, but it’s at a point I’m more than happy with and ready to move on to another game.
The repo is here and the game is online here. I’d love to know what you think.
While working on the game, a couple of potential packages evolved. Again, I’d love to know what people think of these, or whether I’m flogging a dead horse.
1. A Games Package
The Shared
folder in the repo contains what I think might be a useful package to help people with game development. It deals with things like hit testing between two objects, storing game state between player turns, moving game assets around and so forth.
2. ResponsiveUI
Next to Main.elm
is ResponsiveUI.elm
, with its companion files in the ResponsiveUI
folder. It provides a common way to do ‘responsive’. There is more that can be done with this to flesh it out, it works as intended for the screens in the game, but I would be interested to know whether you think the road I’m heading down is sensible or just plain dumb.
Docs
I have pretty much written up docs for all the files, and they can be viewed with elm-doc-preview.
Thanks to anyone that takes the time to have a look, hope you enjoy it.