Here is a collection of games I've written, in reverse chronological order. None of the sources are obfuscated, so feel free to poke around and learn something. Though, do note, I'm not sure you should use the code as a base. I'm learning as I go.
The games are written in HTML/Javascript and use the canvas api. All were developed using vim and tested in Chrome. Some work in other browsers, mostly by accident.
4F
A feature-complete, but not polished, game of survival. In desperate need of balance work and further player direction (no one reads tutorials). On hold.
Delta
An idea I had one night that is maybe not good enough for a full treatment. You are a circle that grows or shrinks; when shrinking, bigger things kill you. When growing, smaller ones. The closer you are in size to something, the more points it is worth.
There isn't much progression, and there is only one enemy type. I may come back to this one, but for now I'm leaving it.
Sochi Opeядtions Simulдtoя 2014
A silly game made in one sitting.
It is kinda fun, though.
Save Yourself
My entry for Ludum Dare 28. An arena/bullet-hell shooter. If you die, you go back in time to the beginning and must prevent your past life from dying, by destroying the enemy that did the previous life in. There is little balance and progression, and plenty of opportunity for more features.
My first (published) game that uses WebGL, it was an excellent choice. I artificially inflate the difficulty via a few graphical effects that would not look as good without shaders. The graphics use normal maps and extreme lighting to create dynamic visuals.
Ninja Rock
This is a game on hold. Consider it an incomplete prototype. See my post for some more details. Heavily influenced by N, but with a ninja rope.
Platter
This one came about as I thought on Audiosurf. I played a ton of it, always on "monochrome" mode. Platter is kind of a distillation of that mode, plus a little Space Giraffe thrown into the mix. That is, actively preventing the player from perceiving the game. Unlike Space Giraffe, I don't give auditory cues to the player, so you should lose at some point through no fault of your own. Careful if you get motion sick!
The goal is to stay on the track, using s and d to get closer/farther from the center. At one point, it seemed a good idea to give the player two dots to care for. The second was at north, as opposed to east. It was, roughly, a disaster - there was no way to watch both at the same time, and there were no non-visual cues to help. So you just lost. Not so fun.
Bad Dudes v Bad Dude
My entry into Ludum Dare 25. I explain a bit about the game on my entry page. A quasi-TD entry, hampered a great deal by a sore elbow. I left about 6 hours on the table, plus sleeping normal hours.
The original goal was a humorous simulator of a Hollywood evil "mastermind" - throwing dudes at the hero, making stupid demands, and generally losing after some amount of time. It is, like all compo games, horribly balanced. The only features of note are the eulogy generation and the AI. Whenever a henchperson dies, the game pauses to state the name and a feature of the now-deceased person. Influenced very heavily by the "orphan count" in Alpha Protocol. Roughly, a way of faking empathy. Or humor.
The AI is also wonderfully simplistic - levels are constructed of pre-defined sections (half of a level). The format is in ASCII and features AI-influencing tiles that set the direction or trigger a jump. That's it. It works wonderfully, but it is probably possible to trap the hero on some levels.
Bikebike
I went to PAX-Dev and got all excited about making a simple, short game that had some hook and was fun to play. I put a hard limit on dev time (as the unfinished project just kept growing in scope and looked to never get finished) at the weekend after I got back.
You play with WASD and try not to hit anything. That is about it. I had planned a "fixie" mode where one had to pedal instead of simply holding W/S to accelerate/brake, but couldn't get it to feel right after 30 minutes so I killed it.
Consider it a pleasant distraction, but still not a game. Oh, the AI is beyond bad. Really, truly horrible. They also don't play by the rules.
Like all games, I had a lot more ideas than time. But I managed to call it finished much quicker than the rest. I guess that is improvement.
Shoot
Made over the course of a few weeks, this game is far from complete. However, I started with the goal of finishing a game in a week as a way of limiting myself. It seemed to have worked for my previous games. After a week, I had a bunch of systems and no real game, so I gave myself another week. After that week, I called what I had done and added a menu.
I spent far too long writing systems for this game that I never used. Scope creep was killer, considering I never wrote down any ideas. The game has a few features that are never really used:
- Concave polygon vs. circle collision detection. This is mostly used for rectangles, but I still have one enemy that is actually a polygon.
- Artifacts of a system for controlling areas of spaces. You can see this in the minimap - a red rectangle mask is applied to areas with fighter ships.
- Enemy fighters only come in one variety, and the graphics for them are horrendous. It is actually my debug display for the 'homing' AI.
- Flocking behavior was implemented at one point for fighters, but it really didn't look good.
On top of that, the game isn't really challenging until it is stupidly challenging. Enemies aim at your current location and don't do any leading; if you circle-strafe around enemies, they will just shoot where you used to be. Also, there is no notion of balance or difficulty curve. Those, it turns out, take as long as coding the game. The one thing that turned out well is the HTML-UI - much better than doing one using canvas.
In short, I spent a lot of time building systems, but not enough time building a game.
doggone
This was my second game-in-a-weekend game, this time for Ludum Dare 23. I explain a bit about the game on my entry page. In summary, I wasted the first night coding systems and not actually coding a game. Demotivation hit, and hit hard, when the weekend had unusually warm and nice weather. The completed game doesn't quite have a goal. I could have put a score in, but there is no difficulty progression.
Think of it more as a little relaxing diversion and some experiments in tech I hadn't used in my previous game: sound and animated images.
pigeon
My first finished game. A 48 hour gamejam gave me the kick I needed to call something done and publish it. This was done for MolyjamSF. You can see my entry page on the site, though there isn't much there. I went into the jam with knowledge of getting 60fps in a canvas element, drawing rectangles and lines to it, and handling keyboard input. I left with a fairly complete game.
The code I wrote for this is used frequently in my other games, with minor adjustments. Starting a trend, however, I spent far too long on systems and not enough time on gameplay. The collision system, in particular, was janky and over-featured for far too long. I cleaned it up after the jam and named it pidgine. It isn't generic enough to actually be used for games, but it is easy enough to hack on.