Playing around with the Frame Rate In-game.

Ideas for Game Editor evolution.

Playing around with the Frame Rate In-game.

Postby Sgt. Sparky » Thu Oct 25, 2007 10:03 pm

I think it would be awsome to be able to adjust the maximum frame rate while the game was being played.
:D
one of the reasons I want this function is because of this game I am making:
Attachments
Picture.png
Here is a Picture of my latest game, Explosive Warrior! =) (click to enlarge)
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Game A Gogo » Thu Oct 25, 2007 11:28 pm

Yes, this would be good for slowing down, like a slow-mo cinmatic *nods*
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Fuzzy » Fri Oct 26, 2007 1:46 am

Make a variable called TimeDilation. Its a float value.

Now everytime you draw, set all the actors velocity at whatever rate, multiplied by TimeDilation.

If you want full speed, then set TimeDilation to 1.0. When it comes time for a slow cinematic effect, set TimeDilation to 0.75, or maybe even 0.5.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Bee-Ant » Fri Oct 26, 2007 9:55 am

Yeah, I want it too... :D
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Sgt. Sparky » Sat Oct 27, 2007 8:12 pm

Fuzzy wrote:Make a variable called TimeDilation. Its a float value.

Now everytime you draw, set all the actors velocity at whatever rate, multiplied by TimeDilation.

If you want full speed, then set TimeDilation to 1.0. When it comes time for a slow cinematic effect, set TimeDilation to 0.75, or maybe even 0.5.

I know, but I would rather have the ability to adjust the frame rate.
:(
Image
Random Links:
viewtopic.php?p=19474#19474
Right now (10/14/2009) I'm working on some C++ projects, but I might be able to help if you have some Game Editor questions. :)
User avatar
Sgt. Sparky
 
Posts: 1850
Joined: Sat Oct 07, 2006 5:28 pm
Location: Somewhere out there, beneath the pale blue sky...
Score: 236 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Fuzzy » Sat Oct 27, 2007 8:38 pm

The problem is probably that the frame rate and the clock time are tied together, so any timers would be badly affected.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Game A Gogo » Sun Oct 28, 2007 12:16 am

Timer and Frame rate does not run on the same thing, if your frame rate is low, the timer will be the same.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Fuzzy » Sun Oct 28, 2007 1:25 am

Thats not what i mean gogo.

pretend you had a timer that makes an actor line up with another. Since the actors move based on the frame rate, the timer would not synch with the draw and you would get odd problems.

actor A is told to move --------> for 0.5 seconds. Its x velocity is 5(five pixels per frame).
actor B(a platform) moves up and down constantly with a velocity of 5.

at 30 frames per second actor A would move 75 pixels.

at 15 frames per second, it would move only 37.5

Normally we calculate what we need in advance, but in this case, we couldnt do it. what would happen if at 0.4 seconds, the frame rate suddenly was lowered to 10 for a special effect? Actor A would miss landing on actor B. Or at the very least, it wouldnt line up.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby DilloDude » Sun Oct 28, 2007 4:18 am

Using a variable such as TimeDilation as Fuzzy suggested would probably be prefered than changing the framerate, as things would still move smoothly. In this case, timers become a problem (they do anyway if your framerate slows down). In this case, you would have to substitute variable 'counters', which are incremented on draw actor, for timers.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Game A Gogo » Sun Oct 28, 2007 5:15 pm

yes I agree. So you would need to do the timer manually, which would be best.
Maybe Makslane could change the timer to work with the FPS?
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Fuzzy » Sun Oct 28, 2007 11:51 pm

I still dont think thats a good idea. the timer is based on the CPU clock.. FPS is based at least partly on your graphics card. Suddenly timers would get inaccurate when lots was happening(it apparently already does). Plus, when multiplayer comes in, it would really mess with things.
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Game A Gogo » Mon Oct 29, 2007 11:52 pm

yes, especially when there is the motion-compensation.
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Fuzzy » Tue Oct 30, 2007 1:43 am

what is this motion compensation i keep hearing about?
Mortal Enemy of IF....THEN(and Inspector Gadget)

Still ThreeFingerPete to tekdino
User avatar
Fuzzy
 
Posts: 1068
Joined: Thu Mar 03, 2005 9:32 am
Location: Plymostic Programmer
Score: 95 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Troodon » Tue Oct 30, 2007 3:29 pm

It's a thing in the game options that makes characters faster when fps goes down. It can be put on and off. I think it came in 1.3.8, atleast it wasn't yet in 1.3.3.
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

Re: Playing around with the Frame Rate In-game.

Postby Bee-Ant » Tue Oct 30, 2007 5:07 pm

Ummm...do you still have GE v 1.3.3 Mike???
User avatar
Bee-Ant
 
Posts: 3723
Joined: Wed Apr 11, 2007 12:05 pm
Location: http://www.instagram.com/bee_ant
Score: 210 Give a positive score

Next

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest