404 Tech Support

It’s Javascript vs Python in ‘Empire of Code’

Empire of Code is a web game currently in beta that mixes strategy, tactics, and coding. It plays like a turn-based strategy game with elements of upgrading and building up your resources.

You start out with a tutorial to familiarize yourself with the interface, gameplay, and options.

A little bit into the tutorial and you will have to choose your side. Are you fighting for Python or JavaScript? The language that you choose will be used for the code shown and code puzzles. You can play this game without knowing how to code (and learning as you go) but it will probably be pretty frustrating if you’re not familiar with basic syntax.

The tutorial will walk you through building an army, gathering resources, attacking your enemy, and so on. The “strategies” for your army to follow is shown as code. In addition to building and upgrading your base, you can improve your resources by completing challenges presented by your buildings. These are little coding puzzles where you are given a mission and a framework of code to get the desired results.

The above challenge was simply solved with an if-else statement and as a result the resource production is enhanced.

If you would like to take this game for a spin, you can check it out at EmpireOfCode.com