Creating a Simple Network Game

The plan for the this small tutorial is to do the following:

  • Create a simple scene where the player is initially represented by a tank (made of simple boxes) and is controlled using the arrow keys.
  • Add networking capabilities so that this scene can be played by (and shared amongst) several players over the same network.

This will be done step-by-step and all the networking aspects will be covered in details, so that you get a solid grasp of implementing a simple networked game; once you understand how to create such a game, you will be able to transfer these skills to a game of your choice.

Continue reading

Optimizing your code when using heap and stack

Memory Usage [Image from

We all do it!

Yet, this is a topic that rarely receives attention: memory allocation and performance; When our game has been created and that functionalities have been implemented, we would typically use a profiler to try to identify issues that may slow down our code; this being aid, many of the bottlenecks detected by the profiler, may be prevented by coding defensively and avoiding some common pitfalls; these are often linked to garbage collection, memory allocation, and speed of access; in this post, we will start to talk about the heap and the stack, explain what these terms mean, how and why data are stored in these, and how to optimize our code to use them wisely and efficiently. Continue reading

Creating Your Level from a text file


In this short tutorial, we will be looking at creating levels from a text file; this will involve;

  • Creating a text file accessible from a resources folder within your project
  • Reading this file line by line
  • Instantiating objects based on the value read in the file

This technique can be used to create multiple levels very easily. This will at least do two things for you: (1) it will make it possible to modify the structure of the level without having to modify the code, and (2) to create individual files for each level.

Continue reading

7 steps to find and design your next game idea

As you build-up your game development skills, you may often be on the look-out for your next game idea; often, this happens to be a difficult process; you may feel stuck first, wondering, how you will be able to find an idea that is both original and challenging for the players; so, in this post, I will cover a few principles that you can start to use to draft and start to design the key mechanics and goals for your game. Continue reading

5 simple tips to keep your players engaged

When you create a game, what you want is to get people to play it, but also keep them, playing until they have reached the end. You want to keep them engaged. Now, this can be achieved by implementing great game mechanics (see previous posts) and you need to increase their positive feelings (e.g., amusement, excitement, etc.) but also decrease their negative feelings (e.g., frustration). So today’s post will focus on the later: how to reduce player’s frustrations and make sure that¬† they enjoy (and keep playing) your game.

Continue reading

5 Simple Game Design Tips to Make your Game More Fun


When you start making games, and you have built-up reasonable skills to create what you’d like, it is always interesting to look at how you could improve the game play and make it more fun. Ideally, you’d do that initially in a brief design document, but it’s always possible to add small tweaks that really improve the game; these don’t need to be very complicated, but small changes can make a big difference. So these 5 simple tips should help.

Continue reading

Drag and Drop for UI Objects Part 2 (12-minute video)


In this short video we resume last week’s tutorial and learn how to drag and drop a UI object, using very simple code.

In this video you will learn to:

  • Use Event Triggers.
  • Track the mouse position.
  • Drag an object.
  • Drop an object.
  • Snap the object on to another object
  • use multiple placeholders
  • Check if an object was dragged and dropped on the right placeholder

Continue reading