The Daily Click ::. Forums ::. Klik Coding Help ::. Game Speed/Timming Problem!
 

Post Reply  Post Oekaki 
 

Posted By Message

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
31st May, 2003 at 19:28:45 -

I am working on a Sonic game call Sonic 4 & it using custom movement, only problem with this is that the game needs to run full speed or else it will not work currectly.
For example, Jumping: When jump in full speed, the Sonic jumps high, but when its going even a tiny bit slower then full speed, he can't jump high enough to get & most places causing real problems. It works the same with springs, they don't spring you as high as they should.
I know the reason, the timmer runs at the same speed the entire time. But when the games running slower & I have timmed things, the timmed things will come to earyly. Which is what I am asking.
Is there anyway to speed up the game & play FULL frames, or make the game's timmer run at the same speed as the game?

 
http://www.facebook.com/truediamondgame

Hayo

Stone Goose

Registered
  15/08/2002
Points
  6946

Game of the Week WinnerHas Donated, Thank You!VIP MemberGOTM 3RD PLACE! - APRIL 2009Weekly Picture Me This Round 27 Winner!Weekly Picture Me This Round 41 Winner!Weekly Picture Me This Round 45 Winner!
31st May, 2003 at 19:45:30 -

Well..you have to choose between full frames, with timer problems when the game runs slow
OR skipping frames (machine independ speed)without timer problems. The only way to speed your game up is using less active objects, a smaller window, or maybe less code (?)

or maybe there is an extension for this, dunno bout that.

 
www.hayovanreek.nl

ShadowCaster

Possibly Insane

Registered
  02/01/2002
Points
  2203
31st May, 2003 at 21:44:16 -

Selecting "Machine Independent Speed" will fix your problem by skipping frames in order to keep the speed of the game. If you would prefer it to be fully-framed, then you'll need to use a custom engine. It's pretty easy to do jumping using Alterable Values. Set the first alterable value to the max height, set the second to 0 (when not jumping), 1 (when jumping), 2 (when falling from a jump). Then when Alterable Value B is equal to 1 you just keep adding to the object's position until it's equal to or greater than the value in Alterable Value A. Same concept for downwards.

Mike

 
"Now I guess we're... 'Path-E-Tech Management'" -Dilbert

Jakku



Registered
  30/05/2003
Points
  4
1st June, 2003 at 03:30:19 -

Brandon, since you're already using a custom movement, you'll simply have to find a replacement for the timer.
Try this: Always add 1 to a value. If it equals, say, 5, set it to zero again. Now just use this value instead of the timer (value equals 1 -> action).
Upon jumping, you'll want to set the value to 0 again to always keep the jump height the same.

 
n/a

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
1st June, 2003 at 03:53:59 -

In MMF there's a thing called Modulo which gets the remainder of a division. So you can always add 1 to a counter, and if Counter Value mod 50 = 0, then a second has elapsed. (MMF loops about 50 times per second)

 
gone fishin'

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
1st June, 2003 at 07:37:03 -

Thanks, & now I have desided that in the installer, I will give the user the choice to pick, 'Full Frames or Skip Frames' because if they have a fast computer, whats the point on making the game frames. The game works alot of times for me when I have EVERYTHING shut down & right after I had restarted my computer, only because for my computer thats the time it runs fastest.
Give me input on how you think of my installer idea.

 
http://www.facebook.com/truediamondgame
   

Post Reply



 



Advertisement

Worth A Click