[Orxonox-commit 7226] r11840 - in code/branches/RacingBots_FS18: data/levels data/levels/templates src/libraries/tools src/modules/gametypes src/orxonox/items src/orxonox/worldentities/pawns

arismu at orxonox.net arismu at orxonox.net
Thu Mar 29 15:57:55 CEST 2018


Author: arismu
Date: 2018-03-29 15:57:54 +0200 (Thu, 29 Mar 2018)
New Revision: 11840

Modified:
   code/branches/RacingBots_FS18/data/levels/presentationHS12.oxw
   code/branches/RacingBots_FS18/data/levels/templates/spaceshipCollateralDamage.oxt
   code/branches/RacingBots_FS18/src/libraries/tools/Timer.cc
   code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc
   code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.h
   code/branches/RacingBots_FS18/src/orxonox/items/Engine.cc
   code/branches/RacingBots_FS18/src/orxonox/worldentities/pawns/SpaceShip.h
Log:
Changed velocity bots, steering stabilized

Modified: code/branches/RacingBots_FS18/data/levels/presentationHS12.oxw
===================================================================
--- code/branches/RacingBots_FS18/data/levels/presentationHS12.oxw	2018-03-29 13:37:15 UTC (rev 11839)
+++ code/branches/RacingBots_FS18/data/levels/presentationHS12.oxw	2018-03-29 13:57:54 UTC (rev 11840)
@@ -60,7 +60,7 @@
     ?>
 
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
-    <SpawnPoint team=0 position="-900,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+    <SpawnPoint team=0 position="-900,0,0" lookat="0,0,0" primaryThrust=1000 spawnclass=SpaceShip pawndesign=spaceshipescort />
     <!--SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=bigship /-->
     <!--SpawnPoint team=0 position="-900,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipcollateraldamage /-->
     <!--SpawnPoint team=0 position="6000,0,2000" lookat="1,1,0" spawnclass=SpaceShip pawndesign=spaceshipcollateraldamage /-->
@@ -327,10 +327,10 @@
         lookat              = "0,0,0"
         roll                = "180"
         name                = "collateralDamage"
-        radarname           = "Collateral Damage" >
-        <!--
+        radarname           = "Collateral Damage" 
         pitch               = "90"
-        yaw                 = "0"-->
+        yaw                 = "100"
+        primaryThrust       = "2000">
       <attached>
         <DockingTarget name="spaceShip" />
         <DistanceTriggerBeacon name="bcnDestroyer" />

Modified: code/branches/RacingBots_FS18/data/levels/templates/spaceshipCollateralDamage.oxt
===================================================================
--- code/branches/RacingBots_FS18/data/levels/templates/spaceshipCollateralDamage.oxt	2018-03-29 13:37:15 UTC (rev 11839)
+++ code/branches/RacingBots_FS18/data/levels/templates/spaceshipCollateralDamage.oxt	2018-03-29 13:57:54 UTC (rev 11840)
@@ -18,7 +18,7 @@
    shieldrechargerate  = 1
    shieldrechargewaittime = 1
 
-   primaryThrust     = 100
+   primaryThrust     = 1000
    auxilaryThrust    = 30
    rotationThrust    = 50
 
@@ -28,7 +28,7 @@
    boostPower            = 15
    boostPowerRate        = 1
    boostRate             = 5
-   boostCooldownDuration = 10
+   boostCooldownDuration = 1
 
    shakeFrequency = 15
    shakeAmplitude = 12
@@ -35,7 +35,7 @@
 
    collisionType     = "dynamic"
    mass              = 100
-   linearDamping     = 0.7
+   linearDamping     = 0.5
    angularDamping    = 0.9999999
   >
     <engines>

Modified: code/branches/RacingBots_FS18/src/libraries/tools/Timer.cc
===================================================================
--- code/branches/RacingBots_FS18/src/libraries/tools/Timer.cc	2018-03-29 13:37:15 UTC (rev 11839)
+++ code/branches/RacingBots_FS18/src/libraries/tools/Timer.cc	2018-03-29 13:57:54 UTC (rev 11840)
@@ -199,6 +199,15 @@
         executor->getFunctor()->setSafeMode(true);
     }
 
+    /*void Timer::setTimer(float interval, bool bKillAfterCall)
+    {
+         this->setInterval(interval);
+         this->bActive_ = true;
+         this->time_ = this->interval_;
+        this->bKillAfterCall_ = bKillAfterCall;
+    }
+    */
+
     /**
         @brief Calls the executor and destroys the timer if requested.
     */

Modified: code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc
===================================================================
--- code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc	2018-03-29 13:37:15 UTC (rev 11839)
+++ code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.cc	2018-03-29 13:57:54 UTC (rev 11840)
@@ -70,7 +70,6 @@
 #include "items/Engine.h"
 #include <vector>
 
-
 namespace orxonox
 {
     RegisterUnloadableClass(SpaceRace);
@@ -137,18 +136,21 @@
             c += 3;
         }
 
+
         std::string message("Use headphones to hear the countdown!");
         this->getGametypeInfo()->sendAnnounceMessage(message);
         ChatManager::message(message);
 
+
+
         //after 11 seconds , countdownFinished function is called to activate bots` engines
         Timer* countdownTimer = new Timer();
         countdownTimer->setTimer(11, false, createExecutor(createFunctor(&SpaceRace::countdownFinished, this)));
+        
     }
 
 
 
-
     void SpaceRace::end()
     {
         this->clock_.capture();

Modified: code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.h
===================================================================
--- code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.h	2018-03-29 13:37:15 UTC (rev 11839)
+++ code/branches/RacingBots_FS18/src/modules/gametypes/SpaceRace.h	2018-03-29 13:57:54 UTC (rev 11840)
@@ -59,6 +59,7 @@
             virtual void start() override;
             virtual void end() override;
             virtual void countdownFinished();
+            
             virtual void addBots(unsigned int amount) override; //<! overwrite function in order to bypass the addbots command.
 
 

Modified: code/branches/RacingBots_FS18/src/orxonox/items/Engine.cc
===================================================================
--- code/branches/RacingBots_FS18/src/orxonox/items/Engine.cc	2018-03-29 13:37:15 UTC (rev 11839)
+++ code/branches/RacingBots_FS18/src/orxonox/items/Engine.cc	2018-03-29 13:57:54 UTC (rev 11840)
@@ -53,7 +53,7 @@
         this->shipID_ = OBJECTID_UNKNOWN;
         this->relativePosition_ = Vector3::ZERO;
 
-        this->boostFactor_ = 1.5f;
+        this->boostFactor_ = 1.2f;
 
         this->maxSpeedFront_ = 0.0f;
         this->maxSpeedBack_ = 0.0f;
@@ -60,7 +60,7 @@
         this->maxSpeedLeftRight_ = 0.0f;
         this->maxSpeedUpDown_ = 0.0f;
 
-        this->accelerationFront_ = 0.0f;
+        this->accelerationFront_ = 1.0f;
         this->accelerationBrake_ = 0.0f;
         this->accelerationBack_ = 0.0f;
         this->accelerationLeftRight_ = 0.0f;
@@ -67,7 +67,7 @@
         this->accelerationUpDown_ = 0.0f;
 
         this->speedAdd_ = 0.0f;
-        this->speedMultiply_ = 1.0f;
+        this->speedMultiply_ = 1.8f;                       //////////////////////////////////////////
 
         this->setConfigValues();
         this->registerVariables();

Modified: code/branches/RacingBots_FS18/src/orxonox/worldentities/pawns/SpaceShip.h
===================================================================
--- code/branches/RacingBots_FS18/src/orxonox/worldentities/pawns/SpaceShip.h	2018-03-29 13:37:15 UTC (rev 11839)
+++ code/branches/RacingBots_FS18/src/orxonox/worldentities/pawns/SpaceShip.h	2018-03-29 13:57:54 UTC (rev 11840)
@@ -102,19 +102,19 @@
             @param value A vector whose first component specifies the amount of movement. Positive means forward, negative means backward.
             */
             virtual void moveFrontBack(const Vector2& value)
-                { this->steering_.z -= value.x; }
+                { this->steering_.z -= (0.8)*value.x; }
             /**
             @brief Move right or left.
             @param value A vector whose first component specifies the amount of movement. Positive means right, negative means left.
             */
             virtual void moveRightLeft(const Vector2& value)
-                { this->steering_.x += value.x; }
+                { this->steering_.x += (0.6)*value.x; }
             /**
             @brief Move up or down.
             @param value A vector whose first component specifies the amount of movement. Positive means up, negative means down.
             */
             virtual void moveUpDown(const Vector2& value)
-                { this->steering_.y += value.x; }
+                { this->steering_.y += (0.6)*value.x; }
 
             virtual void rotateYaw(const Vector2& value); // Rotate in yaw direction.
             virtual void rotatePitch(const Vector2& value); // Rotate in pitch direction.



More information about the Orxonox-commit mailing list