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

Author Topic: Hi, I want to write a game.  (Read 2017 times)

0 Members and 1 Guest are viewing this topic.

Alter

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Hi, I want to write a game.
« on: February 09, 2017, 05:40:12 pm »
Hello, I am new to SFML. I managed to write only two little projects in it but it's not like I can't write anything. It's rather problem of resources, structure and objects management and understanding. While I do understand what's going on, I don't know how would proper object oriented structure look like, where to store every entity, how to work on them, erase when no longer needed. It's like I am having some puzzles but I can't solve it and see whole picture without missing pieces. I am completly lost. I want to learn how to write my game elegantly instead of throwing everything into main function. To learn how and where should I use components, managers, systems. What would they could do and consist of. I am completly lost and overhelmed by it. Could use some help  :-[

sjaustirni

  • Jr. Member
  • **
  • Posts: 95
    • View Profile
Re: Hi, I want to write a game.
« Reply #1 on: February 09, 2017, 06:07:22 pm »
I don't have a lot of time now, so I'll keep it short.

  • Look at source code of opensource games and learn from it. Try to identify the reasons why the implemented architecture was favored over the rest. Sometimes these decisions are made on discussions in mailing lists or (Github) issues
  • Read this thoroughly: http://gameprogrammingpatterns.com/. Try to Google more about the various approaches.
  • Implement what you have learned. Try to focus on one thing at a time. Don't be afraid to reimplement the same thing again, in a more effective and elegant way. Remember, when learning, it's not crucially important to finish the game, but to grok the idea and then move on to another thing. Once you have acquired the basic idea of what is needed for a game to be developed and have a general knowledge of various approaches, choose one project you want to finish and apply the new knowledge there. And yes, never stop learning. ;-)

Good luck :D

jamesL

  • Full Member
  • ***
  • Posts: 124
    • View Profile
Re: Hi, I want to write a game.
« Reply #2 on: February 09, 2017, 10:11:12 pm »
there are plenty of books on SFML that go into those details
https://www.packtpub.com/all?search=%22sfml%22


there's plenty of videos on SFML -- many won't go into the detail you want, but they will show how to make games 
https://www.youtube.com/results?search_query=sfml 

I think these are great videos
https://www.youtube.com/playlist?list=PLB_ibvUSN7mzUffhiay5g5GUHyJRO4DYr

he crams every game into one file
they are simple games so they don't use an entity manager

but you lean the basics of SFML and how much you can do with just a few lines of code

Mr_Blame

  • Full Member
  • ***
  • Posts: 192
    • View Profile
    • Email
Re: Hi, I want to write a game.
« Reply #3 on: February 10, 2017, 07:33:03 am »
Of if the main things, that you need to make, in order to have a good game, is story/lord/etc. (Well, until you're planning to make chess  ;))