I have been working on Momo since April and am happy to announce that version 1.0 is finally here! Momo's source code and documentation is freely available on GitHub.
Works in all major browsers
Load and play audio samples
Real-time bitmap and color tinting
Draw text, bitmaps, and primitives
Accept keyboard and mouse inputs
Draw low-level polygons and polylines
Create buffers and off-screen canvases
To learn how to use Momo, please take a look at the reference manual on GitHub. While you are at it, be sure to also check out the games I have made using Momo.
I will post more about Momo in the near future. In the meantime, feel free to drop me a line in the comments if you have any thoughts or questions. Thanks!
Earlier this week I created a space-themed game called Verloren for a unique competition whereby each submission had to be no larger than 13 kilobytes in size. Despite having an entire month to work on the game, I threw it together in just two days.
Fitting all of the code and assets into a 13 kilobyte package was difficult, but the end result was a simple, but fun, game about avoiding enemies in space. You can play it here.
The competition kicked off on the 13th of August, but it was not until the 9th of September that the idea of creating a space-themed game came to me. I wanted the objective of the game to be about maneuvering a spaceship, firing projectiles, and avoiding enemies and asteroids. Due to size restraints, I had to cut asteroids in the middle of development, but enemies and projectiles survived.
At one point, enemies would fire projectiles toward the player, but due to a bug involving the speed of projectiles versus the velocity of enemies, I had to remove them. I instead changed the behavior of enemies to ram the player, and then ultimately decided upon having them carry out individual kamikaze attacks.
What Went Right
The graphics. Rather than load images from files, I opted to generate all of the graphics on the fly through the use of low-level calls to the graphics card. This resulted in simple graphics that did not impact the total file size, saving bytes for use elsewhere.
Creating a parallax scrolling effect on the stars. The star fields are generated in separate layers, with each having its own "resistance" to the camera. When moving at slower speeds, the result is a subtle sense of depth.
"Melting" the screen when engaging FTL. When the ship's FTL drive is repaired and is engaged, the canvas retains its contents between frames. This results in a sort of "melting" effect, which I think does nicely to convey traveling faster than light.
What Went Wrong
Stars do not generate indefinitely. The implementation of parallax scrolling in the stars really complicated things. While the stars do go on for a good distance, they eventually run out. I had devised a solution to ensure that stars would generate indefinitely, but I did not have enough kilobytes to spare.
The game is silent. When it was all said and done, I began working on sound effects, but by that point I had run out of bytes, so the game ended up being completely silent. I could excuse this as a pursuit for realism though, as there is no sound in space.
All things considered, I am happy with how Verloren turned out. I put the source code on GitHub for anyone who is interested, which can be found here. If you had fun playing my game, or found this post to be interesting, please let me know in the comments, and be sure to also take a look at the other 253 competition entries here.
Fixed several bugs
Added 5 new kittens to find
Tweaked the in-game clock to run out sooner
Added a "compass" which points to the nearest kitten
Added ramen noodle upgrades which increase Nini's attributes
Like with my other games and projects, Kitten Kerfuffle's source code and assets are open and freely available on GitHub. Viewing source code is a good way to learn code. ;)
What do you think about Kitten Kerfuffle? Let me know in the comments!