Colobot

Colobot (Colonize with Bots) is an educational real-time strategy video game featuring 3D graphics. The objective of the game is to find a planet for colonization by the human race by establishing basic an infrastructure on the surface and eliminating any alien life forms endangering the expedition. The game takes place on the Earth, Moon, and 7 fictional planets. The main feature of the game which makes it educative is the ability of the player to program his robots using a programming language similar to C++ or Java.

The game has been recommended by the Polish Ministry of National Education as a teaching aid in learning of basic algorithms and object-oriented programming.

Plot overview
Life on earth is threatened by a devastating cataclysm. Mankind has to move out and search for a new home. A first expedition of only robots was sent to find another habitable planet. For reasons yet unknown, the mission was a disaster and was never to return.

With only a few robots for companions, the player must travel to planets unknown. Houston, Earth Mission Control as well as a spy satellite will transmit valuable information to the player. The player needs to build the infrastructure necessary to gather raw materials and energy supplies. You'll need to produce the weapons necessary to defend yourself. By programming your robots, you can delegate certain tasks to them, allowing you to continue your mission while your robots upkeep the base, fight off enemies, and harvest materials.

Language overview
The programming language used in Colobot is C-BOT, syntactically similar to Java. Example code for a bot to find a piece of titanium ore and deliver it to a purification facility: