When I first started writing Monstro I had a very clean vision of how the underlying codebase is going to look like. Written in AS3, built on top of Starling and my own framework dubbed Retrocamel. And there is a lot of code there. What you can see to the left is 233 .as files and it does not include Starling and Retrocamel. All of the source files of the project total to about 1.5k!
Now the new, HTML5 Monstro is a different beast. I did a short research before I started working on it and I've decided on the following technologies:
- Typescript - My first major decision was to write the game in Typescript for three main reasons. One: I love compilation-time type checking. Two: AS3 supports typed variables and that makes the porting easier. Three: At least for me, typed variables seriously speed up development time and at least in IntelliJ typescript has superior intellisense.
- Phaser - This game development framework built on top of PIXI perfectly works with the old code and is non-intrusive enough to not hinder my coding practices at all. I really like the Plugins functionality and I am certainly going to release parts of the source code as modules for others to use. I've been doing some augments to the code on my own and I am seriously thinking about forking the projects and spewing pull requests.
- NW (node-webkit) - As I want to make my game work on as many systems as it is possible I've decided to go with NW. I've got some experience in node under my belt and I think it will work flawlessly for the desktop versions of the game and I am still investigating other venues for mobile devices. Suffice to say the game is going to work in all major browsers on all platforms supporting WEBGL.
- Grunt - Seriously, I've worked with Ant, Groovy and Grunt so far and Grunt trumps all of the others. Trumps them so hard it hurts, even though I feel the initial learning curve was kinda spiky for me because I had a problem grasping the basics of how Grunt works, it just wouldn't click.
Above that I am using a good number of Grunt plugins. I am going to talk about all of it in more detail in the future posts.
Also a side note - I've realized file downloads and SWFs are currently not working. I am planning to resolve this issue in the next few days.