Since a few months I have been working on creating a Boulder Dash type of game in Elm. I wanted the game to be played on a 12 by 12 pixel grid and there for the menu (and some of the levels are in a pixel style). But I also added images to make it more look-a-like to old Boulder Dash.
I really like reading game programming books (although I’m not a game programmer for my profession). And I tried to add lots of game programming tricks to this game. Like it has the “Actor/Component” system which allows you to configure “actors” and their behaviour in assets like json. It has a game loop which can skip “view ticks” if the logic falls behind. To make sure the game plays at the same speed even if you have a slower device. And I added “prime search” to add “semi random” behaviour to the game.
I recently added a small visual editor (not in elm) to allow others to create and play they own games.
Because of the whole asset configuration system you could define other type of behaviour. Which does not have a real editor but you can supply the json to the “advanced editor” screen.
Oke enough talk let’s show some links!
The code is here on github, where the readme does a bit better in explaining the story. And it also holds links to the demo, easy editor and advanced editor.
Awesome! I loved to play this game as a kid! I also did take a look at the code and it looks very clean and comprehensible. Great piece of code to learn from how to code in elm and how to name things! I’m not sure why this code is so readable … maybe because of elm as a language or because of the great naming of thing… or maybe both!
Thanks for you reply @ni-ko-o-kin,
I played this game as a kid a lot too!
I think Elm is mainly the cause of the code being so readable. (there are some bad parts to the code base which is mainly my fault lol). I like to see that I did learn a lot about Elm and the functional style while building this game. Which is visible if you compare some of the older files to the newer ones.