Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members |
The NUSoftware Game Engine is intended to be an easy-to-use game engine, so this documentation is an important part of it. If you have any questions or suggestions, just send an email to the author of the engine, Tomer Nosrati aka (also known as) MasterGod.
#include "MyFirstState.hpp" #include "nge.hpp" using namespace nge; int main() { SGameCreationParameters GameParams; GameParams.caption = L"Hello World!"; GameParams.configFile = "config.ini"; GameParams.firstState = MyFirstState::Instance(); Game* game = new Game(GameParams); game->run(); delete game; return 0; }
Game.cpp
#include "Game.hpp" namespace nge { namespace core { Game::Game(SGameCreationParameters& GameParams) { m_pGameManager = new GameManager(GameParams); } Game::~Game() { if(m_pGameManager) { m_pGameManager->drop(); m_pGameManager = 0; } } bool Game::run() { if(!m_pGameManager->getDevice()) return false; SColor backBuffer = SColor(255,100,100,100); while(m_pGameManager->getDevice()->run() && m_pGameManager->getVideoDriver()) { if(m_pGameManager->getDevice()->isWindowActive()) { m_pGameManager->Update(backBuffer); } } return true; } } // namespace core } // namespace nge
As you can see, the engine uses namespaces. Everything in the engine is placed into the namespace 'nge'. You can find a list of all namespaces with descriptions at the namespaces page. This is also a good place to start reading the documentation. If you don't want to write the namespace names all the time, just use all namespaces like this:
using namespace nge; using namespace nge::audio; using namespace nge::core; using namespace nge::engine; using namespace nge::game; using namespace nge::gui; using namespace nge::io;
There is a lot more the engine can do, but I hope this gave a short overview over the basic features of the engine. For more examples, please take a look into the examples directory of the SDK.
The NUSoftware Game Engine Documentation © 2007-2008 by Tomer Nosrati. Generated
on Sat Apr 26 16:52:34 2008 by Doxygen
(1.5.5) |