SFML community forums

Help => General => Topic started by: Lemony Lime on March 03, 2014, 06:48:15 pm

Title: How to structure a game?
Post by: Lemony Lime on March 03, 2014, 06:48:15 pm
So, I have a reasonable understanding of C++ after following a few books, and there's enough info in the SFML documentation and tutorials that I can figure out what everything in the libary does... but I don't know how to actually structure a game's code. Every tutorial just throws everything in the main file and doesn't even mention actual file structure. I know generally to put "things" in classes, make a new function for each task, keep main as small as possible and all that, but that's not enough when working with games for the first time. Is there anything I can read/watch (really do prefer watch) on this that actually uses SFML?
Title: Re: How to structure a game?
Post by: eXpl0it3r on March 03, 2014, 06:58:14 pm
There are many ways to structure a game, so there's essentially no "ultimate" way.

If you want something to read, you might want to checkout the SFML Game Development book (http://www.packtpub.com/sfml-game-development/book).

Other than that, you can simply look at projects posted here on the forum or basically any kind of open source game. Looking at the source code will already reveal quite a bit of information.

As for "watching", I really can't recommend any video tutorials. ;)