Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
General
»
Additional question about the official code on the book
Print
Pages: [
1
]
Author
Topic: Additional question about the official code on the book (Read 1496 times)
0 Members and 1 Guest are viewing this topic.
PewPew
Newbie
Posts: 22
Additional question about the official code on the book
«
on:
October 28, 2014, 02:32:27 pm »
Since this is not included on the book..
Just wanna know whats the purpose of this and what does it do
const
sf
::
Time
Game
::
TimePerFrame
=
sf
::
seconds
(
1
.
f
/
60
.
f
)
;
Its on the very top of game.cpp before the declaration of constructor
Logged
Nexus
SFML Team
Hero Member
Posts: 6287
Thor Developer
Re: Additional question about the official code on the book
«
Reply #1 on:
October 28, 2014, 02:48:25 pm »
Isn't "TimePerFrame" expressive enough?
That's how long one iteration of the game loop is supposed to last: 1/60 of a second.
Logged
Zloxx II
: action platformer
Thor Library
: particle systems, animations, dot products, ...
SFML Game Development
:
PewPew
Newbie
Posts: 22
Re: Additional question about the official code on the book
«
Reply #2 on:
October 29, 2014, 09:44:00 am »
It is. I like to delete my thread when i found what it is but i cant.
Sorry
Logged
Nexus
SFML Team
Hero Member
Posts: 6287
Thor Developer
Re: Additional question about the official code on the book
«
Reply #3 on:
October 29, 2014, 02:42:55 pm »
No worries, glad it's solved. Just keep the thread, it will slowly get lost in the depths of the forum
Logged
Zloxx II
: action platformer
Thor Library
: particle systems, animations, dot products, ...
SFML Game Development
:
Print
Pages: [
1
]
SFML community forums
»
Help
»
General
»
Additional question about the official code on the book