Typing On Keyboard

Coding Your First Game? Follow These Tips

So you’re ready to cross the line from just playing games into coding your own games. If you’re interested in coding your first HTML5 game, you might have even already read our guide to web game development. Before you write that first line of code, though, let me give you a few quick tips:

Keep It Simple

The most important thing to do when designing your very first game is to keep it simple. It can be tempting to make an all-encompassing GTA knockoff with driving and shooting mechanics as well as minigames, but that can be extremely overwhelming. Instead, try to think of an extremely simple game you can fully code in a few days to get a completed project under your belt.

Some good ideas for your very first game are:

  • A breakout clone
  • A dealer clone
  • A one-screen 2D platformer (think the original Mario Bros before they got Super)
  • A shoot-em-up or bullet hell-type game
  • A simple racing game

These are good ideas because they are mechanically simple, so you really only have to code a few basic game mechanics. They can also be made very short. In other words, with a simple game like this you can code a start screen, the main game, instructions, win and loss conditions, and a restart mechanism. In other words, you can code a fully-working game instead of coding part of a much more complex game and potentially being overwhelmed.

Type Things Out, Don’t Copy And Paste

When coding your first game, your process will probably look something like this:

  1. Code the basic framework using your foundational knowledge of the language
  2. Run into an issue with your code (or a gap in your knowledge)
  3. Look for answers online
  4. Implement the solution
  5. Repeat steps 1-4

There’s absolutely nothing wrong with this process, and it might even be the best way to advance from the initial stages of learning. However, I suggest that when you find the solution you need, you manually type it into your code instead of copying it and pasting it directly from the web. This will help you better understand what the code’s actually doing and solidify your new knowledge.

Just to clarify: If you have a chunk of code you wrote yourself that needs to be repeated often with slight modifications, go ahead and copy and paste it. I just mean that you shouldn’t copy and paste solutions you find on the web. Instead, you should type those into your code yourself to absorb them more fully.

Just Finish The Game

This seems obvious, but just focus on finishing the game. Don’t worry about polishing the graphics, don’t worry about whether or not your code is too messy or unoptimized, and don’t worry about whether or not it’s fun. The important thing is to finish the game to show yourself that you can do it. Then, once you finish your first game, you can move on to your second game and get just a little bit more ambitious (just don’t overdo it).

At the end of the day, once you’ve coded your first game, you can officially think of yourself as a game developer. That’s why you want to make sure to keep it simple so that you can finish relatively quickly. Good luck and happy coding!


My Dpad

Leave a Comment

Your email address will not be published. Required fields are marked *