Scrolling Game Development Kit Forum
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Scrolling Game Development Kit Forum
»
SGDK Version 2
»
Help, Errors, FAQ
»
from where to call LimitFrameRate?
« previous
next »
Print
Pages: [
1
]
Author
Topic: from where to call LimitFrameRate? (Read 4345 times)
Till
Visitor
Posts: 2
from where to call LimitFrameRate?
«
on:
2009-04-03, 11:22:07 AM »
I was one of the people who had the problem with that the game is running too fast. Now I discovered the function LimitFrameRate in GeneralRules. But from where should the function be called?
Logged
Vincent
SGDK2 Addict
Expert
Fanatic
Posts: 612
Legacy of Kain: Revival is completed!!!
Re: from where to call LimitFrameRate?
«
Reply #1 on:
2009-04-03, 12:25:59 PM »
Hi,
Well the important thing to make sure is that this rule is called only once per frame. So you can put it in one of your map rules. Alternatively, if you plan to include one (at least one and at max one) particular sprite on each map, you can add the rule in the sprite's rules.
The whole set of code (each maps' rules and each sprites' rules) is executed once at each frame. So make sure you just have one LimitFrameRate rule that is executed in all these set of rules and it should work.
Logged
Legacy of Kain: Revival completed!
http://lokrevival.webs.com
See also my company website:
http://chivalrousgames.com
durnurd
Lead Lemming
Expert
Fanatic
Posts: 1234
Games completed so far: 0
Re: from where to call LimitFrameRate?
«
Reply #2 on:
2009-04-03, 12:48:11 PM »
You could also put it on an overlay map, if you happen to plan having one of those around all the time. Even if you don't, you could make a blank map that executes global rules and use it as the overlay.
Logged
Ed
wa
rd
Da
ss
me
ss
er
Till
Visitor
Posts: 2
Re: from where to call LimitFrameRate?
«
Reply #3 on:
2009-04-06, 08:27:57 AM »
thanks for the quick replies. i added a new plan with a rule to the game from where i called the function.
Logged
Print
Pages: [
1
]
« previous
next »
Scrolling Game Development Kit Forum
»
SGDK Version 2
»
Help, Errors, FAQ
»
from where to call LimitFrameRate?