[Orxonox-commit 7244] r11858 - in code/branches/Masterserver_FS18: data/levels src/libraries/network/packet

varyo at orxonox.net varyo at orxonox.net
Thu Apr 12 16:10:00 CEST 2018


Author: varyo
Date: 2018-04-12 16:10:00 +0200 (Thu, 12 Apr 2018)
New Revision: 11858

Added:
   code/branches/Masterserver_FS18/data/levels/testMultiplayerLevelLTS.oxw
Modified:
   code/branches/Masterserver_FS18/data/levels/testMultiplayerLevel.oxw
   code/branches/Masterserver_FS18/src/libraries/network/packet/Gamestate.cc
Log:
added 2nd multiplayer test map (Basically Last Team Standing, but all asteroids removed), fixed first one(removed comments in lua file, seemed to have messed with SpawnPoints), added few comments in Gamestate.cc

Modified: code/branches/Masterserver_FS18/data/levels/testMultiplayerLevel.oxw
===================================================================
--- code/branches/Masterserver_FS18/data/levels/testMultiplayerLevel.oxw	2018-04-12 14:09:58 UTC (rev 11857)
+++ code/branches/Masterserver_FS18/data/levels/testMultiplayerLevel.oxw	2018-04-12 14:10:00 UTC (rev 11858)
@@ -1,6 +1,6 @@
 <LevelInfo
- name = "Test Multiplayer level"
- description = "A level to test the multiplayer."
+ name = "00 Test Multiplayer level"
+ description = "A level to test the multiplayer"
  tags = "test"
  screenshot = "emptylevel.png"
 />
@@ -11,7 +11,6 @@
   include("templates/lodInformation.oxt")
   include("templates/spaceshipEscort.oxt")
   include("templates/spaceshipPirate.oxt")
-  include("templates/spaceshipH2.oxt")
   include("templates/spaceshipAssff.oxt")
 ?>
 
@@ -30,14 +29,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"/>
 
-<! Standard Spawnpoints, seems to be necessary in order to start the server, eventhough TeamSpawnPoints should replace these >
-    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate />
-    <SpawnPoint team=1 position="-400,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
-
-<! TeamSpawnPoints, probably only works for gametype teamDeathMatch >
-    <TeamSpawnPoint team=0 position="0,  0,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
-    <TeamSpawnPoint team=1 position="2000,  0,0" direction="-1,0,0" spawnclass=SpaceShip pawndesign=spaceshippirate />
-
+    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
     
   </Scene>
 </Level>

Added: code/branches/Masterserver_FS18/data/levels/testMultiplayerLevelLTS.oxw
===================================================================
--- code/branches/Masterserver_FS18/data/levels/testMultiplayerLevelLTS.oxw	                        (rev 0)
+++ code/branches/Masterserver_FS18/data/levels/testMultiplayerLevelLTS.oxw	2018-04-12 14:10:00 UTC (rev 11858)
@@ -0,0 +1,137 @@
+<LevelInfo
+ name = "00 Test Multiplayer Level LTS"
+ description = "Survive as a team."
+ tags = "test"
+ screenshot = "lastteamstanding.png"
+/>
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+  include("lastTeamStandingHUD.oxo")
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipPirate.oxt")
+  include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<Level
+ name         = "00 Team Multiplayer Level LTS"
+ description  = "testmap for gametype last team standing"
+ gametype     =  "LastTeamStanding"
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/skyBoxBasic"
+  >
+
+    <?lua
+      include("includes/pickups.oxi")
+    ?>
+    
+    <WorldAmbientSound source="Nebula_metal.ogg" looping="true" playOnLoad="true" />
+
+<Bot />
+
+<!-- ------------ middle asteroid -------------- -->
+    <StaticEntity position="0,20,0" collisionType=static>
+       <attached>
+           <Model position="0,0,0" scale=140 mesh="asteroid_UV.mesh" shadow=true />
+           <!-- ParticleEmitter position="0,0,0" source="Orxonox/Steam" / -->
+       </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="145" />
+      </collisionShapes>
+    </StaticEntity>
+
+    <PickupSpawner pickup=hugeinvisiblepickup position="-160,60,17" triggerDistance="20" respawnTime="5" maxSpawnedItems="10" /><!--EasterEgg-->
+    <StaticEntity position="-160,60,28.4"><!--EasterEgg-Indicator-->
+      <attached>
+        <Model position="0,0,0" scale=1 mesh="sphere.mesh" />
+      </attached>
+    </StaticEntity>
+
+<!-- ---------------asteroid dome----------------- -->
+<?lua
+max = 16
+for i = 0, max, 1
+do
+    y = math.sin(i/max*6)*750
+    z = math.cos(i/max*6)*750
+    j = 1
+    ?>
+
+    <TeamSpawnPoint team="<?lua print( math.mod(i,4)) ?>" position="<?lua print(y*1.4+z*0.2) ?>,0,<?lua print(z*1.4-y*0.2) ?>" direction="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+
+    <StaticEntity position="<?lua print(y) ?>,0,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
+      <attached>
+        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
+        </Model>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape    halfExtents="<?lua print(j * 2) ?>,100,<?lua print(j * 2) ?>" position = "0,0,0" />
+      </collisionShapes>
+    </StaticEntity>
+
+    <StaticEntity position="<?lua print(y) ?>,100,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
+      <attached>
+        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i+3,6) + 1) ?>.mesh">
+        </Model>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape    halfExtents="45,100,45" position = "0,0,0" />
+      </collisionShapes>
+    </StaticEntity>
+
+    <StaticEntity position="<?lua print(y) ?>,200,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
+      <attached>
+        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*5,6) + 1) ?>.mesh">
+        </Model>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape    halfExtents="45,100,45" position = "0,0,0" />
+      </collisionShapes>
+    </StaticEntity>
+
+    <StaticEntity position="<?lua print(y) ?>,-100,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
+      <attached>
+        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*13+1,6) + 1) ?>.mesh">
+        </Model>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape    halfExtents="45,100,45" position = "0,0,0" />
+      </collisionShapes>
+    </StaticEntity>
+
+    <StaticEntity position="<?lua print(y) ?>,-200,<?lua print(z) ?>" scale="<?lua print(j * 2) ?>" collisionType=static >
+      <attached>
+        <Model position="0,0,0" scale=15 mesh="ast<?lua print( math.mod(i*17,6) + 1) ?>.mesh">
+        </Model>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape    halfExtents="45,100,45" position = "0,0,0" />
+      </collisionShapes>
+    </StaticEntity>
+
+<!-- ---------Top Asteroid----------- -->
+    <StaticEntity position="<?lua print(y) ?>,300,<?lua print(z) ?>" scale="<?lua print(j * 2.1) ?>" pitch="90" roll="180" yaw="<?lua print(-90+i*360/max) ?>" collisionType=static >
+      <attached>
+        <Model position="0,0,0" scale=25 mesh="ast6.mesh">
+        </Model>
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape    halfExtents="50,140,30" position="0,0,0"/>
+      </collisionShapes>
+    </StaticEntity>
+
+
+<?lua end ?>
+
+  </Scene>
+</Level>
+
+

Modified: code/branches/Masterserver_FS18/src/libraries/network/packet/Gamestate.cc
===================================================================
--- code/branches/Masterserver_FS18/src/libraries/network/packet/Gamestate.cc	2018-04-12 14:09:58 UTC (rev 11857)
+++ code/branches/Masterserver_FS18/src/libraries/network/packet/Gamestate.cc	2018-04-12 14:10:00 UTC (rev 11858)
@@ -101,7 +101,7 @@
 {
 }
 
-
+//AV: This takes all synchronisables and packs it in a GameState, to be sent over the network
 bool Gamestate::collectData(int id, uint8_t mode)
 {
   uint32_t tempsize=0, currentsize=0;
@@ -172,7 +172,7 @@
   return true;
 }
 
-
+//AV: This takes the Gamestate received from the network and "unpacks" it back to a list of Objects/Synchronisables, thus updating the data
 bool Gamestate::spreadData(uint8_t mode)
 {
   orxout(verbose_more, context::packets) << "processing gamestate with id " << header_.getID() << endl;
@@ -275,7 +275,7 @@
   return host->addGamestate(this, getPeerID());
 }
 
-
+//AV: This function takes the Gamestate and compresses it for transmission over the network
 bool Gamestate::compressData()
 {
   assert(data_);
@@ -312,7 +312,7 @@
   return true;
 }
 
-
+//AV: This function takes the compressed Gamestate received from the network and decompresses it for further unpacking
 bool Gamestate::decompressData()
 {
   assert(data_);



More information about the Orxonox-commit mailing list