[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
Slick Forums • View topic - [IDEA] pause states

Slick Forums

Discuss the Slick 2D Library
It is currently Thu Jul 29, 2021 7:32 pm

All times are UTC




Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: [IDEA] pause states
PostPosted: Thu Jun 28, 2012 1:07 pm 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
Simply because you want to use the post and pre methods. Like davedes said. Mabye so if you pause the game only a String is drawn. This is good if you want to pause the game, and stop rendering to leave CPU/GPU alone so you can switch to other apps while the game does nothing to drain the CPU/GPU.

_________________
Current Projects:


Projects:
- Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Thu Jun 28, 2012 1:33 pm 
Offline
Regular

Joined: Sun Oct 30, 2011 4:47 pm
Posts: 184
Location: Mittweida, Saxony, Germany
Just keep the following in mind:

You don't want to force the user to keep running the update/render loop. But you want to force every user to put up with this pausing implementation in the game class, no matter if its needed or not.

Also I still don't get why its needed to stop the calls to the GameStates when the game is paused. If the GameState is aware of the paused flag you just stop the updating/rendering there. You still can use your pre*/post* functions in the StateBasedGame without any difference.

Nitram


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Thu Jun 28, 2012 3:24 pm 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
What? I don't force anybody with the code to use it. It's just a few new methods oO Nobody must use them. That it the genrel course of a framework. We offer the user functionality.

Read the post from davedes on carefully again. Forwarding the pause to the state, will ONLY (again, ONLY) this current state. As soon as you switch states (which can be done even if the state is paused), the new current state is not paused anymore. That is a feature the user can use of course. But it should work trough the StateBasedGame. If I tell the StateBasedGame to stop calling update on the current state and so, on all current states even on switching it should do exaclty that. You can still call pause on the GameState by using getState().pause(). How is this not flexible???

It's a addional feature, those you want to use it, use it. Anybody else does not use...

_________________
Current Projects:


Projects:
- Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Thu Jun 28, 2012 4:38 pm 
Offline
Regular

Joined: Sun Oct 30, 2011 4:47 pm
Posts: 184
Location: Mittweida, Saxony, Germany
Its a additional feature that lingers around in any application using the StateBasedGame. No way to avoid the overhead created by the implementation.

Still I fail to see the difference to blocking the updates/rendering in the GameStates and not in the StateBasedGame. But maybe I just overlook something.

Nitram


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Sat Jun 30, 2012 6:56 pm 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
Okay, 2 bools... We shouldn't talk like this... If we talk about useless "additional Festures", I can name plenty I (I, ME) think are useless :) For a Game Framework Slick2D lags a lot of usefull "game" stuff if you ask me. Everytime I look at the RPG Maker I think that the developer of this engine where smart as hell.

I will just implement it, since it will ad usefull stuff for does you care about a more complex handling. btw this idea came from some students I teached Slick2D.

I really don't think people will be picking our eyes out over 2 new boolean they can use. I named a lot of uses and davedes named a lot of possible Feature you can do with this change :p

_________________
Current Projects:


Projects:
- Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Wed Jul 04, 2012 6:07 pm 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
Added this feature just now, a test is also available.

_________________
Current Projects:


Projects:
- Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Thu Jul 05, 2012 1:35 am 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1482


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Thu Jul 05, 2012 9:02 am 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
The main problem is, StateBasedGame is pretty much closed to the dev. update and render are both final which makes it impossible to make your own thing work with pausing (if you want it). The only thing you can do is to copy all the Code of StateBasedGame and implement your own code (assuming you don't want to change the source). Also transitions rely on StateBasedGame, so you kinda HAVE to use it if you want work with it.

Pausing in Game and BasicGame made no sense so I left it open. Pausing should be a StateBasedGame feature (I don't know hoe Pauseable slipped into the util package...)

You can revert it if you want :) I thought it would be useful and give you more control over the StateBasedGame.

_________________
Current Projects:


Projects:
- Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Mon Jul 23, 2012 5:21 am 
Offline
Game Developer
User avatar

Joined: Wed Feb 17, 2010 12:24 am
Posts: 598


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Mon Jul 23, 2012 8:01 am 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
And how do you stop a specific state with this code?

And as said, just revert it ;) I still find it very useful but I actually don't want to argue about it.

_________________
Current Projects:


Projects:
- Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Fri Jul 27, 2012 3:09 pm 
Offline

Joined: Sat Jun 23, 2012 4:14 pm
Posts: 74
Location: Germany


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Fri Jul 27, 2012 4:47 pm 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
I already tried that in my previous post, just read them :) (I personally use stop rendering or a pause option where no rendering happens so the application dos not drain the GPU/CPU)

_________________
Current Projects:


Projects:
- Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
 Post subject: Re: [IDEA] pause states
PostPosted: Sun Jul 29, 2012 12:40 pm 
Offline

Joined: Sat Jun 23, 2012 4:14 pm
Posts: 74
Location: Germany


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 28 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group