Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members

NUSoftware Game Engine API documentation

0.1

DocLogo.png

Introduction

Welcome to the NUSoftware Game Engine API documentation. Here you'll find any information you'll need to develop applications with the NUSoftware Game Engine.

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.

Links

Namespaces: A very good place to start reading the documentation.
Class list: List of all classes with descriptions.
Class members: Good place to find forgotten features.

There are some rules that should be kept:

1. See also: State Machine rules for more information about the state machine design and how to add and use new base states and normal states. This rule helps to keep the base states on-top of everything.

2. Code conduct - Please keep the states names like this:
Base state: CState<StateName> e.g: CStateOptions
Normal game state: <StateName>State e.g: OptionsState

Short example

 #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
The NUSoftware Game Engine Documentation © 2007-2008 by Tomer Nosrati. Generated on Sat Apr 26 16:52:34 2008 by Doxygen (1.5.5)