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

Author Topic: How to manage different screens?  (Read 2915 times)

0 Members and 2 Guests are viewing this topic.

Poraft

  • Newbie
  • *
  • Posts: 24
    • View Profile
How to manage different screens?
« on: March 13, 2012, 12:53:35 am »
Hello guys,

I just can't figure it out, what is a proper way of using multiple screens. By this I mean a flash screen, menu, in-game, options etc.

Can someone explain this to me?

Thx in advance.

Orwel

  • Full Member
  • ***
  • Posts: 208
    • View Profile
How to manage different screens?
« Reply #1 on: March 13, 2012, 01:10:40 am »
Make seach on "Game State Pattern".

But menu to option, i think you can use as state  :wink:

Orwel

  • Full Member
  • ***
  • Posts: 208
    • View Profile
How to manage different screens?
« Reply #2 on: March 13, 2012, 01:12:32 am »
Make seach on "Game State Pattern".

But menu to option, i think you can use as state  :wink:

Quote
using multiple screens


I dont undertand exactely this sentence  :?

Tex Killer

  • Full Member
  • ***
  • Posts: 242
    • View Profile
How to manage different screens?
« Reply #3 on: March 13, 2012, 04:36:22 am »
You can control the time (with sf::Clock) and then decide on what to print based on that. You can also control input events and use them to manage the menu options.

If you want something automatic, you should search for a game engine instead.

Bigz

  • Full Member
  • ***
  • Posts: 154
    • View Profile
    • Bigz.fr
How to manage different screens?
« Reply #4 on: March 13, 2012, 09:48:26 am »
Maybe this part of the wiki can help you -> https://github.com/SFML/SFML/wiki/TutorialScreens

Poraft

  • Newbie
  • *
  • Posts: 24
    • View Profile
How to manage different screens?
« Reply #5 on: March 13, 2012, 03:34:20 pm »
Game State Pattern; this is what I was searching for. Thanks