Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changes between Version 5 and Version 6 of pps/tutorial_basic


Ignore:
Timestamp:
Sep 30, 2008, 3:56:58 PM (16 years ago)
Author:
rgrieder
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • pps/tutorial_basic

    v5 v6  
    4040
    4141== TutorialShip Class ==
    42 We have derived a new type of SpaceShip for you: TutorialShip. The back end doesn't have to bother you (you will notice that some functions don't seem to be doing anything at all). [[br]]
    43 At the moment, you are using the SpaceShip class. We would like to change this. Fortunately this can be done in an XML file where we load the level.
     42We have derived a new type of !SpaceShip for you: !TutorialShip. The back end doesn't have to bother you (you will notice that some functions don't seem to be doing anything at all). [[br]]
     43At the moment, you are using the !SpaceShip class. We would like to change this. Fortunately this can be done in an XML file where we load the level.
    4444 1. Go to your media repository (orxonox/Media) and open ''tutorial.oxw'' in the ''level'' folder with a text editor like vim, nano, etc.
    45  1. Find the second paragraph (about 5th line) and change ''SpaceShip'' to ''TutorialShip''
     45 1. Find the second paragraph (about 5th line) and change ''!SpaceShip'' to ''!TutorialShip''
    4646 1. Save the file. You can keep it open, we need it again later.
    4747Next thing will be to change the code accordingly, since the game will probably crash now when started. [[br]]
    4848We organise our source files via CMake as you have already found out. You now have to tell CMake to also compile the ''TutorialShip'':
    4949 1. Open orxonox/trunk/src/orxonox/CMakeLists.txt
    50  1. You will see a large list of source files (*.cc). You can add "oxonox/TutorialShip.cc" anywhere you like, but it is preferred to organise the file a little bit. So look for SpaceShip.cc and add things there.
     50 1. You will see a large list of source files (*.cc). You can add "oxonox/TutorialShip.cc" anywhere you like, but it is preferred to organise the file a little bit. So look for !SpaceShip.cc and add things there.
    5151 1. Save and close.
    5252The interesting part: Modifying the C++ code. '''Open orxonox/trunk/src/orxonox/objects/TutorialShip.cc'''. As you have already heard from Fabian, the Core Framework is like a language extension to C++. But it cannot be 100% automatic. That means you have to add a few lines accordingly: