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!

Advertisements

17 thoughts on “CodingGame – An idea for a real time strategy game for programmers”

    1. Yeah, Battlecode is pretty awesome!
      It is quite similar to what I want to do, probably more so than any other existing programming game.
      I think one of the main differences to CodingGame is that I want to focus less on competitions and also make it accessible to beginner programmers.

      Like

  1. You might see my comment on HN, please mock this up with a pen and paper first, then make this blog a photojournal of the process until the mechanics have been fixed. For inspiration, look at the articles on Penny Arcade about the development of the Thornwatch game to see how one person went through their game design process.

    You be the server and pay some friends in drinks and pizza to play test it.

    Like

    1. I think this is a very good suggestion, but I am not entirely sure how apply this in my case.
      This seems to work best for games that are discrete and have a small state space.
      What I am aiming for is more continuous and will have dozens of units moving around in real time.
      And the game mechanics itself are not necessarily that original, they basically just combine common elements from popular RTS games.
      I am planning for a lot of additional testing, but I feel like the next step is to actually write the code and iterate based on an actual implementation.

      Like

      1. I would just expect the code you need to write being very closely coupled to the results of the first few play tests. So I’d worry about writing almost any code that isn’t pretty quickly thrown out the window.

        Mocking up even dozens of Custom-AI agents rolling around in Real Time is going to be vastly quicker than making the server-client infrastructure even minimally functional.

        Trust, bruv; I’ve been there. 😉

        Like

      2. Oh, absolutely. I have no intention of implementing multiplayer or anything fancy like that until I have a better handle on what the game mechanics will look like. At the moment I am working only on the fundamental parts that will be needed regardless (graphics engine, collision detection), and an underlying framework for the game mechanics that will allow me to try out different ideas.

        Like

  2. I really like your proposal.
    But i don’t think that completly segregating your game public to developers only will lead you to success.

    I think you should think in how to make your game also likable to casual RTS players (not-programers). You should take a look in Natural Selection (is like a HalfLife MOD) that allows a player to play as the commander, in RTS mode, and the others in FPS mode.
    This way you can have an approach for both types of players.

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s