Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Implementation on existing C++ Game Engine

Options
  • 30-10-2006 11:57am
    #1
    Closed Accounts Posts: 408 ✭✭


    Just wondering does anyone have any useful guides for implementing different games into the one engine in C++ ?

    My final year project is on testing out an SDL tile based C++ engine to run a different type of game than the original 2D Zelda-clone it was created for. The engine is frozen so i was looking for a guide to keep me on track, as i'm still learning the basics.

    Any help much appreciated,

    Cheers,

    dan


Comments

  • Registered Users Posts: 2,082 ✭✭✭Tobias Greeshman


    If the engine is complete and working well, then to develop a new game using the engine should surely be a task of creating the maps for the new game, sprite's/models and content for the new game. The engine should do all the work by simply making calls to the engine from your new games code (game loop, graphics, sound, input, even networking if the engine supports it).

    What exactly do you mean by the engine is frozen? Do you not have access to the source (just dlls or exe)?


  • Closed Accounts Posts: 408 ✭✭Chada


    Sorry I must'nt have been clear, the engine is frozen as in i'm not allowed to modify it for my project. I have access to all the source, but in creating a totally different style of game i'm finding it difficult in implementing anything into the exisitng engine. I'm familiar with programming, but im still learning C++, so I just wanted to know if there were any step by step guides out there for implementing an open source game into my engine. A basic guide line of Do's and Dont's possibely.

    Also, im a bit new to sourceforge.net and i don't quite follow what it means by compile the "make" file to install. There are only a makefile and makefile.ini files in the open source implementation i got, and Ive tried compiling these in DEV C++ and borland IDEs with no avail.

    Could anyone help me, im a noob :)

    Regards,

    Dan


  • Registered Users Posts: 2,082 ✭✭✭Tobias Greeshman


    I'm not sure if you could find any step-by-step guides as each engine in different. You could have a look at games source that use a particular engine and analyse the source to see how they use their engine, and once you begin to understand it, then you can have a better idea how to use your engine with the new game you'll be writing.

    Have a look at http://www.gamedev.net that always has some pretty good stuff over there.

    Are you sure you have the win32 version from sourceforge?

    The makefiles sound like unix makefiles. If you can't get a visual studio, borland version of it then, create a new project and add the source files to the project, you may also need to add in references to extra libraries (eg. SDL) to get the source compiled.


  • Closed Accounts Posts: 408 ✭✭Chada


    Wow thats could well be the problem , although i says platform independant i usually ignored it and went straight for the source title. Yeah cheers man, il definately have a look there, my engine is in C++ btw using SDL libraries for low level sounds etc.

    The game was originally top-down 2D zelda clone and im trying for a 2d-side shooter, so hope il be able to implement something eventually on this damn engine :)

    Cheers,

    daN


  • Registered Users Posts: 5,112 ✭✭✭Blowfish


    Chada wrote:
    The game was originally top-down 2D zelda clone and im trying for a 2d-side shooter, so hope il be able to implement something eventually on this damn engine :)
    daN
    Depending on how it is written, you may not be able to change it from the overhead view. It probably wouldn't be too difficult to turn it into an overhead racing game though.


  • Advertisement
  • Closed Accounts Posts: 408 ✭✭Chada


    Funny you should mention that blowfish, a top-down tank shoot-em up similar to urban strike was one of my possible concepts!

    I'm trying to make it as "alternative to Zelda" as possible, hence thats why I opted for the 2d-scroller.

    What criteria would i need to assess whether it was able for my intial idea ?

    Regards,

    dan


  • Registered Users Posts: 5,112 ✭✭✭Blowfish


    You pretty much will just have to look at the code and see how the overhead view is integrated in. An example may be that there is a limit on the size of the world, which may be big enough for overhead games, but not wide enough for a side scroller.


  • Registered Users Posts: 2,320 ✭✭✭Q_Ball


    Blowfish wrote:
    Depending on how it is written, you may not be able to change it from the overhead view. It probably wouldn't be too difficult to turn it into an overhead racing game though.

    Exactly. Any kind of 2D overhead game would be easier than a side scrolling game (think smash tv and commando)

    It might be possible to do a side scolling game with a bit of out-of-the-box thinking and a few assumptions.

    Assumption 1: You can add to the engine. A physics element to handle gravity comes to mind. Other objects like platforms, enemies and weapons would also be necessary.
    Assumption 2: You can modify the engine without touching the source (such as changing keyboard commands etc)

    Providing you can do this, it shouldn't be too hard*. At a high level you would need to replace the sprites with your sprites, implement a physics engine that simulates gravity (nothing too complex, just something that ensures everything falls towards the bottom of the screen), implement behaviours for AI (point and shoot) and the like. Systems, such as your input, rendering, sound etc, should all be provided for you by the engine already to the point where you only need to add your own. Once the controls aren't hard-coded (hopefully they're set up like bind files in games like half-life) you should be high and flying.

    Best thing to do with any project is to firstly identify the incremental milestones that will take the project from conception to completion and then choose a correct methodology. Your milestones could be like
    • Display the side-scrolling background only
    • Add a character
    • check that input works fine
    At this point you would have a milestone (and each milestone might have mini-milestones in a hierarchical fashion) for each element you want to add in place until everything is implelented and functioning. You could also have all-emcompassing ones, such as
    • Add sounds
    That encompass adding all the sounds as opposed to one or a few at a time. This could also be a hierarchical milestone.

    The nice thing about this is that you can set yourself as many or as few milestones as you need. Be warned, too many milestones can be just as bad as having too few. Its up to you to strike a balance and find the correct methodology to implement them.

    And remember to draw up a proper unit / integration / regression test for each milestone. Aim for at least unit tests for all of them and maybe a system after each. Examiners LOVE properly tested code :)

    Sorry for going OT, I'll shut up now.

    *This may or may not be true


  • Closed Accounts Posts: 408 ✭✭Chada


    Guys you have been alot of help, thanks alot :)

    I'll keep on cracking, and hopefully see if i can come up with something that fits the bill!

    Happy halloween btw :)

    Dan


Advertisement