Colobot
Encyclopedia
Colobot is an education
Education
Education in its broadest, general sense is the means through which the aims and habits of a group of people lives on from one generation to the next. Generally, it occurs through any experience that has a formative effect on the way one thinks, feels, or acts...

al real-time strategy
Real-time strategy
Real-time strategy is a sub-genre of strategy video game which does not progress incrementally in turns. Brett Sperry is credited with coining the term to market Dune II....

 video game featuring 3D graphics
3D computer graphics
3D computer graphics are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images...

. The objective of the game is to find a planet
Planet
A planet is a celestial body orbiting a star or stellar remnant that is massive enough to be rounded by its own gravity, is not massive enough to cause thermonuclear fusion, and has cleared its neighbouring region of planetesimals.The term planet is ancient, with ties to history, science,...

 for colonization
Colonisation
Colonization occurs whenever any one or more species populate an area. The term, which is derived from the Latin colere, "to inhabit, cultivate, frequent, practice, tend, guard, respect", originally related to humans. However, 19th century biogeographers dominated the term to describe the...

 by the human race by establishing basic a infrastructure on the surface and eliminating any alien life forms
Organism
In biology, an organism is any contiguous living system . In at least some form, all organisms are capable of response to stimuli, reproduction, growth and development, and maintenance of homoeostasis as a stable whole.An organism may either be unicellular or, as in the case of humans, comprise...

 endangering the expedition. The game takes place on the Earth, Moon, and 7 fictional planets. The main feature of the game which makes it educational is the ability of the player to program his robots using a programming language
Programming language
A programming language is an artificial language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs that control the behavior of a machine and/or to express algorithms precisely....

 similar to C++
C++
C++ is a statically typed, free-form, multi-paradigm, compiled, general-purpose programming language. It is regarded as an intermediate-level language, as it comprises a combination of both high-level and low-level language features. It was developed by Bjarne Stroustrup starting in 1979 at Bell...

 or Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

.

The game has been recommended by the Polish Ministry of National Education
Ministry of National Education of the Republic of Poland
Ministry of National Education of Poland was created in 2006. The ministry prerogatives do not include higher education, which falls under Ministry of Science and Higher Education ....

 as a teaching aid in learning of basic algorithm
Algorithm
In mathematics and computer science, an algorithm is an effective method expressed as a finite list of well-defined instructions for calculating a function. Algorithms are used for calculation, data processing, and automated reasoning...

s and object-oriented programming
Object-oriented programming
Object-oriented programming is a programming paradigm using "objects" – data structures consisting of data fields and methods together with their interactions – to design applications and computer programs. Programming techniques may include features such as data abstraction,...

.

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 robot
Robot
A robot is a mechanical or virtual intelligent agent that can perform tasks automatically or with guidance, typically by remote control. In practice a robot is usually an electro-mechanical machine that is guided by computer and electronic programming. Robots can be autonomous, semi-autonomous or...

s for companions, the player must travel to planets unknown. Houston
Lyndon B. Johnson Space Center
The Lyndon B. Johnson Space Center is the National Aeronautics and Space Administration's center for human spaceflight training, research and flight control. The center consists of a complex of 100 buildings constructed on 1,620 acres in Houston, Texas, USA...

, Earth Mission Control as well as a spy satellite
Spy satellite
A spy satellite is an Earth observation satellite or communications satellite deployed for military or intelligence applications....

 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
Syntax
In linguistics, syntax is the study of the principles and rules for constructing phrases and sentences in natural languages....

 similar to Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

. Example code for a bot to find a piece of titanium
Titanium
Titanium is a chemical element with the symbol Ti and atomic number 22. It has a low density and is a strong, lustrous, corrosion-resistant transition metal with a silver color....

 ore
Ore
An ore is a type of rock that contains minerals with important elements including metals. The ores are extracted through mining; these are then refined to extract the valuable element....

and deliver it to a purification facility:


extern void object::FetchTitanium
{
object item; // declare variable

item = radar(TitaniumOre); // find a piece of titanium ore
goto(item.position); // go to the ore
grab; // pick up whatever is in front of the robot (presumably the ore)

item = radar(Converter); // find the ore converter
goto(item.position); // relocate to the converter
drop; // drop the piece of ore
move(-2.5); // back up 2.5 meters to allow the converter to start processing the ore
}

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK