Changeset 11337
- Timestamp:
- Dec 13, 2016, 5:46:18 PM (8 years ago)
- Location:
- code/branches/SpaceRace_HS16
- Files:
-
- 8 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/SpaceRace_HS16/data/levels/newnewnewspacerace.oxw
r11328 r11337 7 7 8 8 <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" 11 11 tags = "gametype" 12 12 screenshot = "spacerace.png" … … 44 44 45 45 46 <!-- SOUNDS & MUSIC --> 46 <!-- SOUNDS & MUSIC 47 48 to hear the sound one has to use a headphones 49 countdown at the beginning of the race 50 at the and of the countdown we have the sound "go" 51 racetheme will be played during the whole race--> 47 52 48 53 … … 80 85 <SimpleNotification message="Reach the last check point within 150 seconds!!" /> 81 86 82 83 <!-- ------------------SpawnPoint------------------->87 <!-- ------------------SpawnPoint of the human player----------------- --> 88 <!-- to change the starting positions of bots go to spacerace.cc star function --> 84 89 <SpawnPoint position="-50,0,0" lookat="1,0,0" spawnclass=SpaceShip pawndesign=fastship active="true" /> 85 90 86 <!-- Launch station -->91 <!-- Launch station of the aircrafts also starting place of the race--> 87 92 <StaticEntity mass="50" position="-400,-20,0" direction="0,-90,0" collisionType="static"> 88 93 <attached> … … 223 228 <checkpoints> 224 229 230 <!-- distance = how far from the middle point of a check point do i have to fly ? distance variable answers this question --> 231 225 232 226 233 <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"> … … 468 475 </RaceCheckPoint> 469 476 477 <!-- the last checkpoint is bigger and red --> 470 478 <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"> 471 479 <attached> -
code/branches/SpaceRace_HS16/src/modules/gametypes/SpaceRace.cc
r11334 r11337 23 23 * Mauro Salomon 24 24 * Co-authors: 25 * Celine Egger 25 * Celine Egger*/ 26 27 28 29 30 /* 31 Edited, Renewed and Revised by 26 32 Berkay Berabi 27 33 Louis Meile 28 * 29 */ 30 31 /* 32 Todo: 34 35 36 To-do- list by Louis Meile and Berkay Berabi for future projects : 33 37 - improve AI (SpaceRaceController): 34 38 i) so far bots arent able to evade obstacles. fix that! 35 39 ii) 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 ) 37 41 - bots rotate while waiting for the countdown to end. make it stop! 38 42 - add elements to level file to make it even more fun to play. be creative! … … 81 85 this->setConfigValues(); 82 86 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 ! 84 89 } 85 90 … … 90 95 } 91 96 97 void SpaceRace::start() 98 { 92 99 // define spawn positions of the 5 bots 93 void SpaceRace::start()94 {95 100 96 101 int startpos[15]; … … 124 129 this->spawnPlayersIfRequested(); 125 130 this->cantMove_ = true; 126 // botsunable to move while countdown is running131 //players are unable to move while countdown is running 127 132 for (Engine* engine : ObjectList<Engine>()){ 128 133 engine->setActive(false); … … 151 156 ChatManager::message(message); 152 157 153 //after 11 s , countdownFinishedis called to activate bots` engines158 //after 11 seconds , countdownFinished function is called to activate bots` engines 154 159 Timer* countdownTimer = new Timer(); 155 160 countdownTimer->setTimer(11, false, createExecutor(createFunctor(&SpaceRace::countdownFinished, this))); … … 207 212 } 208 213 209 void SpaceRace::countdownFinished() 214 void SpaceRace::countdownFinished()//activates the engines of all players 210 215 { 211 216 … … 231 236 232 237 233 void SpaceRace::addBots(unsigned int amount) 238 void SpaceRace::addBots(unsigned int amount) //function that add the bots to the game 234 239 { 235 240 for (unsigned int i = 1; i <= amount; ++i){ … … 250 255 } 251 256 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 253 259 { 254 260 return false;
Note: See TracChangeset
for help on using the changeset viewer.