Jump to content
  • Advertisement
Sign in to follow this  
baheebs

Game Architecture

This topic is 4891 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

Hiya, I've completed a few small game projects using C although I have known C++ for some time. I'd love to start writing games using the OO features of C++, however, and Game Coding Complete (2ed) lays out a great looking architecture, where the game is split into the application layer, game logic, and various 'game views'. This system seems massive, though, and I'm having trouble trying to find a starting point to implement this architecture. If anyone could give me a few *pointers (ho ho) on where to start, class recommendations, opinions, or just wants to say I'm taking on too much for a first OO game, please do! Thanks :)

Share this post


Link to post
Share on other sites
Advertisement
I would suggest, now that you've written some small games in C, writing some medium-sized ones in C++. Don't bite off more than you can chew...

As for engine architecture, this is really your choice, and it should be tailored to the game you're designing (assuming you're not using or creating a general-purpose game engine, that is). What do you need the game to do? Assuming a fairly standard game (not text-based, no VR goggles), you're going to need some way of consistantly:
Handling keyboard/mouse input
Drawing graphics
Loading and playing sounds and music
Loading resources like images and config files
Drawing stuff on the screen
Doing all the calculations that makes the other stuff worthwhile
And maybe doing some other stuff.

So, design your game, sit down and get a fair idea of how you want things to work, start putting things together, and don't be afraid to take things back apart if you need to.

Anyway, that's my opinion. Good luck!

Share this post


Link to post
Share on other sites
Quote:
Original post by baheebs
Hiya, I've completed a few small game projects using C although I have known C++ for some time. I'd love to start writing games using the OO features of C++, however, and Game Coding Complete (2ed) lays out a great looking architecture, where the game is split into the application layer, game logic, and various 'game views'. This system seems massive, though, and I'm having trouble trying to find a starting point to implement this architecture.

If anyone could give me a few *pointers (ho ho) on where to start, class recommendations, opinions, or just wants to say I'm taking on too much for a first OO game, please do!

Thanks :)


My recommendation (just the most effective way for me personally to learn some of this stuff) was to read as much as I could find about the topic. Books, tutorials, anything.

After that, I did like you and tried to implement some massive engine that'd be able to do everything I'd ever need, in a nice OO way of course. Honestly, I'd say skip this step.

Instead, keep all the stuff you read in mind, and then write a *simple* engine based on your own needs, and what your intuition tells you will work for your game. Keep in mind where OO is handy, but don't pretend it's a requirement. Use it when it makes sense. Abstracting everything into different layers, views or components sounds great on paper, but how important is it for a game like whatever you're planning to do? Most likely, you can get by with something a lot simpler.

So do that, build something that does what you want it to do, and *nothing* more. It doesn't have to be so clean that everyone else could just take a single look at the code and then see how it works, and it doesn't have to work for every possible game genre, and it doesn't have to be so easily extensible that people can use it 15 years from now.

Later on, you'll probably want to build a huge architecture like you describe, but if you try it now, it'll just get you stuck.

Just my personal experience. Feel free to ignore. [lol]

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!