Index: /trunk/src/defs/class_id.h
===================================================================
--- /trunk/src/defs/class_id.h	(revision 7166)
+++ /trunk/src/defs/class_id.h	(revision 7167)
@@ -335,17 +335,10 @@
   CL_QUICK_ANIMATION            =    0x00000e02,
 
-  CL_FACTORY                    =    0x00000e03,
-  CL_FAST_FACTORY               =    0x00000e01,
-  CL_LOAD_PARAM                 =    0x00000e07,
+  CL_FACTORY                    =    0x00e01000,
+  CL_FAST_FACTORY               =    0x00000ea2,
+  CL_LOAD_PARAM                 =    0x00000ea3,
+  CL_DYNAMIC_LOADER             =    0x00000ea8,
 
   CL_INI_PARSER                 =    0x00000e04,
-
-  CL_TRACK_ELEMENT              =    0x00000e0b,
-  CL_LIST                       =    0x00000e05,
-  CL_SUBSTRING                  =    0x00000e06,
-  CL_CURVE                      =    0x00000e08,
-  CL_CHARACTER_ATTRIBUTES       =    0x00000e0a,
-  CL_NUMBER                     =    0x00000e0c,
-  CL_EXECUTOR                   =    0x00000e0d,
 
   CL_SHELL                      =    0x00000e10,
@@ -356,4 +349,12 @@
   CL_SHELL_COMMAND_ALIAS        =    0x00000e15,
 
+  CL_TRACK_ELEMENT              =    0x00000e2b,
+  CL_LIST                       =    0x00000e25,
+  CL_SUBSTRING                  =    0x00000e26,
+  CL_CURVE                      =    0x00000e28,
+  CL_CHARACTER_ATTRIBUTES       =    0x00000e2a,
+  CL_NUMBER                     =    0x00000e2c,
+  CL_EXECUTOR                   =    0x00000e2d,
+
   // Spatial Data Separation
   CL_SPATIAL_SEPARATION         =    0x00000e0d,
Index: /trunk/src/orxonox.cc
===================================================================
--- /trunk/src/orxonox.cc	(revision 7166)
+++ /trunk/src/orxonox.cc	(revision 7167)
@@ -289,4 +289,5 @@
 }
 
+#include "dynamic_loader.h"
 
 /**
@@ -330,4 +331,6 @@
   ResourceManager::getInstance()->addImageDir(imageDir);
   delete[] imageDir;
+
+  DynamicLoader::loadDyLib("libtest.so");
 
   // start the collision detection engine
Index: /trunk/src/util/Makefile.am
===================================================================
--- /trunk/src/util/Makefile.am	(revision 7166)
+++ /trunk/src/util/Makefile.am	(revision 7167)
@@ -6,5 +6,4 @@
 libORXutils_a_SOURCES = fast_factory.cc \
 			object_manager.cc \
-                        loading/factory.cc \
 			state.cc \
 			hud.cc \
@@ -20,4 +19,6 @@
 			loading/load_param.cc \
 			loading/load_param_description.cc \
+			loading/factory.cc \
+			loading/dynamic_loader.cc \
 			\
 			track/pilot_node.cc \
@@ -38,8 +39,9 @@
 			\
 			loading/resource_manager.h \
-			loading/factory.h \
 			loading/game_loader.h \
 			loading/load_param.h \
 			loading/load_param_description.h \
+			loading/factory.h \
+			loading/dynamic_loader.h \
 			\
 			track/pilot_node.h \
Index: /trunk/src/util/loading/dynamic_loader.cc
===================================================================
--- /trunk/src/util/loading/dynamic_loader.cc	(revision 7167)
+++ /trunk/src/util/loading/dynamic_loader.cc	(revision 7167)
@@ -0,0 +1,80 @@
+/*
+   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: Benjamin Grauer
+   co-programmer: ...
+*/
+
+#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_LOADING
+
+#include "dynamic_loader.h"
+
+
+#include <dlfcn.h>
+
+
+using namespace std;
+
+
+/**
+ * standard constructor
+ * @todo this constructor is not jet implemented - do it
+*/
+DynamicLoader::DynamicLoader (const std::string& libName)
+    : Factory(NULL, CL_NULL)
+{
+  this->setClassID(CL_DYNAMIC_LOADER, "DynamicLoader");
+
+  this->handle = NULL;
+
+  if (loadDynamicLib(libName));
+  this->setName(&libName[0]);
+}
+
+
+/**
+ * standard deconstructor
+*/
+DynamicLoader::~DynamicLoader ()
+{
+  // delete what has to be deleted here
+  if (this->handle != NULL)
+    dlclose(this->handle);
+}
+
+
+bool DynamicLoader::loadDynamicLib(const std::string& libName)
+{
+  this->handle = dlopen(&libName[0], RTLD_NOW);
+  if(this->handle == NULL)
+  {
+    return false;
+  }
+  void *mkr = dlsym( this->handle, "maker");
+}
+
+bool DynamicLoader::loadDyLib(const std::string& libName)
+{
+  void* handle;
+  handle = dlopen(&libName[0], RTLD_NOW);
+  if(handle == NULL)
+  {
+    PRINTF(0)("unable to load %s\n", &libName[0]);
+    return false;
+  }
+//  void *mkr = dlsym("maker");
+
+}
+
+
+BaseObject* DynamicLoader::fabricateObject(const TiXmlElement* root) const
+{
+}
Index: /trunk/src/util/loading/dynamic_loader.h
===================================================================
--- /trunk/src/util/loading/dynamic_loader.h	(revision 7167)
+++ /trunk/src/util/loading/dynamic_loader.h	(revision 7167)
@@ -0,0 +1,36 @@
+/*!
+ * @file dynamic_loader.h
+ * @brief Definition of The Dynamic Loader Factory.
+*/
+
+#ifndef _DYNAMIC_LOADER_H
+#define _DYNAMIC_LOADER_H
+
+#include "factory.h"
+
+#include <string>
+
+#define DYNAMIC_LINKAGE_FACTORY(CLASS_NAME, CLASS_ID) \
+          void* DynamicCreator(const TiXmlElement* root) { return new CLASS_NAME(root); };
+
+// FORWARD DECLARATION
+
+//! A class for ...
+class DynamicLoader : public Factory
+{
+
+public:
+  DynamicLoader(const std::string& libName);
+  virtual ~DynamicLoader();
+
+  bool loadDynamicLib(const std::string& libName);
+  virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const;
+
+  static bool loadDyLib(const std::string& libName);
+
+
+private:
+  void*      handle;
+};
+
+#endif /* _DYNAMIC_LOADER_H */
Index: /trunk/src/util/loading/factory.h
===================================================================
--- /trunk/src/util/loading/factory.h	(revision 7166)
+++ /trunk/src/util/loading/factory.h	(revision 7167)
@@ -38,9 +38,11 @@
     tFactory<CLASS_NAME>* global_##CLASS_NAME##_Factory = new tFactory<CLASS_NAME>(#CLASS_NAME, CLASS_ID)
 
+// #define CREATE_DYNAMIC_FACTORY(CLASS_NAME, CLASS_ID) \
+//     tFactory<CLASS_NAME>* global_##CLASS_NAME##_Dynamic_Factory = new DynamicLoader<CLASS_NAME>(#CLASS_NAME, CLASS_ID)
+
 //! The Factory is a loadable object handler
 class Factory : public BaseObject {
 
  public:
-  Factory (const char* factoryName, ClassID classID);
   virtual ~Factory ();
 
@@ -56,4 +58,5 @@
 
   protected:
+    Factory (const char* factoryName, ClassID classID);
     virtual BaseObject* fabricateObject(const TiXmlElement* root = NULL) const = 0;
 
Index: /trunk/src/world_entities/WorldEntities.am
===================================================================
--- /trunk/src/world_entities/WorldEntities.am	(revision 7166)
+++ /trunk/src/world_entities/WorldEntities.am	(revision 7167)
@@ -4,4 +4,5 @@
 		world_entities/npcs/npc_test.cc \
 		world_entities/npcs/ground_turret.cc \
+		\
 		world_entities/environment.cc \
 		world_entities/skysphere.cc \
