Index: orxonox/branches/dave/core/Makefile
===================================================================
--- orxonox/branches/dave/core/Makefile	(revision 1885)
+++ orxonox/branches/dave/core/Makefile	(revision 1994)
@@ -29,5 +29,5 @@
 	orxonox.h \
 	data_core.h
-	
+
 SOURCES = \
 	orxonox.cc \
@@ -41,5 +41,8 @@
 	world.o \
 	input_output.o \
-	environment.o
+	environment.o \
+	shoot_laser.o \
+	shoot_rocket.o \
+	ai.o
 
 TARGET = orxonox
@@ -73,5 +76,5 @@
 	@echo ""
 	@echo "For further info see the README file"
-	
+
 clean:
 	rm -rf *.o *~ orxonox
@@ -85,4 +88,4 @@
 #data_tank.o: data_tank.cc \
 #		data_tank.h	
-	
+
 #EOF
Index: orxonox/branches/dave/core/data_tank.cc
===================================================================
--- orxonox/branches/dave/core/data_tank.cc	(revision 1885)
+++ orxonox/branches/dave/core/data_tank.cc	(revision 1994)
@@ -19,9 +19,9 @@
 using namespace std;
 
+float DataTank::xOffset = 0;
+float DataTank::yOffset = 0;
+float DataTank::zOffset = 0;
 
 DataTank::DataTank () {}
-
-
-
 DataTank::~DataTank () {}
 
Index: orxonox/branches/dave/core/data_tank.h
===================================================================
--- orxonox/branches/dave/core/data_tank.h	(revision 1885)
+++ orxonox/branches/dave/core/data_tank.h	(revision 1994)
@@ -6,7 +6,11 @@
 class DataTank {
 
- private:
+ public:
   DataTank ();
   ~DataTank ();
+
+  static float xOffset;
+  static float yOffset;
+  static float zOffset;
 
 };
Index: orxonox/branches/dave/core/environment.cc
===================================================================
--- orxonox/branches/dave/core/environment.cc	(revision 1885)
+++ orxonox/branches/dave/core/environment.cc	(revision 1994)
@@ -23,26 +23,27 @@
 using namespace std;
 
-
+//Sorry Bensch
+#define LEVEL_LENGTH 500
 
 Environment::Environment () 
 {
 
-  for (int x = 1; x < 9; x++)
+  //Sorry Bensch: x,y = 10
+  for (int x = 0; x < 50; x++)
     {
-      for (int y = 1; y < 9; y++)
+      for (int y = 0; y < 50; y++)
 	{
-	  mountainTest[x][y] = (float)random() / 900000000;
+	  mountainTest[x][y] =0;
 	                                         
 	}
     }
-
- for (int x = 0; x < 10; x++)
+  //Sorry Bensch: x,y = 9
+  for (int x = 1; x < LEVEL_LENGTH; x++)
     {
-      for (int y = 0; y < 10; y++)
+      for (int y = 1; y < LEVEL_LENGTH; y++)
 	{
-	  cout << " " << mountainTest[x][y] << " ";
-	  
+	  //mountainTest[x][y] = (float)random() / 900000000;
+	  mountainTest[x][y] = (float)(random() % 4);                                       
 	}
-      cout << endl;
     }
 }
@@ -57,14 +58,15 @@
 {
   glPushMatrix();
+  glEnable(GL_DEPTH_TEST);
   //glScalef(0.5, 0.5, 1.0);
   //glTranslatef(xCor, yCor, zCor);
-  glTranslatef( -16.0, -2.0, 0.0);
+  glTranslatef( -100.0, -50.0, 0.0);
   
-  glColor3f(0.0, 1.0, 0.0);
+  glColor4f(0.0, 0.3, 0.4,1.0);
   
   glBegin(GL_LINES);
-  for (int x = 0; x < 10; x += 1)
+  for (int x = 0; x < LEVEL_LENGTH; x += 1)
     {
-      for (int y = 0; y < 10; y += 1)
+      for (int y = 0; y < 190; y += 1)
 	{
 	  glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
@@ -76,7 +78,7 @@
   
   glBegin(GL_LINES);
-  for (int y = 0; y < 10; y += 1)
+  for (int y = 0; y < LEVEL_LENGTH; y += 1)
     {
-      for (int x = 0; x < 10; x += 1)
+      for (int x = 0; x < 90; x += 1)
 	{
 	  glVertex3f((float)(2*x), (float)(2*y), mountainTest[x][y]);
Index: orxonox/branches/dave/core/environment.h
===================================================================
--- orxonox/branches/dave/core/environment.h	(revision 1885)
+++ orxonox/branches/dave/core/environment.h	(revision 1994)
@@ -3,8 +3,8 @@
 #include <stdlib.h>
 
-#ifndef PROTO_CLASS_H
-#define PROTO_CLASS_H
+#ifndef ENVIRONEMENT_H
+#define ENVIRONEMENT_H
 
-
+#include "data_tank.h"
 
 class Environment {
Index: orxonox/branches/dave/core/input_output.cc
===================================================================
--- orxonox/branches/dave/core/input_output.cc	(revision 1885)
+++ orxonox/branches/dave/core/input_output.cc	(revision 1994)
@@ -40,18 +40,25 @@
 
 
+void InputOutput::setPlayerStep(float step)
+{
+  cout << "setting player step to: " << step << endl;
+  this->step = step;
+}
+
 
 void InputOutput::goUp() 
 {
-  (*player).goY(STEP_FRONT);
+  //cout << "InoutOutput::goUp" << endl;
+  (*player).goY(step);
 }
 
 void InputOutput::goDown() 
 {
-  (*player).goY(-STEP_FRONT);
+  (*player).goY(-step);
 }
 
 void InputOutput::goLeft()
 {
-  (*player).goX(-STEP_SIDE);
+  (*player).goX(-step);
 
 }
@@ -60,5 +67,5 @@
 {
 
-  (*player).goX(STEP_SIDE);
+  (*player).goX(step);
 }
 
Index: orxonox/branches/dave/core/input_output.h
===================================================================
--- orxonox/branches/dave/core/input_output.h	(revision 1885)
+++ orxonox/branches/dave/core/input_output.h	(revision 1994)
@@ -9,6 +9,5 @@
 #include "player.h"
 
-#define STEP_SIDE 0.4
-#define STEP_FRONT 0.2
+#include "data_tank.h"
 
 class InputOutput {
@@ -18,8 +17,11 @@
   Player* player;
 
+  float step;
+
  public:
   InputOutput (World* wld, Player* player);
   ~InputOutput ();
 
+  void setPlayerStep(float step);
   void goUp(void);
   void goDown(void);
Index: orxonox/branches/dave/core/npc.cc
===================================================================
--- orxonox/branches/dave/core/npc.cc	(revision 1885)
+++ orxonox/branches/dave/core/npc.cc	(revision 1994)
@@ -21,20 +21,22 @@
 #include <iostream>
 
+
 using namespace std;
 
 
-NPC::NPC () {}
-
-
+NPC::NPC () 
+{
+  hasDied = 0;
+}
 
 NPC::~NPC () {}
 
 
-void NPC::setPosition(int x, int y, int z)
+void NPC::setPosition(float x, float y, float z)
 {
   xCor = x; yCor = y; zCor = z;
 }
 
-void NPC::getPosition(int* x, int* y, int* z) 
+void NPC::getPosition(float* x, float* y, float* z) 
 {
   *x = xCor; 
@@ -43,7 +45,43 @@
 }
 
+void NPC::setCollisionRadius(float r) 
+{
+  collisionRadius = r;
+}
+
+float NPC::getCollisionRadius() 
+{
+  return collisionRadius;
+}
+
+
+void NPC::addAI(AI* ai)
+{
+
+}
 
 void NPC::drawNPC(void) 
 {
-  cout << "Player::drawNPC()" << endl;
+  /* fix: died flag approach is very stupid, just to show @ convention */
+  if( hasDied == 0 ) {
+    glPushMatrix();
+    glTranslatef(xCor, yCor, 3.0);
+    //glScalef(1.0, 3.0, 1.0);
+    glutWireSphere(1.0, 10, 10);
+    glPopMatrix();
+    
+  }
 }
+
+
+/* define the reaction, if the ship is been hit */
+int NPC::hit()
+{
+  die();
+  return 0;
+}
+
+void NPC::die()
+{
+  hasDied = 1;
+}
Index: orxonox/branches/dave/core/npc.h
===================================================================
--- orxonox/branches/dave/core/npc.h	(revision 1885)
+++ orxonox/branches/dave/core/npc.h	(revision 1994)
@@ -3,4 +3,9 @@
 #define NPC_H
 
+/* openGL Headers */
+#include <GL/glut.h>
+
+#include "ai.h"
+#include "data_tank.h"
 
 class NPC {
@@ -10,7 +15,19 @@
   ~NPC ();
 
+  /* collision control */
+  float collisionRadius;
+
+  float xCor;
+  float yCor;
+  float zCor;
+
   void drawNPC(void);
-  void setPosition(int x, int y, int z);
-  void getPosition(int* x, int* y, int* z);
+  void setPosition(float x, float y, float z);
+  void getPosition(float* x, float* y, float* z);
+  void addAI(AI* ai);
+  void setCollisionRadius(float r);
+  float getCollisionRadius(void);
+  int hit(void);
+  void die(void);
 
  private:
@@ -18,8 +35,7 @@
 
   int npcType;
+  int hasDied;
 
-  int xCor;
-  int yCor;
-  int zCor;
+
 ;
 
Index: orxonox/branches/dave/core/orxonox.cc
===================================================================
--- orxonox/branches/dave/core/orxonox.cc	(revision 1885)
+++ orxonox/branches/dave/core/orxonox.cc	(revision 1994)
@@ -26,5 +26,4 @@
 /* class definition header */
 #include "orxonox.h"
-#include "environment.h"
 
 
@@ -50,9 +49,13 @@
 World* Orxonox::world = 0;
 InputOutput* Orxonox::io = 0;
+Player* Orxonox::localPlayer = 0;
 bool Orxonox::pause = false;
+bool Orxonox::inputEnabled = false;
 bool Orxonox::upWeGo = false;
 bool Orxonox::downWeGo = false;
 bool Orxonox::rightWeGo = false;
 bool Orxonox::leftWeGo = false;
+bool Orxonox::shoot1 = false;
+int Orxonox::fps = 0;
 int Orxonox::alpha = 0;
 int Orxonox::beta = 0;
@@ -70,16 +73,39 @@
 int Orxonox::globalInit (int argc, char** argv) 
 {
+  glEnable(GL_DEPTH_TEST);
+  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
   glutInit(&argc, argv);
-  glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);
-  glEnable(GL_DEPTH_TEST);
-  glutInitWindowSize(500, 500);
+  glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGB | GLUT_DEPTH);
+  glEnable(GL_NORMALIZE);
+  glEnable(GL_COLOR_MATERIAL);
+  /*glEnable(GL_LIGHT0);
+  glEnable(GL_LIGHTING);
+  GLfloat LPosition[4]={1.0,1.0,1.0,0.0};
+  glLightfv(GL_LIGHT0,GL_POSITION,&LPosition[0]);
+  glLightModeli(GL_LIGHT_MODEL_TWO_SIDE,1);
+  */
+  
+  
+  /* muss nicht eingeschaltet werden, da sonst Transparenz aktiviert
+  glEnable(GL_BLEND);
+  glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
+  glColorMaterial(GL_FRONT,GL_AMBIENT_AND_DIFFUSE);
+  */
+  
+  
+  glutInitWindowSize(1000, 1000);
   //glutFullScreen();
-  glutInitWindowPosition(100, 100);
+  glutInitWindowPosition(200, 200);
   glutCreateWindow("orxOnox");
-  glShadeModel(GL_FLAT);
+  glShadeModel(GL_SMOOTH);
   /* window event dispatchers */
   glutDisplayFunc(display);
   glutReshapeFunc(reshape);
   glutKeyboardFunc(keyboard);
+  glutKeyboardUpFunc(upKeyboard);
+ 
+
+  glutTimerFunc(1000, timeSlice, 0);
+  cout << "measuring performance...";
 }
 
@@ -87,5 +113,5 @@
 int Orxonox::menuInit (void)
 {
-  glClearColor(0.0, 0.0, 0.0, 0.0);
+  glClearColor(0.0, 0.0, 0.0,1.0);
 }
 
@@ -93,8 +119,12 @@
 int Orxonox::gameInit (void) 
 {
-  glClearColor(0.0, 0.0, 0.0, 0.0);
+  glClearColor(0.0, 0.0, 0.0,1.0);
+  
+  /* world init, shouldnt be done here later */
   world = new World;
   (*world).initEnvironement();
-  Player* localPlayer = new Player;
+  localPlayer = new Player;
+  localPlayer->setPosition(0.0, -10.0, 3.0);
+  localPlayer->setCollisionRadius(2.0);
   io = new InputOutput(world, localPlayer);
   (*world).addPlayer(localPlayer);
@@ -102,12 +132,52 @@
   (*world).addEnv(env);
   
+  
+  NPC* npc = new NPC;
+  npc->setPosition(3.0, 0.0, 3.0);
+  npc->setCollisionRadius(1.0);
+  world->addNPC(npc);
+
+  NPC* npc2 = new NPC;
+  npc2->setPosition(-2.0, 10.0, 3.0);
+  npc2->setCollisionRadius(1.0);
+  world->addNPC(npc2);
+  
+  NPC* npc3 = new NPC;
+  npc3->setPosition(3.0, 30.0, 3.0);
+  npc3->setCollisionRadius(1.0);
+  world->addNPC(npc3);
+  
+  NPC* npc4 = new NPC;
+  npc4->setPosition(-2.0, 35.0, 3.0);
+  npc4->setCollisionRadius(1.0);
+  world->addNPC(npc4);
+  
+  NPC* npc5 = new NPC;
+  npc5->setPosition(5.0, 45.0, 3.0);
+  npc5->setCollisionRadius(1.0);
+  world->addNPC(npc5);
 
   glutSpecialFunc(specFunc); 
   glutSpecialUpFunc(releaseKey);
 
-  //for testing purps only
-  //testTheShit();
   glutIdleFunc(continousRedraw);
-}
+  //cout << "Orxonox::gameInit" << endl;
+}
+
+
+/* this is the time triggered function. heart beat*/
+
+void Orxonox::timeSlice(int value)
+{
+  cout << "got " << fps << " fps" << endl;
+  /* this is very very unsafe: io could be uninit */
+  io->setPlayerStep(19.0/fps); /* set player to propper speed */
+  localPlayer->shootLaser->setShootStep(20.0/fps); /* set shoot speed */
+  world->setWorldStep(7.0/fps); /* set the speed of the terrain moving away */
+  fps = 0;
+  inputEnabled = true;
+  glutTimerFunc(1000, timeSlice, 0);
+}
+
 
 
@@ -131,5 +201,4 @@
 
     /* game controls */
-
   case 'p':
     if (pause) 
@@ -146,4 +215,7 @@
       }
     break;
+  case 32:
+    shoot1 = true;
+    break;
   case 27:
   case 'q':
@@ -154,10 +226,17 @@
 
 
+void Orxonox::upKeyboard(unsigned char key, int x, int y) 
+{
+  switch(key) {
+  case 32:
+    shoot1 = false;
+    break;
+  }
+}
+
+
 void Orxonox::quitGame() 
 {
-  //glutIgnoreKeyRepeat(0);                 /* for win32 */
-  //glutSetKeyRepeat(GLUT_KEY_REPEAT_DEFAULT); /*do not remove or you will have
-  //					  no repeating keys anymore...*/
-  cout << "finished garbage colletion, quitting..." << endl;
+  //cout << "finished garbage colletion, quitting..." << endl;
   exit(0);
 }
@@ -191,7 +270,5 @@
 {
   switch(key) {
-
     /* spacecraft controls */
-    
   case GLUT_KEY_UP:
     upWeGo = true;
@@ -213,10 +290,9 @@
 {
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
-
-  glColor3f(0.0, 0.5, 0.6);
+  glColor3f(0.2, 0.0, 0.8);
   glLoadIdentity();
-  gluLookAt(0.0, -14.0, 15.0, 0.0 + alpha, 0.0 + beta, 0.0, 0.0, 1.0, 0.0);
-  (*world).drawWorld();
-
+  gluLookAt(0.0, -14.0, 15.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0);
+  // (*world).drawWorld();  diese und die naechste Zeile bedeuten das gleiche!!!
+  world->drawWorld((float)beta,(float)alpha);
   glutSwapBuffers();
 } 
@@ -225,19 +301,28 @@
 void Orxonox::continousRedraw()
 {
+  /* increment the frames-per-second counter*/
+  
+  fps++;
+  /* check for collisions */
+  world->detectCollision();
+
   /* check for input to pass it over */
-  if ( !pause && (rightWeGo || leftWeGo || upWeGo || downWeGo)) {
-    if (upWeGo)
-      (*io).goUp();
-    if (downWeGo)
+  if ( !pause && inputEnabled && 
+       (rightWeGo || leftWeGo || upWeGo || downWeGo || shoot1)) 
+    {
+       if (upWeGo)
+	(*io).goUp();
+      if (downWeGo)
       (*io).goDown();
-    if (rightWeGo)
-      (*io).goRight();
-    if (leftWeGo)
+      if (rightWeGo)
+	(*io).goRight();
+      if (leftWeGo)
       (*io).goLeft();
-  }
+      if (shoot1) 
+	(*io).shoot();
+    }
   /* request repaint */
-
-  //cout << "contiousRedraw" << endl;
   glutPostRedisplay();
+  //cout << "Orxonox::continousRedraw" << endl;
 }
 
@@ -248,7 +333,5 @@
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
-  //glOrtho(-50.0, 50.0, -50.0, 50.0, -1.0, 1.0); pb: //simple and working
   glFrustum(-1.0, 1.0, -1.0, 1.0, 1.5, 200.0);
-  //glFrustum(-10.0, 10.0, -5.0, 10.0, 0.0, 100.0);
   glMatrixMode(GL_MODELVIEW);
   glLoadIdentity(); //pb why a second time?
Index: orxonox/branches/dave/core/orxonox.h
===================================================================
--- orxonox/branches/dave/core/orxonox.h	(revision 1885)
+++ orxonox/branches/dave/core/orxonox.h	(revision 1994)
@@ -12,9 +12,11 @@
 #include <GL/glut.h>
 
+
+#include "environment.h"
 #include "world.h"
 #include "input_output.h"
 #include "data_tank.h"
 #include "stdincl.h"
-
+#include "player.h"
 
 
@@ -27,9 +29,13 @@
   static World* world;
   static InputOutput* io;
+  static Player* localPlayer;
   static bool pause;
+  static bool inputEnabled;
   static bool upWeGo;
   static bool downWeGo;
   static bool rightWeGo;
   static bool leftWeGo;
+  static bool shoot1;
+  static int fps;
 
   static int alpha;
@@ -38,8 +44,10 @@
   static int offsetY;
 
+  static void timeSlice(int value);
+
  public:
 
+   
   static Orxonox* getInstance (void);
-
   int globalInit (int argc, char** argv);
   int menuInit (void);
@@ -50,4 +58,5 @@
   static void reshape (int w, int h);
   static void keyboard(unsigned char key, int x, int y);
+  static void upKeyboard(unsigned char key, int x, int y);
   static void releaseKey(int key, int x, int y);
   static void specFunc(int key, int x, int y);
Index: orxonox/branches/dave/core/player.cc
===================================================================
--- orxonox/branches/dave/core/player.cc	(revision 1885)
+++ orxonox/branches/dave/core/player.cc	(revision 1994)
@@ -19,4 +19,6 @@
 #include "player.h"
 #include <iostream>
+#include <stdlib.h>
+
 
 using namespace std;
@@ -24,10 +26,14 @@
 
 Player::Player () {
+  // cout << "Player::Player" << endl;
   xCor = yCor = zCor = 0;
+  shootLaser = new ShootLaser;
+  shootRocket = new ShootRocket;
 }
 
-
-
-Player::~Player () {}
+Player::~Player () 
+{
+  //delete shootLaser;
+}
 
 
@@ -37,11 +43,20 @@
 }
 
-void Player::getPosition(float* x, float* y, float* z) 
+
+void Player::getPosition(float* x, float* y, float* z)
 {
   *x = xCor; *y = yCor; *z = zCor;
 }
 
+
+void Player::setCollisionRadius(float radius) 
+{
+  collisionRadius = radius;
+}
+
+
 void Player::goX(float x) 
 {
+  //cout << "Player::goX" << endl;
   xCor += x;
 }
@@ -58,24 +73,92 @@
 }
 
-void Player::shoot(int n) {
+void Player::shoot(int n) 
+{
+    shootLaser->addShoot(xCor,yCor+1.0,5);
+    //shootLaser->addShootExt(xCor,yCor,zCor,.1,.4,.0);
+    //shootLaser->addShootdExt(xCor,yCor,zCor,-.1,.4,.0);
+    shootRocket->addBackParable(xCor,yCor,zCor);
+
+
+
 }
-
 
 //void Player::addIO(InputOutput *io) {}
 
 
-void Player::drawPlayer(void) 
+void Player::drawPlayer(float a, float b) 
 {
-  //cout << "Player::drawPlayer()" << endl;
-  //glColor3f(0.0, 0.9, 0.7);
-  //glRectf(-0.5 + yCor, -0.5 + xCor, 0.5 + yCor, 2.0 + xCor);
-
+  
+  /*glPushMatrix();
+  glTranslatef(xCor, yCor, 3.0);
+  glScalef(1.0, 3.0, 1.0);
+  glutWireCube(1.0);
+  glPopMatrix();*/ 
   glPushMatrix();
-  glScalef(1.0, 3.0, 1.0);
-  glTranslatef(xCor, yCor, 3.0);
-  glutWireCube(1.0);
-  glPopMatrix();
+  //glEnable(GL_DEPTH_TEST);
+  glTranslatef(xCor,yCor,5.0);
+  glRotatef(3*a,1.0,0.0,0.0);
+  glRotatef(3*b,0.0,1.0,0.0);
+  //glTranslatef(xCor,yCor,3.0);
+  glBegin(GL_QUADS);
+  glColor3f(1.0,0.0,0.0);
+  glNormal3f(-1.0,0.0,0.0);
+  glVertex3f(-1.0,-1.0,-1.0);
+  glVertex3f(-1.0,-1.0,1.0);
+  glVertex3f(-.6,1.0,0.4);
+  glVertex3f(-.6,1.0,-0.4);
+  
+  glNormal3f(0.0,-1.0,0.0);
+  glColor3f(0.0,1.0,0.0);
+  glVertex3f(-.6,1.0,.4);
+  glVertex3f(-.6,1.0,-.4);
+  glVertex3f(.6,1.0,-.4);
+  glVertex3f(.6,1.0,.4);
+  
+  glNormal3f(-1.0,0.0,0.0);
+  glColor3f(0.0,0.0,1.0);
+  glVertex3f(.6,1.0,.4);
+  glVertex3f(.6,1.0,-.4);
+  glVertex3f(1.0,-1.0,-1.0);
+  glVertex3f(1.0,-1.0,1.0);
+  
+  
+  
+  glEnd();
+  glPopMatrix(); 
+  
+  
+  
+  
+  
+  /* draw all the shoots additionaly */
+  shootLaser->drawShoot();
+  shootRocket->drawShoot();
+  //cout << "Player::drawPlayer" << endl;
+}
 
 
-  //cout << "x: " << xCor << " y: " << yCor << endl;
-}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Index: orxonox/branches/dave/core/player.h
===================================================================
--- orxonox/branches/dave/core/player.h	(revision 1885)
+++ orxonox/branches/dave/core/player.h	(revision 1994)
@@ -6,5 +6,7 @@
 #include <GL/glut.h>
 
-//#include "input_output.h"
+#include "shoot_laser.h"
+#include "shoot_rocket.h"
+#include "data_tank.h"
 
 class Player {
@@ -14,6 +16,18 @@
   ~Player ();
 
+  /* position of the spacecraft */
+  float xCor;
+  float yCor;
+  float zCor;
+  
+  float collisionRadius;
+
+  /* this player wanna shoot? so include a ref to ShootLaser */
+  ShootLaser* shootLaser;
+  ShootRocket* shootRocket;
+
   void setPosition(float x, float y, float z);
   void getPosition(float* x, float* y, float* z);
+  void setCollisionRadius(float radius);
   void goX(float x);
   void goY(float y);
@@ -21,12 +35,7 @@
   void shoot(int n);
   //  void addIO(InputOutput *io);
-  void drawPlayer(void);
+  void drawPlayer(float a, float b);
 
  private:
-  /* position of the space craft */
-  float xCor;
-  float yCor;
-  float zCor;
-
 
 
Index: orxonox/branches/dave/core/proto_class.h
===================================================================
--- orxonox/branches/dave/core/proto_class.h	(revision 1885)
+++ orxonox/branches/dave/core/proto_class.h	(revision 1994)
@@ -3,8 +3,9 @@
 #define PROTO_CLASS_H
 
+#include "data_tank.h"
 
 class ProtoClass {
 
- private:
+ public:
   ProtoClass ();
   ~ProtoClass ();
Index: orxonox/branches/dave/core/world.cc
===================================================================
--- orxonox/branches/dave/core/world.cc	(revision 1885)
+++ orxonox/branches/dave/core/world.cc	(revision 1994)
@@ -1,3 +1,2 @@
-
 
 /* 
@@ -33,4 +32,6 @@
   lastNPC = null;
   lastEnv = null;
+  primitiveMove = 0;
+  step = 0;
 }
 
@@ -104,4 +105,41 @@
 
 /** 
+   \brief Remove Non-Player Character
+   \param player A reference to the new npc object
+   
+   Remove a new Non-Player-Character to the game.
+*/
+bool World::removeNPC(NPC* npc) {
+
+  npcList* npcRef = lastNPC;
+  npcList* lastRef = lastNPC;
+  while ( npcRef != null ) 
+    {
+      if ( npcRef->npc == npc ) {
+	cout << "found" << endl;
+	if ( npcRef == lastRef ) {
+	  lastNPC = lastNPC->next;
+	  delete npcRef;
+	  npcRef = lastNPC;
+	  lastRef = lastNPC;
+	}
+	else {
+	  lastRef->next = npcRef->next;
+	  delete npcRef;
+	  npcRef = lastRef->next;
+	}
+	cout << "killed ..." << endl;
+      }
+      else {
+	lastRef = npcRef;
+	npcRef = npcRef->next;
+      }
+    }
+  cout << "npc left" << endl;
+}
+
+
+
+/** 
    \brief Add environmental object
    \param player A reference to the new env object
@@ -127,14 +165,4 @@
 
 
-/** 
-   \brief Remove Non-Player-Character
-   \param player A reference to the new npc object
-   
-   Remove a new Non-Player-Character to the game.
-*/
-bool World::removeNPC(NPC* npc) {
-  cout << "World::removeNPC not implemented yet" << endl;
-}
-
 
 
@@ -144,6 +172,12 @@
    Calls the draw function of all: Objects, Players, Environement. This is the core of all graphics here.
 */
-void World::drawWorld(void) 
-{
+void World::drawWorld(float Zahl1,float Zahl2) 
+{
+  glLoadIdentity();
+  gluLookAt(0.0, -14.0 + DataTank::yOffset, 15.0, 0.0, 0.0 + DataTank::yOffset, 0.0, 0.0, 1.0, 0.0);
+
+  //glRotatef(Zahl1,1.0,0.0,0.0);
+  //glRotatef(Zahl2,0.0,1.0,0.0);
+  
   /* first draw all players */
   playerList* tmpPlayer = lastPlayer;
@@ -151,5 +185,5 @@
   while( tmpPlayer != null ) 
     {
-      (*tmpPlayer->player).drawPlayer();
+      (*tmpPlayer->player).drawPlayer((float)Zahl1,(float)Zahl2);
       tmpPlayer = tmpPlayer->next;
     }
@@ -161,6 +195,6 @@
       tmpNPC = tmpNPC->next;
     }
+
   /* now draw the rest of the world: environement */
-  /* second draw all npcs */
   envList* tmpEnv = lastEnv;
   while( tmpEnv != null )
@@ -169,26 +203,18 @@
       tmpEnv = tmpEnv->next;
     }
-
-  /*
-  glColor3f(0.0, 1.0, 0.0);
+  
+  /* draw the ground grid  */
+  glColor3f(0.3, 0.3, 0.0); 
   glBegin(GL_LINES);
-  for (int x = 0; x <= 35; x += 5)
-    {
-      glVertex3f((float)x, -10.0, 0.0);
-      glVertex3f((float)x, 200.0, 0.0);
-
-      glVertex3f(-(float)x, -10.0, 0.0);
-      glVertex3f(-(float)x, 200.0, 0.0);
-    }
-  for (int x = -10; x<= 200; x += 5)
-    {
-      glVertex3f(-50.0, (float)x, 0.0);
-      glVertex3f(50.0, (float)x, 0.0);
+  /* for the moment, we've got only pseudo moving ground 
+  for (int y = 0; y < 60; y += 2)
+    {
+      for (int x = 0; x < 60; x += 2)
+	{
+	  glVertex3f((float)(x - 30), (float)(y - 30), surface[x][y]);
+	  glVertex3f((float)(x - 28), (float)(y - 30), surface[x+2][y]);
+	}
     }
   glEnd();
-  */
-  
-  
-  glColor3f(0.0, 1.0, 0.0);
   
   glBegin(GL_LINES);
@@ -201,17 +227,16 @@
 	}
     }
-  glEnd();
-  
-  
-  glBegin(GL_LINES);
-  for (int y = 0; y < 60; y += 2)
-    {
-      for (int x = 0; x < 60; x += 2)
-	{
-	  glVertex3f((float)(x - 30), (float)(y - 30), surface[x][y]);
-	  glVertex3f((float)(x - 28), (float)(y - 30), surface[x+2][y]);
-	}
-    }
-  glEnd();
+  glEnd();*/
+
+  //primitiveMove+=0.07;
+  DataTank::yOffset += step;
+
+  tmpPlayer = lastPlayer;
+  while( tmpPlayer != null ) 
+    {
+      tmpPlayer->player->yCor += step;
+      tmpPlayer = tmpPlayer->next;
+    }
+
   
 }
@@ -231,4 +256,12 @@
 
 
+void World::setWorldStep(float step)
+{
+  this->step = step;
+  cout << "setting speed to " << step << endl;
+}
+
+
+
 /** 
    \brief Updates the world and all its objects
@@ -241,4 +274,90 @@
   
 
+}
+
+
+/* collision detection */
+/* fix: bad efficency: stupid brute force */
+
+void World::detectCollision() 
+{
+  //cout << "World::detectCollision" << endl;
+  float xOff, yOff, zOff, radius;
+  npcList* tmpNPC, *tmpRef;
+
+  //cout << "World::detectCollsions" << endl;
+  /* first: check if any player's shoots trigger a collision */
+  playerList* tmpPlayer = lastPlayer;
+  Player* player = tmpPlayer->player;
+  int state;
+  while( tmpPlayer != null ) 
+    {
+      tmpNPC = lastNPC;
+      while( tmpNPC != null )
+	{
+	  //cout << "npc != null" << endl;
+	  radius = tmpNPC->npc->collisionRadius;
+	  //cout << "worki" << endl;
+	  ShootLaser::shoot* shoota = tmpPlayer->player->shootLaser->lastShoot;
+	  while( shoota != null )
+	    {
+	      xOff = shoota->xCor - tmpNPC->npc->xCor;
+	      yOff = shoota->yCor - tmpNPC->npc->yCor;
+	      zOff = shoota->zCor - tmpNPC->npc->zCor;
+	      if ( sqrt(xOff*xOff + yOff*yOff + zOff*zOff) < radius ) 
+		{
+		  //cout << "COLLISION " << endl;
+		  int state = tmpNPC->npc->hit();
+		  /* state is a value that marks if the ship dies or not */
+		  /* if state == 0 the ship dies and we have to remove it */
+		  /*
+		  if ( state == 0 ) {
+		    tmpRef = tmpNPC;
+		    tmpNPC = tmpNPC->next;
+		    removeNPC(tmpRef->npc);
+		    break;
+		  }
+		  */
+		}
+	      shoota = shoota->next;
+	    }
+	  //cout << "changing npc..." << endl;
+	  tmpNPC = tmpNPC->next;
+	  //cout << "..changing npc done" << endl;
+	}
+      //cout << "changing play..." << endl;
+      tmpPlayer = tmpPlayer->next;
+      //cout << "changing play done" << endl;
+    }
+
+  //cout << "World::detectCollisions middle" << endl;
+
+  /* second: check if any player hits an enemy */
+  tmpPlayer = lastPlayer;
+  while( tmpPlayer != null ) 
+    {
+      tmpNPC = lastNPC;
+      while( tmpNPC != null )
+	{
+ 	  radius = tmpNPC->npc->collisionRadius + tmpPlayer->player->collisionRadius;
+	  xOff = tmpPlayer->player->xCor - tmpNPC->npc->xCor;
+	  yOff = tmpPlayer->player->yCor - tmpNPC->npc->yCor;
+	  zOff = tmpPlayer->player->zCor - tmpNPC->npc->zCor;
+	  if ( sqrt(xOff*xOff + yOff*yOff + zOff*zOff) < radius ) {
+	    //cout << "COLLISION " << endl;
+	    tmpNPC->npc->hit();
+	  }
+	  
+	  tmpNPC = tmpNPC->next;
+	}
+      
+      tmpPlayer = tmpPlayer->next;
+    }
+  
+  
+
+  /* third: check if any enemy shoots a player */
+
+  //cout << "World::detectCollisions end" << endl;
 }
 
Index: orxonox/branches/dave/core/world.h
===================================================================
--- orxonox/branches/dave/core/world.h	(revision 1885)
+++ orxonox/branches/dave/core/world.h	(revision 1994)
@@ -6,9 +6,14 @@
 
 #include <stdlib.h>
+#include <cmath>
+
 
 #include "npc.h"
 #include "player.h"
 #include "environment.h"
+#include "shoot_laser.h"
+#include "shoot_rocket.h"
 #include "stdincl.h"
+#include "data_tank.h"
 
 class World {
@@ -17,4 +22,6 @@
   World ();
   ~World ();
+
+  float primitiveMove;
 
   /* for easier use: map the first two player here */
@@ -47,20 +54,24 @@
   envList* lastEnv;
 
+
+
+
   bool addPlayer(Player* player);
   bool removePlayer(Player* player);
   Player* getLocalPlayer();
-
   bool addNPC(NPC* npc);
   bool removeNPC(NPC* npc);
-
   bool addEnv(Environment* env);
 
-  void drawWorld(void);
+  void drawWorld(float Zahl1, float Zahl2);
   void initEnvironement(void);
+  void setWorldStep(float step);
   void updateWorld(void);
+  void detectCollision(void);
   void testThaTest(void);
 
  private:
   float surface[120][120];
+  float step;
 
 
