[Orxonox-commit 5274] r9937 - in code/branches/presentationHS13: data/levels data/overlays src/modules/overlays/debugging
jo at orxonox.net
jo at orxonox.net
Thu Dec 19 13:59:07 CET 2013
Author: jo
Date: 2013-12-19 13:59:07 +0100 (Thu, 19 Dec 2013)
New Revision: 9937
Added:
code/branches/presentationHS13/data/levels/InsideSpaceStation.oxw
code/branches/presentationHS13/data/levels/presentationHS13.oxw
code/branches/presentationHS13/src/modules/overlays/debugging/DebugPositionText.cc
code/branches/presentationHS13/src/modules/overlays/debugging/DebugPositionText.h
Modified:
code/branches/presentationHS13/data/overlays/debug.oxo
code/branches/presentationHS13/src/modules/overlays/debugging/CMakeLists.txt
Log:
Adding the presentation level and improving the debug-HUD
Added: code/branches/presentationHS13/data/levels/InsideSpaceStation.oxw
===================================================================
--- code/branches/presentationHS13/data/levels/InsideSpaceStation.oxw (rev 0)
+++ code/branches/presentationHS13/data/levels/InsideSpaceStation.oxw 2013-12-19 12:59:07 UTC (rev 9937)
@@ -0,0 +1,88 @@
+<!-- -->
+<LevelInfo
+ name = "Inside Space Station"
+ description = "Level to test the Space Station"
+ tags = "test"
+ screenshot = "InsideSpaceStation.png"
+/>
+
+<?lua
+ include("HUDTemplates3.oxo")
+ include("stats.oxo")
+ include("templates/spaceshipAssff.oxt")
+ include("templates/spaceshipH2.oxt")
+ include("templates/FPS.oxt")
+ include("templates/lodInformation.oxt")
+?>
+
+<Level>
+ <templates>
+ <Template link=lodtemplate_default />
+ </templates>
+ <?lua include("includes/notifications.oxi") ?>
+
+ <Scene
+ ambientlight = "0.3, 0.3, 0.3"
+ skybox = "Orxonox/skyBoxBasic"
+ gravity = "0,-1000,0"
+ negativeWorldRange = "-100000, -100000, -100000"
+ positiveWorldRange = " 100000, 100000, 100000"
+ hasPhysics = true
+ >
+ <Light type=directional position="0,-100000,0" direction="0.02, -1, 0.05" diffuse="1.0, 1.0, 1.0, 1.0" specular="1.0, 1.0, 1.0, 1.0" />
+
+ <StaticEntity position="0,0,0" direction="1,0,0" pitch=180 collisionType=static mass=100000 friction=0.01 >
+ <attached>
+ <Model position="0,0,0" mesh="ss_tube.mesh" scale3D="100,100,100" />
+ <Model position="500,0,0" mesh="ss_tube.mesh" scale3D="100,100,100" />
+ <Model position="1200,0,0" mesh="ss_tube_x.mesh" scale3D="100,100,100" />
+ <Model position="-5000,0,0" mesh="ss_curve.mesh" scale3D="100,100,100" />
+ <Model position="-250,-16,0" pitch=-90 mesh="ss_flag_room.mesh" scale3D="100,100,100" />
+ <Model position="1200,100,-100" roll=180 mesh="ss_machine.mesh" scale3D="0.15,0.15,0.15" />
+ <Model position="-100,100,0" roll=180 mesh="ss_table.mesh" scale3D="25,25,25" />
+ <Model position="-300,100,0" roll=180 mesh="ss_table_cracked.mesh" scale3D="25,25,25" />
+ <Model position="600,75,0" roll=180 mesh="ss_cylinder.mesh" scale3D="25,25,25" />
+ <Model position="300,50,0" roll=180 pitch=20 mesh="ss_chair.mesh" scale3D="20,20,20" />
+ <Model position="1000,50,0" roll=180 mesh="ss_wall.mesh" scale3D="20,20,20" />
+ <Model position="-830,20,0" roll=180 mesh="ss_flag_aean.mesh" scale3D="40,40,40" />
+ <Model position="-1900,50,0" roll=180 mesh="ss_flag_eu.mesh" scale3D="20,20,20" />
+ <Model position="-1500,50,0" roll=180 mesh="ss_flag_cau.mesh" scale3D="20,20,20" />
+ <Model position="-1650,50,0" roll=180 mesh="ss_flag_csa.mesh" scale3D="20,20,20" />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="0,-100,0" halfExtents="5000000,0,100000" />
+ <BoxCollisionShape position="0,50,0" halfExtents="500000,0,100000" />
+ <BoxCollisionShape position="0,0,100" halfExtents="50000,100000,0" />
+ <BoxCollisionShape position="0,0,-100" halfExtents="500000,100000,0" />
+ </collisionShapes>
+ </StaticEntity>
+
+<?lua
+for i = 1, 10, 1
+do ?>
+ <SpawnPoint position="0,0,0" direction="-1, 0, 0" scale3D="0.5,100,0.5" lookat="0,0,0" spawnclass=FpsPlayer pawndesign=fps />
+<?lua
+end
+?>
+
+
+<?lua
+for i = 1, 200, 1
+do
+j = math.random()
+?>
+ <MovableEntity position="<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000-2000) ?>,<?lua print(math.random() * 5000 - 2000) ?>" collisionType=dynamic linearDamping=0.8 angularDamping=0 mass=<?lua print(j * 100) ?> scale=<?lua print(j * 5) ?> rotationaxis="<?lua print(math.random()) ?>, <?lua print(math.random()) ?>, <?lua print(math.random()) ?>" rotationrate="<?lua print(math.random() * 30 + 5) ?>" >
+ <attached>
+ <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh" />
+ </attached>
+ <collisionShapes>
+ <SphereCollisionShape radius="<?lua print(j * 100) ?>" />
+ </collisionShapes>
+ </MovableEntity>
+<?lua
+end
+?>
+
+ </Scene>
+</Level>
+
Added: code/branches/presentationHS13/data/levels/presentationHS13.oxw
===================================================================
--- code/branches/presentationHS13/data/levels/presentationHS13.oxw (rev 0)
+++ code/branches/presentationHS13/data/levels/presentationHS13.oxw 2013-12-19 12:59:07 UTC (rev 9937)
@@ -0,0 +1,201 @@
+<!-- -->
+<LevelInfo
+ name = "Presentation HS 13"
+ description = "Entering a Space Station."
+ tags = "presentation"
+ screenshot = "emptylevel.png"
+/>
+
+<?lua
+ include("stats.oxo")
+ include("HUDTemplates3.oxo")
+ include("templates/lodInformation.oxt")
+ include("templates/pickupRepresentationTemplates.oxt")
+?>
+
+<?lua
+ include("templates/spaceshipAssff.oxt")
+ include("templates/spaceshipPirate.oxt")
+ include("templates/spaceshipEscort.oxt")
+ include("templates/bigship.oxt")
+ include("templates/spaceshipTurret.oxt")
+ include("templates/spaceshipCollateralDamage.oxt")
+ include("templates/FPS.oxt")
+?>
+
+<Level
+ gametype = Deathmatch
+>
+ <templates>
+ <Template link=lodtemplate_default />
+ </templates>
+
+ <Scene
+ ambientlight = "0.5, 0.5, 0.5"
+ skybox = "Orxonox/skyBoxMoreNebula"
+ negativeWorldRange = "-100000, -100000, -100000"
+ positiveWorldRange = " 100000, 100000, 100000"
+ gravity = "0,0,0"
+ hasPhysics = true
+ >
+
+ <?lua
+ include("includes/pickups.oxi")
+ ?>
+
+ <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0,1.0,1.0,0.5" specular="1.0, 0.9, 0.9, 1.0"/>
+ <SpawnPoint team=0 position="3200,0,0" lookat="2800,0,0" spawnclass=SpaceShip pawndesign=spaceshipescort />
+
+
+ <StaticEntity position = "2800,0,0" mass=10000 collisionType=static >
+ <attached>
+ <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=50 />
+ </attached>
+ <collisionShapes>
+ <BoxCollisionShape position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
+ <BoxCollisionShape position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
+ <BoxCollisionShape position="290,0,480" halfExtents="115,100,245" yaw=-240 />
+ <BoxCollisionShape position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
+ <BoxCollisionShape position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
+ <BoxCollisionShape position="140,0,240" halfExtents="163,50,50" yaw=-240 />
+ <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
+ <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-120 />
+ <BoxCollisionShape position="0,530,0" halfExtents="172,52,298" yaw=-240 />
+ <BoxCollisionShape position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
+ <BoxCollisionShape position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
+ <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
+ <BoxCollisionShape position="100,100,-173" halfExtents="43,50,26" yaw=30 />
+ <BoxCollisionShape position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
+ <BoxCollisionShape position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
+ <BoxCollisionShape position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
+ </collisionShapes>
+ </StaticEntity>
+
+<!-- Docking -->
+ <Dock position="2830,20,50" roll=0 yaw=0 >
+ <animations>
+ <MoveToDockingTarget target="destroyer" />
+ </animations>
+ <effects>
+ <DockToShip target="spaceShip" />
+ </effects>
+ <events>
+ <execute>
+ <EventListener event="dockMe" />
+ </execute>
+
+ <undocking>
+ <EventListener event="undockMe" />
+ </undocking>
+
+ <activity>
+ <EventListener event=notGameEnd />
+ </activity>
+ </events>
+ <attached>
+ <!-- Trigger for docking with billboard -->
+ <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=1 />
+ <DistanceTrigger position="0,0,0" distance="200" target="Pawn"
+ beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
+ />
+ <!-- Trigger for undocking with billboard -->
+ <Billboard position="-2800,-20055,-700" material="Flares/ringflare2" colour="0.2,0.4,0.8" scale=10 />
+ <DistanceTrigger position="-2800,-20055,-700" distance="150" target="Pawn"
+ beaconMode="identify" targetname="bcnDestroyer" name="undockMe"
+ />
+ </attached>
+
+ </Dock>
+
+<!-- FPS Player as destination of the dock -->
+ <FpsPlayer template = "fps" radarname = "First Person Player" position = "0,-20000,0" >
+ <attached>
+ <DockingTarget name="spaceShip" />
+ <DistanceTriggerBeacon name="bcnDestroyer" />
+ <DockingTarget name="destroyer" />
+ </attached>
+ </FpsPlayer>
+
+
+<!-- Cube as test SpaceStation
+
+The station can either be hidden outside of the skybox, within the hull of the space station if it is big enough or within a planet.
+Complex spacestations can be placed very far away from the spaceship so it is rendered at low resolution while the player uses the space ship.
+
+-->
+ <StaticEntity position="0,-20000,0" direction="0,-1,0" collisionType=static mass=100000 friction=0.01 pitch=-90>
+ <attached>
+ <Model position="0,0,0" mesh="ss_tube.mesh" scale3D="100,100,100" />
+ <Model position="500,0,0" mesh="ss_tube.mesh" scale3D="100,100,100" />
+ <Model position="1200,0,0" mesh="ss_tube_x.mesh" scale3D="100,100,100" />
+ <Model position="1900,0,0" mesh="ss_curve.mesh" scale3D="100,100,100" />
+ <Model position="1200,0,703.5" mesh="ss_curve.mesh" scale3D="100,100,100" />
+ <Model position="1805.0,0,-800" mesh="ss_curve.mesh" scale3D="100,100,100" yaw=90 />
+ <Model position="1010.0,0,-700.0" mesh="ss_curve.mesh" scale3D="100,100,100" yaw=-180 />
+
+
+ <Model position="750,-16,703.5" pitch=-90 mesh="ss_flag_room.mesh" scale3D="100,100,100" />
+ <Model position="-250,-16,0" pitch=-90 mesh="ss_flag_room.mesh" scale3D="100,100,100" />
+ <Model position="1200,100,-100" roll=180 mesh="ss_machine.mesh" scale3D="0.15,0.15,0.15" />
+ <Model position="-100,100,0" roll=180 mesh="ss_table.mesh" scale3D="25,25,25" />
+ <Model position="-300,100,0" roll=180 mesh="ss_table_cracked.mesh" scale3D="25,25,25" />
+ <Model position="600,75,0" roll=180 mesh="ss_cylinder.mesh" scale3D="25,25,25" />
+ <Model position="300,50,0" roll=180 pitch=20 mesh="ss_chair.mesh" scale3D="20,20,20" />
+ <Model position="1000,50,0" roll=180 mesh="ss_wall.mesh" scale3D="20,20,20" />
+ <Model position="-830,20,0" roll=180 mesh="ss_flag_aean.mesh" scale3D="40,40,40" />
+
+ <!--Model mesh="cube.mesh" mass=10 position="0,-100,0" scale3D="5000,0.5,1000" yaw=0 />
+ <Model mesh="cube.mesh" mass=10 position="0,100,0" scale3D="2000,0.5,1000" yaw=0 />
+ <!--Model mesh="cube.mesh" mass=10 position="0,0,100" scale3D="5000,100,0.5" yaw=0 />
+ <Model mesh="cube.mesh" mass=10 position="0,0,-100" scale3D="5000,100,0.5" yaw=0 /-->
+ </attached>
+ <collisionShapes>
+ <!--BoxCollisionShape position="0,-100,0" halfExtents="5000,0,100" /-->
+ <BoxCollisionShape position="0,100,0" halfExtents="2000,0,1000" />
+ <!--BoxCollisionShape position="0,0,100" halfExtents="5000,100,0" />
+ <BoxCollisionShape position="0,0,-100" halfExtents="5000,100,0" /-->
+ </collisionShapes>
+ </StaticEntity>
+
+<!--
+
+-->
+
+
+ <!--Model position="2820,-20,-160" yaw="90" pitch="-90" roll="0" scale="10" mesh="ss_tube.mesh" />
+ <Model position="2820,-20,-210" yaw="90" pitch="-90" roll="0" scale="10" mesh="ss_tube.mesh" />
+ <Model position="2820,-20,-280" yaw="90" pitch="-90" roll="0" scale="10" mesh="ss_curve.mesh" />
+ <Model position="2820,-100,-270.5" yaw="0" pitch="180" roll="90" scale="10" mesh="ss_curve.mesh" /-->
+
+
+<!-- Homogenous gravitationfield to simulate local gravity (activating the normal gravity will affect the spaceship terribly) -->
+<ForceField position="0,-20000,0" mode="homogen" diameter="3000" forcedirection = "0,-500,0" />
+
+
+
+
+
+<!-- Some more stuff -->
+
+ <!-- triple large belt around the planet -->
+ <?lua
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(0, -19900, 0, 30, 0, 30, 30, 50, 7190, 7800, 250, 1)
+ ?>
+ <?lua
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(0, -19900, 0, 30, 0, 30, 30, 50, 10000, 11000, 300, 1)
+ ?>
+ <?lua
+ dofile("includes/asteroidField.lua")
+ asteroidBelt(0, -19900, 0, 30, 0, 30, 30, 50, 14000, 15000, 350, 1)
+ ?>
+
+ <Model position="0,-19900,0" mesh="planets/ganymede.mesh" scale="5000" />
+
+
+
+ </Scene>
+
+</Level>
+
Modified: code/branches/presentationHS13/data/overlays/debug.oxo
===================================================================
--- code/branches/presentationHS13/data/overlays/debug.oxo 2013-12-18 23:06:11 UTC (rev 9936)
+++ code/branches/presentationHS13/data/overlays/debug.oxo 2013-12-19 12:59:07 UTC (rev 9937)
@@ -34,6 +34,21 @@
font = "Monofur"
textsize = 0.03
/>
+
+ <OverlayText
+ name = "PositionTextCaption"
+ position = "0.03, 0.13"
+ font = "Monofur"
+ caption = "Position: "
+ textsize = 0.03
+ />
+
+ <DebugPositionText
+ name = "PositionText"
+ position = "0.3, 0.13"
+ font = "Monofur"
+ textsize = 0.03
+ />
</OverlayGroup>
Modified: code/branches/presentationHS13/src/modules/overlays/debugging/CMakeLists.txt
===================================================================
--- code/branches/presentationHS13/src/modules/overlays/debugging/CMakeLists.txt 2013-12-18 23:06:11 UTC (rev 9936)
+++ code/branches/presentationHS13/src/modules/overlays/debugging/CMakeLists.txt 2013-12-19 12:59:07 UTC (rev 9937)
@@ -1,4 +1,5 @@
ADD_SOURCE_FILES(OVERLAYS_SRC_FILES
DebugFPSText.cc
DebugRTRText.cc
+ DebugPositionText.cc
)
Added: code/branches/presentationHS13/src/modules/overlays/debugging/DebugPositionText.cc
===================================================================
--- code/branches/presentationHS13/src/modules/overlays/debugging/DebugPositionText.cc (rev 0)
+++ code/branches/presentationHS13/src/modules/overlays/debugging/DebugPositionText.cc 2013-12-19 12:59:07 UTC (rev 9937)
@@ -0,0 +1,61 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Johannes Ritz
+ * Co-authors:
+ * ...
+ *
+ */
+
+#include "DebugPositionText.h"
+
+#include "util/Convert.h"
+#include "core/CoreIncludes.h"
+#include "core/Game.h"
+
+#include "controllers/NewHumanController.h"
+
+namespace orxonox
+{
+ RegisterClass(DebugPositionText);
+
+ DebugPositionText::DebugPositionText(Context* context) : OverlayText(context)
+ {
+ RegisterObject(DebugPositionText);
+ }
+
+ DebugPositionText::~DebugPositionText()
+ {
+ }
+
+ void DebugPositionText::tick(float dt)
+ {
+ SUPER(DebugPositionText, tick, dt);
+
+ ObjectList<NewHumanController>::iterator it = ObjectList<NewHumanController>::begin();
+ if (it && it->getControllableEntity() )
+ {
+ Vector3 pos = it->getControllableEntity()->getPosition();
+ this->setCaption(multi_cast<std::string>(pos));
+ }
+ }
+}
Added: code/branches/presentationHS13/src/modules/overlays/debugging/DebugPositionText.h
===================================================================
--- code/branches/presentationHS13/src/modules/overlays/debugging/DebugPositionText.h (rev 0)
+++ code/branches/presentationHS13/src/modules/overlays/debugging/DebugPositionText.h 2013-12-19 12:59:07 UTC (rev 9937)
@@ -0,0 +1,48 @@
+/*
+ * ORXONOX - the hottest 3D action shooter ever to exist
+ * > www.orxonox.net <
+ *
+ *
+ * License notice:
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * Author:
+ * Johannes Ritz
+ * Co-authors:
+ * ...
+ *
+ */
+
+#ifndef _DebugPositionText_H__
+#define _DebugPositionText_H__
+
+#include "overlays/OverlaysPrereqs.h"
+
+#include "tools/interfaces/Tickable.h"
+#include "overlays/OverlayText.h"
+
+namespace orxonox
+{
+ class _OverlaysExport DebugPositionText : public OverlayText, public Tickable
+ {
+ public:
+ DebugPositionText(Context* context);
+ virtual ~DebugPositionText();
+
+ virtual void tick(float dt);
+ };
+}
+#endif /* _DebugPositionText_H__ */
More information about the Orxonox-commit
mailing list