Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - HylianEvil

Pages: [1]
1
General / Re: Clock and openGL
« on: April 28, 2012, 06:40:12 am »
Ah, thanks for the replies.
I think I will switch to 2.0. I've been reading up on various methods for handling time and I believe a bit of the problem I am having is a lack of an understanding of how to actually use time with my animations. (This is my first time having to use time in a program lol).

Anyways... I'm going to read up on time management a bit more and then try to switch my program over to 2.0.

Thanks for your patients guys :). I feel I have handled the description of my problem poorly lol. And I appreciate the replies. Stick with me I'll get better at the whole forum thing!

2
General / Re: Clock and openGL
« on: April 27, 2012, 09:07:54 pm »
I do have "App->UseVerticalSync(true);"
declared in in my code but my frame rate seems to go way higher than 60fps.
I have no idea why it would do that :/ because my monitor is set to a refresh rate of 60hertz.

3
General / Re: Clock and openGL
« on: April 27, 2012, 04:59:09 am »
So, instead of using

   "App->SetFramerateLimit(60);"

I've just put 

   while (Clock->GetElapsedTime() < 1.0/60.0);
   Clock->Reset();

at the end of my game loop. This seems to give a stable frame rate but it's only a temporary solution.
Here's some of my code.

https://gist.github.com/2505308

4
General / Re: Clock and openGL
« on: April 26, 2012, 08:34:34 am »
Ah. that's a very good point. I've implemented your suggestion but I am still experiencing the choppiness.

5
General / Re: Clock and openGL
« on: April 26, 2012, 12:17:17 am »
Oops, sorry for being vague. I actually call Clock->Reset(); at the end of my game loop.

6
General / Clock and openGL
« on: April 25, 2012, 11:42:08 pm »
Hello, I'm pretty new here and new to game programming in general.
What I'm trying to do is make a game in openGL/SFML 1.6 and I realized that I need
a clock to have the same experience independent of how fast someone's computer is.

What I'm doing is something like this

void Sprite::updateX(float tempX)
{
   x += tempX*Clock->GetElapsedTime();
}

I've noticed there's a stutter in my animations that happens predictably with time.

Does anyone know a good tutorial on setting up a clock for use in a game or does anyone know how to properly use the clock feature to get rid of this stutter?

Pages: [1]