Index: /trunk/src/defs/class_id.h
===================================================================
--- /trunk/src/defs/class_id.h	(revision 7390)
+++ /trunk/src/defs/class_id.h	(revision 7391)
@@ -144,4 +144,6 @@
   CL_GAME_RULES                 =    0x00000110,          ///HACK: this is no story entity, bensch: to rebuild
   CL_MULTIPLAYER_TEAM_DEATHMATCH=    0x00000111,          ///HACK: this is no story entity: it is a CL_GAME_RULES, bensch: to rebuild
+  CL_SINGLEPLAYER_SHOOTEMUP     =    0x00000112,          ///HACK: this is no story entity: it is a CL_GAME_RULES, bensch: to rebuild
+  CL_MISSION_GOAL               =    0x00000113,          ///HACK: this is no story entity: it is a CL_BASE_OBJECT, bensch: to rebuild
 
   /// SUPER-PNodes
Index: /trunk/src/story_entities/game_world.cc
===================================================================
--- /trunk/src/story_entities/game_world.cc	(revision 7390)
+++ /trunk/src/story_entities/game_world.cc	(revision 7391)
@@ -83,4 +83,5 @@
 
   this->dataXML = NULL;
+  this->gameRules = NULL;
 }
 
@@ -274,4 +275,6 @@
     /* update the state */
     this->update ();
+    /* check the game rules */
+    this->checkGameRules();
     /* draw everything */
     this->display ();
@@ -417,4 +420,16 @@
 }
 
+
+/**
+ *  check the game rules: winning conditions, etc.
+ *
+ */
+void GameWorld::checkGameRules()
+{
+  if( this->gameRules)
+    this->gameRules->tick(this->dtS);
+}
+
+
 /**
  *  render the current frame
@@ -474,5 +489,4 @@
   engine->draw();
 
-
   // draw the game ruls
   if( likely(this->dataTank->gameRule != NULL))
Index: /trunk/src/story_entities/game_world.h
===================================================================
--- /trunk/src/story_entities/game_world.h	(revision 7390)
+++ /trunk/src/story_entities/game_world.h	(revision 7391)
@@ -14,4 +14,5 @@
 class OrxShell::Shell;
 class WorldEntity;
+class GameRules;
 
 /** How many frames time values to keep
@@ -66,4 +67,5 @@
     virtual void tick();
     virtual void update();
+    virtual void checkGameRules();
     virtual void collide();
 
@@ -93,4 +95,6 @@
     Uint32              frameTimes[TICK_SMOOTH_VALUE];//!< The time used for the last TICK_SMOOTH_VALUE's frames.
 
+    GameRules*          gameRules;                    //!< Pointer to the data structure containig the game rules
+
 
   private:
Index: /trunk/src/story_entities/game_world_data.cc
===================================================================
--- /trunk/src/story_entities/game_world_data.cc	(revision 7390)
+++ /trunk/src/story_entities/game_world_data.cc	(revision 7391)
@@ -379,4 +379,5 @@
   while( element != NULL)
   {
+    PRINTF(4)("============ GameRules ==");
     PRINTF(4)("creating %s\n", element->Value());
     BaseObject* created = Factory::fabricate(element);
Index: /trunk/src/util/Makefile.am
===================================================================
--- /trunk/src/util/Makefile.am	(revision 7390)
+++ /trunk/src/util/Makefile.am	(revision 7391)
@@ -9,5 +9,7 @@
 			hud.cc \
 			game_rules.cc \
+			mission_goal.cc\
 			multiplayer_team_deathmatch.cc \
+			singleplayer_shootemup.cc \
 			\
 			animation/animation3d.cc \
@@ -25,5 +27,7 @@
 			hud.h \
 			game_rules.h \
+			mission_goal.h \
 			multiplayer_team_deathmatch.h \
+			singleplayer_shootemup.h \
 			\
 			animation/animation3d.h \
Index: /trunk/src/util/mission_goal.cc
===================================================================
--- /trunk/src/util/mission_goal.cc	(revision 7391)
+++ /trunk/src/util/mission_goal.cc	(revision 7391)
@@ -0,0 +1,39 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+   ### File Specific:
+   main-programmer: Patrick Boenzli
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_GAME_RULES
+
+#include "mission_goal.h"
+
+using namespace std;
+
+
+/**
+ * standard constructor
+ * @todo this constructor is not jet implemented - do it
+*/
+MissionGoal::MissionGoal ()
+{
+   this->setClassID(CL_MISSION_GOAL, "MissionGoal");
+}
+
+
+/**
+ * standard deconstructor
+*/
+MissionGoal::~MissionGoal ()
+{
+
+}
Index: /trunk/src/util/mission_goal.h
===================================================================
--- /trunk/src/util/mission_goal.h	(revision 7391)
+++ /trunk/src/util/mission_goal.h	(revision 7391)
@@ -0,0 +1,26 @@
+/*!
+ * @file mission_goal.h
+ * @brief General definition of mission goals
+*/
+
+#ifndef _MISSION_GOAL_H
+#define _MISSION_GOAL_H
+
+#include "base_object.h"
+
+
+
+
+//! A class representing a mission goal
+class MissionGoal : public BaseObject {
+
+ public:
+  MissionGoal();
+  virtual ~MissionGoal();
+
+
+ private:
+
+};
+
+#endif /* _MISSION_GOAL_H */
Index: /trunk/src/util/singleplayer_shootemup.cc
===================================================================
--- /trunk/src/util/singleplayer_shootemup.cc	(revision 7391)
+++ /trunk/src/util/singleplayer_shootemup.cc	(revision 7391)
@@ -0,0 +1,132 @@
+/*
+   orxonox - the future of 3D-vertical-scrollers
+
+   Copyright (C) 2004 orx
+
+   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, or (at your option)
+   any later version.
+
+### File Specific:
+   main-programmer: Patrick Boenzli
+*/
+
+#define DEBUG_MODULE_GAME_RULES
+
+#include "singleplayer_shootemup.h"
+
+#include "util/loading/load_param.h"
+#include "util/loading/factory.h"
+
+#include "render2D/billboard.h"
+#include "state.h"
+#include "class_list.h"
+
+#include "player.h"
+#include "playable.h"
+#include "space_ships/space_ship.h"
+
+
+#include "shared_network_data.h"
+#include "terrain.h"
+#include "class_list.h"
+#include "space_ships/space_ship.h"
+
+
+using namespace std;
+
+
+CREATE_FACTORY(SingleplayerShootemup, CL_SINGLEPLAYER_SHOOTEMUP);
+
+
+/**
+ * constructor
+ */
+SingleplayerShootemup::SingleplayerShootemup(const TiXmlElement* root)
+  : GameRules(root)
+{
+  this->setClassID(CL_SINGLEPLAYER_SHOOTEMUP, "SingleplayerShootemup");
+
+
+  if( root != NULL)
+    this->loadParams(root);
+}
+
+/**
+ * decontsructor
+ */
+SingleplayerShootemup::~SingleplayerShootemup()
+{
+}
+
+
+
+void SingleplayerShootemup::loadParams(const TiXmlElement* root)
+{
+  GameRules::loadParams(root) ;
+
+//   LoadParam(root, "death-penalty-timeout", this, SingleplayerShootemup, setDeathPenaltyTimeout)
+//       .describe("sets the time in seconds a player has to wait for respawn");
+//
+//   LoadParam(root, "max-kills", this, SingleplayerShootemup, setMaxKills)
+//       .describe("sets the maximal kills for winning condition");
+//
+//   LoadParam(root, "death-screen-image", this, SingleplayerShootemup, setDeathScreen)
+//       .describe("sets the death screen image");
+
+}
+
+
+
+void SingleplayerShootemup::setDeathScreen(const std::string& imageName)
+{}
+
+
+
+/**
+ * called when the player enters the game
+ * @param player the spawned player
+ */
+void SingleplayerShootemup::onPlayerSpawn()
+{
+}
+
+
+/**
+ * when the player is killed
+ * @param player the killed player
+ */
+void SingleplayerShootemup::onPlayerDeath()
+{
+}
+
+
+/**
+ * time tick
+ * @param dt time
+ */
+void SingleplayerShootemup::tick(float dt)
+{
+  this->checkGameRules();
+}
+
+
+/**
+ * draws the stuff
+ */
+void SingleplayerShootemup::draw()
+{}
+
+
+/**
+ * check the game rules for consistency
+ */
+void SingleplayerShootemup::checkGameRules()
+{}
+
+
+
+
+
+
Index: /trunk/src/util/singleplayer_shootemup.h
===================================================================
--- /trunk/src/util/singleplayer_shootemup.h	(revision 7391)
+++ /trunk/src/util/singleplayer_shootemup.h	(revision 7391)
@@ -0,0 +1,45 @@
+
+/*!
+ * @file multiplayer_team_deathmatch.h
+ * Defines game rules for team deathmatch games
+ *
+ * currently there are only two teams supported
+ */
+
+#ifndef _SINGLEPLAYER_SHOOTEMUP_H
+#define _SINGLEPLAYER_SHOOTEMUP_H
+
+#include "game_rules.h"
+
+
+class TiXmlElement;
+
+
+class SingleplayerShootemup : public GameRules
+{
+
+  public:
+    SingleplayerShootemup(const TiXmlElement* root = NULL);
+    virtual ~SingleplayerShootemup();
+
+    virtual void loadParams(const TiXmlElement* root);
+
+    virtual void onPlayerSpawn();
+    virtual void onPlayerDeath();
+
+    virtual void tick(float dt);
+    void draw();
+
+    void setDeathScreen(const std::string& imageName);
+
+
+  protected:
+    virtual void checkGameRules();
+
+
+  private:
+
+};
+
+
+#endif /* _SINGLEPLAYER_SHOOTEMUP_H */
