We’ve successfully built a full browser game from scratch and learned a lot of useful stuff about game design in general and JavaScript in particular.
Now what?
That really depends on what you hope to accomplish.
If You Want More JavaScript Practice
Defrag Cycle is a simple game that could be made infinitely better by the addition of a few key features. So if you want to make sure you really understood this Let’s Program why not grab one of these projects and implement it all on your own?
- Add a life system so that players can survive a couple enemy collisions before getting a game over.
- Add a double jump to help make sure the player can always make it over or under the next enemy. Remember that letting the player jump higher will also require modifying the code that decides what the max possible height and distance between new platforms is.
- Add in some collectible powerups that temporarily stop the clock, give the player bonus defrag points or makes them immune to enemies for a short time.
- If you’re feeling really ambitious give the player a laser gun so they can shoot down enemies.
If You Want To Make A Professional Quality Browser Game
Knowing how things work at a very basic level is important, but reinventing the wheel every time you want to program a new game is a real waste of time. It’s much more efficient to use existing game code for your engine. Ideally code that other people have already spent a lot of time debugging and testing for cross browser compatibility.
But where to find an existing JavaScript game engine?
You could always just Google “JavasScript game engine”, which is how I found this handy list.
Most of the engines and editing tools on that list are either free or offer free trials, so just grab a few and start messing around until you find one you like. Most of them also offer tools that let you create events and game behavior with a few button clicks instead of having to write actual JavaScript code, which is a real time saver. Just because we know how to do everything the hard way doesn’t mean we always want to do it that way.
So best of luck and be sure to email me a link to any cool games you create.