May Progress Update

Edit: Didn’t quite manage to finish everything today, so release will be tomorrow (Friday), or on Monday at the latest.

The game mechanics, API and graphics for CodingGame are starting to look decent, and I am now ramping up for an alpha release on June 11. Until then, I will be tying up various loose ends and complete the following remaining tasks:

  • Replays: I want to add functionality for automatically saving all the commands issued to the game units to a file. These can then be replayed later to perfectly recreate the game. Among other uses, this will be invaluable for bug reports.
  • Community: I want to set up one or more mechanisms to allow for submission of bug reports, discussion of the game mechanics, sharing of replays etc. I am thinking something like a google group, but I’ll have to do some research to see whether there aren’t any better options. If you have any suggestion, let me know.
  • Documentation: There probably should be at least some description of the game mechanics and API.

What happens after the release depends a bit on how many people actually try out the alpha version, but the basic idea is to go through several iterations of receiving feedback and improving the gameplay. In parallel to that, I will be able to start work on setting up a website with tutorials and documentation and implementing multiplayer.


The graphic design for CodingGame

In this post, I will go into some more detail about the graphics in CodingGame.

In my opinion, the main purpose of the graphics is to make it as easy as possible to see what’s going on in the game. I want the graphics to be a one-to-one reflection of the game state. All game objects and their attributes have a graphical representation and all world state transitions are highlighted by an animation. The amount of graphical elements that do not serve a function in the game and convey no useful information is minimized.

At least in principle, this should make it possible to get a feel for the game and even infer all of the game mechanics just from watching the game, making it unnecessary to consult pages and pages of documentation. It should also make the game more fun to watch for people who don’t already have intricate knowledge of the game mechanics.

In accordance with this goal, I am using an abstract/minimalist design where all the game objects are composed from simple geometric shapes. This also allows me to generate all of the graphics programatically, which plays to my strengths and gives a lot of flexibility. In terms of the art style, I am aiming for a sci-fi/space theme that features mostly dark colors with a few very bright elements.

Anyway, I promised screenshots, so let’s get to it!
The game units come in different sizes, their body is simply represented by a regular polygon:


These are then filled with all the modules equipped by the unit.

Here are all current module graphics (all inside a size 1 unit):



Shield generator


Empty storage


Storage with mineral crystal


Storage with energy globes






A larger unit with several modules:


Some additional objects:

Mineral crystals


Laser missiles


A screenshot with a larger scene (very large image, click through for zoom):


In other news, the collision detection and physics for CodingGame is now really solid, and I have made a lot of progress on integrating all the components and implementing the game mechanics and API. I can’t promise anything for sure, but if things keep going smoothly I should be able to release an alpha version in about a month. Before then, I plan to write another blogpost to describe my ideas for the game mechanics in some more detail.

CodingGame – An idea for a real time strategy game for programmers

I am currently working on a real time strategy coding game where players develop an artificial intelligence (AI) and can compete against the AIs written by other programmers. It is intended on one hand for beginner/intermediate level programmers who already know most of the basics and are looking for a fun and engaging way to gain further practice, but also for anyone else who enjoys coding and is interested in gaming or AI. There are a lot of great programming games out there already, but I haven’t found one which quite does everything I want. Specifically, I have the following goals:

  1. Easy to get started with: Writing a simple but fully functioning AI should require only basic programming skills and a few dozen lines of code.
  2. Stimulate creativity: Rather presenting the player with restrictive goals that allow only very specific solutions, there should be many different ways to improve your AI and advance to the next level. It should also be possible to make a lot of progress without the application of deep mathematics or complicated algorithms.
  3. Strategic depth: While I want the game rules to be relatively simple, they should still allow for varied and complex strategies that make the game itself appealing and interesting in the long term.

The game will feature game mechanics similar to RTS games such as StarCraft. The players spawn in a 2D world with some initial amount of resources, which can be used to construct new units. Those units may collect additional resources, fight your opponent or perform some other supporting function. Each unit will be composed of several modules. Each module will equip the unit with some specific attribute or skill. The initial design will include modules for firing projectiles, transporting resources, building new units, boosting unit speed and absorbing enemy projectiles. This will still change as I test out different ideas and get feedback from users. The main goal is to find minimal set of modules that gives a simple API and still allows for many meaningfully different units and rich strategies.

The players will interact with the game by writing a program that uses a high level API. All in game units can be controlled by giving them commands such as moving to a certain position, firing weapons at a target, harvesting a resource etc. The game will execute all the commands and then send messages on all events that occurred during that timestep (i.e. some object enters the sight radius, a unit is hit/dies). My implementation uses Scala, so the API will initially be for Scala/Java only, but I want it to be possible to write wrappers for other languages as well.

The game will include a succession of levels, each of which features an increasingly sophisticated AI as an opponent. I am also planning to have a multiplayer mode, where you can compete against the AIs of any other players. The players will run their AIs locally without modification, but the commands will automatically be sent to a server which maintains the world state and sends events back to the players.

So far I have been working mainly on the game graphics, which are based on OpenGL. That part is already largely finished, and will be presented in my next post. Expect to see a large number of screenshots!