Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: How to structure a game?  (Read 873 times)

0 Members and 1 Guest are viewing this topic.

Lemony Lime

  • Newbie
  • *
  • Posts: 1
    • View Profile
How to structure a game?
« 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: How to structure a game?
« Reply #1 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.

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. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything