Jump to content
  • Advertisement
Sign in to follow this  
Keyeszx

Not sure how to phrase this question.

This topic is 2120 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've seen some tutorials that go over the basics of making a game engine and then making pong or snake using that game engine. I was wondering if there was a basic overview of the game engine development process.

 

Like from what I've seen most start off with a game class and set up a window then the game loop. Somewhere along the line sprite class, input handling class, etc.

 

Is there a list of most likely components necessary for a game engine? Also, I see these tuts set up the screen in the game class. Cant' they do that in the window class or would that make it too specific to be used in another project?

Share this post


Link to post
Share on other sites
Advertisement

I've seen some tutorials that go over the basics of making a game engine and then making pong or snake using that game engine. I was wondering if there was a basic overview of the game engine development process.

 

Like from what I've seen most start off with a game class and set up a window then the game loop. Somewhere along the line sprite class, input handling class, etc.

 

Is there a list of most likely components necessary for a game engine? Also, I see these tuts set up the screen in the game class. Cant' they do that in the window class or would that make it too specific to be used in another project?

 

I cannot recommend http://www.gameenginebook.com/ highly enough, (Game Engine Architecture by Jason Gregory), it's a superb book. Although it'll focus on the big components that make up highly professional AAA-esque game engine, and will probably gloss over things like line drawing and setting up windows a little, etc.

Share this post


Link to post
Share on other sites

I've seen some tutorials that go over the basics of making a game engine and then making pong or snake using that game engine. I was wondering if there was a basic overview of the game engine development process.

 

Like from what I've seen most start off with a game class and set up a window then the game loop. Somewhere along the line sprite class, input handling class, etc.

 

Is there a list of most likely components necessary for a game engine? Also, I see these tuts set up the screen in the game class. Cant' they do that in the window class or would that make it too specific to be used in another project?

Yes you can, I did this differently I start with a BaseApplication class that contains the main loop and from there construct the RenderSystem which owns the display window for example.

int APIENTRY _tWinMain(HINSTANCE hInstance,
                       HINSTANCE hPrevInstance,
                       LPTSTR    lpCmdLine,
                       int       nCmdShow)
{    
    bool useCG = true;    //Before everything setup the log path
    LogManager* lm = LogManager::getInstance();
    if (lm)
    {
        lm->setLogPath(Util::Path::instance().getLogPath());
        Application& theGame = Application::instance();
        theGame.setupLogChannels();
        theGame.initialise("DLExampleApplication.cfg", false);
        theGame.enumerateInputDevices();
        theGame.mainGameLoop();

        DeviceManager::getInstance().cleanup();
        SettingsManager::getInstance().cleanup();
        theGame.cleanup();

        lm->cleanup();
        delete lm;
    }
        return 0;
}

And the application code can be found here: http://code.google.com/p/dxengine/source/browse/trunk/src/BaseApplication.cpp

 

Now don't take this code as being completely corect as it contains flaws and is old like 2010, in my current projects it's slightly better but that is not online at the moment so can't show you.

 

This is only one way you can do this, most tutorials are written from the point of sample code and as little of it as possbile because explaining how the construct behind it works is more important to the tutorial, especially the online ones.

Edited by NightCreature83

Share this post


Link to post
Share on other sites

In the case of the Quake engine, for example, having a window isn't requisite for the game to run. Thus, a 'dedicated' game server can run the game (for clients to connect to) without any rendering window being open - loading assets, executing game logic, etc.. In my mind, the goal of engine design is simply minimizing code interdependence and compartmentalizing everything. Engines are to games as OOP/OOD is to programming, in a sense.

 

Each functioning piece of an engine should be as easily re-writable, replaceable, etc.. without having to do a whole lot to the rest of the engine as a whole. It is only a fact of life that there is a hierarchical nature to engines, and that some things rely on others, and this is sometimes disrupting (for me) in the whole model of avoiding interdependence, but is simply just the way things are.

 

I'd suggest focusing on simplicity, being that it sounds like you're doing this strictly for the novelty of it, so you may as well make it as bearable and entertaining as possible in the meantime.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!