= PPS Coding tutorial = == Summary and goals == In this tutorial, you will * Download the source code and setup a programming environment on your tardis box * Compile the code into a working version of the game * Add an in-game object to the game and configure it Since Orxonox is quite a large project, several steps are required to achieve the above. == Preparations == '''We check out the source and data repository and build for the first time''' The ISG created a special directory for you to store Orxonox in. It is in your home directory and is called {{{ -extra-0 }}} Put all your orxonox-related files there. This tutorial will do so as well. 0. Open a Terminal. {{{ Applications > Accessories > Terminal }}} 0. Go to your extra-home folder: {{{ cd ~/-extra-0 }}} (or create a folder for yourself on the local harddrive if the extra-home folder does not yet exist) {{{ mkdir /scratch/ && cd /scratch/ }}} 1. Create your orxonox directory (if not already existing): {{{ mkdir orxonox && cd orxonox }}} 2. Now check out the latest revision of the data repository (you will probably be asked for a username and password once): {{{ svn co http://svn.orxonox.net/game/data/trunk data_extern }}} 4.1 Open a new terminal tab, to work in parallel. {{{ Press Control + Shift + T. }}} 4.2 Now get the latest revision of the tutorial: {{{ svn co http://svn.orxonox.net/game/code/branches/tutorial6 tutorial }}} 4.3 Wait for both branches to check out completely. 4.4 While you wait, download and unzip additional dependencies: {{{ wget http://svn.orxonox.net/downloads/tardisDependencies.zip unzip tardisDependencies.zip rm tardisDependencies.zip }}} 4. Prepare to build: {{{ mkdir build && cd build cmake -G"Eclipse CDT4 - Unix Makefiles" -DECLIPSE_CDT4_GENERATE_SOURCE_PROJECT=TRUE ../tutorial }}} 5. Now build for the first time (may take some time, further builds will be faster): {{{ make -j4 }}} The ''-j4'' means to create 4 parallel compile processes. 6. Additionally you can use [wiki:EclipseIDE Eclipse] as IDE to develop (if you don't want to use the console ;)). You can also use [wiki:KDevelop3] as IDE, though the assistants can help you more with Eclipse. '''Start the game for the first time''' 7. Enter to the appropriate folder and start the game. You will see a menu popping up, just press the ''Quickstart'' button. {{{ cd ~/-extra-0/orxonox/build ./run }}}