Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
System
»
Do something every 10 frames
Print
Pages: [
1
]
Author
Topic: Do something every 10 frames (Read 3978 times)
0 Members and 1 Guest are viewing this topic.
dotty
Jr. Member
Posts: 56
Do something every 10 frames
«
on:
January 22, 2012, 11:03:30 pm »
Hay, I'm using window.GetElapsedTime() to keep my framerate consistent across multiple computers.
How would I use this to see if 10 frames have passed? So every 10 frames do something?
Logged
Elgan
Jr. Member
Posts: 77
Do something every 10 frames
«
Reply #1 on:
January 22, 2012, 11:41:15 pm »
how are you using it?
2.0?
surley count the frames between?
Logged
dotty
Jr. Member
Posts: 56
Do something every 10 frames
«
Reply #2 on:
January 23, 2012, 12:07:05 am »
Yeah 2.0 and yeah I figured that soon after I posted this!
Logged
TheEnigmist
Full Member
Posts: 119
Do something every 10 frames
«
Reply #3 on:
January 23, 2012, 12:49:50 pm »
With last 2.0 you need to use clock for elapsed time.
I'm not working on it, but i think we can do something like this:
Every n second/millisecond/microsecond do something...
Logged
Tex Killer
Full Member
Posts: 242
Do something every 10 frames
«
Reply #4 on:
January 23, 2012, 10:28:40 pm »
Make a variable starting with 0, and at each frame add 1 on it.
When it is 10 or bigger, do what you want and subtract 10 of it.
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
System
»
Do something every 10 frames
anything