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

Author Topic: Switching scenes  (Read 2469 times)

0 Members and 1 Guest are viewing this topic.

Lester702

  • Newbie
  • *
  • Posts: 1
    • View Profile
Switching scenes
« on: May 09, 2021, 04:39:33 pm »
I'm new to building games and using SFML and I have created a basic window with a menu and the player can choose to either play the game or exit, but my issue is once the player clicks play I need to switch the scene and move to the game scene. I've searched for hours trying to find a book or website that has a good example of implementing a state machine, but have not been successful

Stauricus

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
    • A Mafia Graphic Novel
    • Email
Re: Switching scenes
« Reply #1 on: May 09, 2021, 06:50:36 pm »
there are no scenes in SFML, but you can create it yourself if you want to.

have a look at this:
https://github.com/SFML/SFML/wiki/Tutorial:-Basic-Game-Engine

and the first SFML book also talks about state machines:
https://www.packtpub.com/product/sfml-game-development/9781849696845
Visit my game site (and hopefully help funding it? )
Website | IndieDB