For the last year or so, I’ve been toying with video game related technologies in my free time. Most of my last pet projects have been some puny attempts to develop a video game. I haven’t released anything complete yet, but I think I have walked a long road since my first tests.
To develop a video game has not a lot to do with web development. There is a lot of concepts that are radically different. The game loop, the collision detection and all the involved algebra, the stages, all the required crazy optimizations… A lot of things very foreign to me. Not only that, but also, most of the popular frameworks don’t use any familiar pattern for me, and the separation of concerns is not so clearly enforced as it does in the web frameworks. So: A whole different world to explore.
My first attempt was humble: A small game about knights trying to unmount others in a very destruction-derby-like competition.
I used the same micro-framework @rezoner used on his tutorial. Looking back, had I used any other not-so-low-level framework, it would probably have been a much gentle beginning for me. But even if I made it much harder for myself, doing so much stuff manually I managed to learn a lot about how everything worked internally.
The art is awful (I didn’t pay a lot of attention to it, to be honest), but looking at the game today, the result is surprisingly ok. I still fancy how I achieved to add the auto-zoom feature and how fine it works. Oh, and as of today, it’s still the only game I have added any sound effect to. You can take a look at it here: http://johnhackworth.github.io/joust . Every time you begin a new game, you get a random weapon (well, a random weapon choosing between sword and lance), and if you get a sword, I recommend you to restart, because… ahem, swords are a little buggy).
My second game was GateDown, As in “The enemy gate is down”. The idea was to make a 2D space combat game, very focused on squadrons and gravity-related play mechanics. After J*ust, I decided to test a real full-sized framework, and after evaluating several html5 game libraries & fw, I ended choosing http://craftyjs.com/, since I thought it was the one that looked more well rounded and at the same time easy enough to learn quickly. And indeed it was! Crafty is a marvelous piece of software, if you are looking to build a small and simple html5 game. Small is the keyword here: Since it uses canvas to render the game, the amount of things happening on the game screen at the same time it allows is a little limited. And what I had in mind was a grand-battle type of game, with hundreds of ships fighting on each side, 15-ship squadron formations moving as one, crashing into enemy files. With huge capital ships being hunted by dozens of small fighters. You know the drill. And well… soon enough begin to be quite obvious that canvas was going to be a party-pooper here. When I put more that 20 ships on screen at the same time, my computer temperature went over the roof and the performance fell to the bottom of the ocean. Yeah, the performance of a 2D, looking like shit, game. So all my planned grandeur, all the epic scale I projected, had to be rethought. More than a big-battle game, I ended doing a small-skirmishes one. But hey, it’s fun anyway! You can play it here http://johnhackworth.github.io/gatedown/. There are four different types of missions and I never ended developing a proper menu… so restart to get a new random one!
I ended stopping the development of gatedown because I wanted to find a designer interested in the game to do all the visual part and I didn’t find any, and because the small amount of elements at the same time on screen was a little limiting for what I have planned originally. And also, of course, because I had another idea that I wanted to explore:
The company where I was working at the time was having some bad time related with people management. Lots of people leaving because of some ugly management decisions, lots of new candidates interviews and lots of team design discussions … you know how it works. And well… I thought I could make a game of that situation. The idea was to take something like Football Manager and change the sports settings for a tech company one. You need to hire a team, keep it happy, prioritize a project, look for funding, etc.
Since this wasn’t going to have any fancy animations or visuals, I kept using crafty. Even like that, it ended looking better than joust or gatedown. I made a random face generator and a perks system that worked pretty good, and I end up using them in my next projects.
Oh, and this time I even did a proper start screen!
Finally, I abandoned the project because, to be honest, to make it good enough and fun was too much work. Management games look simple from outside, but to manage to make an interesting game, the internal complexity involved is too gigantic for a free-time pet project. Also, the basic architecture of the game wasn’t so good, and it was beginning to be a pain to keep adding functionality as complexity grown. So the next thing to do was to do a big refactor … And I wanted to do something using webGL, at last. Anyway, I still think that the idea is pretty good, and that the game could be fun for weird people like me who enjoy management games, so maybe I will restart the project from scratch on the future.
Of course, you can test it here: http://johnhackworth.github.io/starttroopers
(continue in part 2)