Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FadeTo transitional game state stack weirdness #22

Open
erisdev opened this issue Feb 26, 2011 · 2 comments
Open

FadeTo transitional game state stack weirdness #22

erisdev opened this issue Feb 26, 2011 · 2 comments

Comments

@erisdev
Copy link
Contributor

erisdev commented Feb 26, 2011

I've found that with a transitional game state set, pushing a new state then popping it back results in a new copy of the previous state being pushed onto the stack. Behold my hypothetical situation:

  1. TitleScreen

push_game_state OptionsMenu
  1. OptionsMenu
  2. TitleScreen

pop_game_state
  1. TitleScreen
  2. TitleScreen

I can't quite pinpoint it, but it seems to be a logic error in either GameStateManager#pop_game_state or #switch_game_state.

@ippa
Copy link
Owner

ippa commented Feb 26, 2011

ye I'm actually not sure it has ever worked 100% perfect.. the example demoing it does what it should do. I'm thinking of deprecating it. I like the idea of having automatic fades though but maybe it was a misstake trying to implement it as a game state.

I'm off for vacation now for a week, maybe I can find time looking it at when I get back.

@erisdev
Copy link
Contributor Author

erisdev commented Feb 26, 2011

I never used it so I wasn't aware it was broken until tonight. I actually noticed it when I ran the demo and double checked it with a little self-written code. Haven't found any other glaring problems so far.

I agree that it was probably not a good idea to implement as a game state. I'll try to investigate other possibilities, but I've got a few things on my plate in Real Life™ right now so we'll see.

Hope you have a good vacation!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants