Slick Forums

Discuss the Slick 2D Library
It is currently Wed Jun 19, 2013 4:44 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: min and max logic rates
PostPosted: Tue Jan 31, 2012 11:47 pm 
Offline

Joined: Tue Jan 31, 2012 11:37 pm
Posts: 1
Hello,

I am new to slick2D and I was wondering about http://slick.cokeandcode.com/wiki/doku.php?id=controlling_game_updates

My first goal when making a game is to reach a constant logic rate with a maximum rendering rate. So reading about minimumLogicRate and maximumLogicRate, these functions appear to be obvious but only if both are set to same value, is there any interest setting both with different rate values ?


Top
 Profile  
 
PostPosted: Thu Feb 02, 2012 12:38 am 
Offline

Joined: Tue Jan 03, 2012 5:48 pm
Posts: 11
While I'm actually a beginner too, I suppose one could want to make it so the game tries to update at LEAST every 30th of a second, but they want to cap it at 60, so it doesn't look jumpy on the FPS.

I don't know really, but that's just my guess :P


Top
 Profile  
 
PostPosted: Thu Feb 02, 2012 6:44 am 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
I think Crockeo is right, the updates are bounded as described, but as for your question...

Quote:
My first goal when making a game is to reach a constant logic rate...


This is probably the mindset that makes these two methods seem mutually dependent. You say you want a constant logic rate, and this can certainly be done in Slick. However, most of slick is designed around the idea that a game may have a variable logic rate. This is done through the variable "delta", the last parameter of the update method. It is a long integer representing the number of milliseconds passed, and can be used to time things like movement. This allows the game to run on fast machines and slow machines without a speed change in the games logic, while still allowing the game to take advantage of the speeds of a faster computer.

If you find it easier to use a fixed logic update interval, and are not worried that your game will be too intense for slower systems, then you can continue to use a fixed logic interval. But for many, these methods are quite useful separately.

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

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:  
Powered by phpBB® Forum Software © phpBB Group