Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 13, 2016, 5:46:18 PM (8 years ago)
Author:
bberabi
Message:

all the other unnessary spacerace files are deleted, oldracecheckpoint is deleted, there is already a racecheckpoint class, comments are added, everything seems okay

Location:
code/branches/SpaceRace_HS16
Files:
8 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/SpaceRace_HS16/data/levels/newnewnewspacerace.oxw

    r11328 r11337  
    77
    88<LevelInfo
    9  name = "New Old Space Race 2"
    10  description = "Under maintenance..."
     9 name = "The Space Race "
     10 description = "Fell The Blaze of The ONE and ONLY Space Race"
    1111 tags = "gametype"
    1212 screenshot = "spacerace.png"
     
    4444
    4545
    46   <!-- SOUNDS & MUSIC -->
     46  <!-- SOUNDS & MUSIC
     47
     48to hear the sound one has to use a headphones 
     49countdown at the beginning of the race
     50at the and of the countdown we have the sound "go"
     51racetheme will be played during the whole race-->
    4752 
    4853   
     
    8085    <SimpleNotification message="Reach the last check point within 150 seconds!!" />
    8186
    82 
    83     <!-- ------------------SpawnPoint----------------- -->
     87    <!-- ------------------SpawnPoint of the human player----------------- -->
     88    <!-- to change the starting positions of bots go to spacerace.cc star function -->
    8489    <SpawnPoint position="-50,0,0" lookat="1,0,0" spawnclass=SpaceShip pawndesign=fastship active="true" />
    8590
    86   <!-- Launch station -->
     91  <!-- Launch station of the aircrafts also starting place of the race-->
    8792  <StaticEntity mass="50" position="-400,-20,0" direction="0,-90,0" collisionType="static">
    8893    <attached>
     
    223228 <checkpoints>
    224229   
     230    <!-- distance = how far from the middle point of a check point do i have to fly ? distance variable answers this question   -->
     231
    225232
    226233    <RaceCheckPoint name="checkpoint1" yaw=90 pitch=90 position="1000,30,0" roll="0" direction="0,1,0" collisionType="static" scale="1" distance="60" checkpointindex="0" islast="false" nextcheckpoints="1,-1,-1">
     
    468475    </RaceCheckPoint>
    469476
     477<!-- the last checkpoint is bigger and red -->
    470478    <RaceCheckPoint name="checkpoint20" yaw=90 pitch=90 position="53000,0,0" direction="0,1,0" roll="0" collisionType="static" scale="1" distance="60" checkpointindex="19" islast="true">
    471479        <attached>
  • code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc

    r11334 r11337  
    2323 *     Mauro Salomon
    2424 *   Co-authors:
    25  *      Celine Egger
     25 *      Celine Egger*/
     26       
     27
     28
     29
     30/*
     31Edited, Renewed and Revised by
    2632        Berkay Berabi
    2733        Louis Meile
    28  *
    29  */
    30 
    31 /*
    32 Todo:
     34 
     35 
     36To-do- list by Louis Meile and Berkay Berabi for future projects :
    3337- improve AI (SpaceRaceController):
    3438i) so far bots arent able to evade obstacles. fix that!
    3539ii) bots should be able to use pickups
    36 - game crashes when bot wins the game
     40- game crashes when bot wins the game(this is a huge problem you should work with the log file to find out what the errors are )
    3741- bots rotate while waiting for the countdown to end. make it stop!
    3842- add elements to level file to make it even more fun to play. be creative!
     
    8185        this->setConfigValues();
    8286
    83         this->numberOfBots_ = 5; // quick fix: don't allow default-bots to enter the race
     87        this->numberOfBots_ = 5; // quick fix: don't allow default-bots to enter the race
     88        //we fixed the number of bots in order to have the same starting position all the time !
    8489    }
    8590
     
    9095    }
    9196
     97    void SpaceRace::start()
     98    {
    9299    // define spawn positions of the 5 bots
    93     void SpaceRace::start()
    94     {
    95100
    96101        int startpos[15];
     
    124129            this->spawnPlayersIfRequested();
    125130            this->cantMove_ = true;
    126             //bots unable to move while countdown is running
     131            //players are unable to move while countdown is running
    127132            for (Engine* engine : ObjectList<Engine>()){
    128133                engine->setActive(false);
     
    151156        ChatManager::message(message);
    152157
    153 //after 11 s, countdownFinished is called to activate bots` engines
     158//after 11 seconds , countdownFinished function is called to activate bots` engines
    154159Timer* countdownTimer = new Timer();
    155160        countdownTimer->setTimer(11, false, createExecutor(createFunctor(&SpaceRace::countdownFinished, this)));
     
    207212    }
    208213
    209  void SpaceRace::countdownFinished()
     214 void SpaceRace::countdownFinished()//activates the engines of all players
    210215    {
    211216
     
    231236
    232237
    233  void SpaceRace::addBots(unsigned int amount)
     238 void SpaceRace::addBots(unsigned int amount) //function that add the bots to the game
    234239    {
    235240        for (unsigned int i = 1; i <= amount; ++i){
     
    250255    }
    251256
    252     bool SpaceRace::allowPawnDeath(Pawn* victim, Pawn* originator)
     257    bool SpaceRace::allowPawnDeath(Pawn* victim, Pawn* originator)// false because the bots can not recognize the objects and die to early
     258                                                                    //if they can
    253259    {
    254260        return false;
Note: See TracChangeset for help on using the changeset viewer.