Help Showing FPS

Started by
17 comments, last by DivineLight 20 years, 9 months ago
Thanks guys i am done! you''ve helped me allot!

i am thinking forward to give you my alpha version of TicTacToe for free! haha
>>>Syntax is same, Thinking is Different<<<
Advertisement
You're welcome

-UltimaX-

"You wished for a white christmas... Now go shovel your wishes!"

[edited by - UltimaX on July 6, 2003 9:49:42 PM]
@UltimaX

we are programming a RPS(Role Playing Strategy), and we need some programmers!, can you please join us, we have our own FTP server, there we keep our files!

Can you tell me your skills please:
>>>Syntax is same, Thinking is Different<<<
why are you programming an rts if you don''t know how to convert strings to ints... shouldn''t you learn the basics first?
ha, that''s why i am inviting good programmers!, i am not the programemr in the project, i am 3D Modeler, but i can do much programming, i am also the designer of the project!
>>>Syntax is same, Thinking is Different<<<
quote:Original post by UltimaX
Yeah, here you go:

float CurrentTime = GetTickCount() * 0.001f;//--++Frame;if(CurrentTime - LastTime > 1.0f)


one little detail that shouldnt matter if you do anything worthwhile in your frames:
floats have limited precision (well, ok, so does gettickcount, so its already quite "off"). for very small numbers you might kill the little precision thats left by making it even smaller (*0.001) and short timespans will end up 0. so in general i would rather do
float CurrentTime = GetTickCount();
if(CurrentTime - LastTime > 1000)

in this case i wouldnt expect any difference, but whenever you work with really small floats i guess its better to make numbers bigger rather than even smaller.
f@dzhttp://festini.device-zero.de
This reminds me of when my brothers were really young and I had to spoon feed them.
-Greg
hah very nice call Greg




www.users.bigpond.com/nimak
I would but I have been working on my game engine for over a year now. I finally got to where I have different rendering engines in seperate .dll's. So now if you want OpenGL you just call Initialize(XRE_OPENGL, ...), if you want Direct3D just call Initialize(XRE_DIRECT3D, ...). The engine bases the texture system, material system, font system, etc off of what rendering engine was choosen automatically. Kinda cool.

Trienco:
Thanks for the tip. I don't do anything with the FPS besides show them anyway. I use a seperate timer for all the time based movements, task system, etc. By timer I mean using the performance counter not WM_TIMER. (I'm thinking about changing it to ASM so I can get the CPU ticks, not sure though...)

EDIT:
Greg, I'm pretty sure you were a begginer at one time. So why knock people that want help? At least they're wanting to learn and sticking to it. Would you rather they just quit programming and give up? Please try to keep your comments constructive.

DivineLight: I'm not saying your a begginer because I know nothing about your programming history. So don't take it the wrong way.

-UltimaX-

"You wished for a white christmas... Now go shovel your wishes!"

[edited by - UltimaX on July 7, 2003 10:35:42 AM]

This topic is closed to new replies.

Advertisement