Mastering Time Itself


Goity posted on Aug 21 2005 at 10:39 PM said:
How do I make something appear for a few seconds then disappear?
have an errection?
 
Last edited by a moderator:
More ontopic, you can use timers:

Code:
timer[0] = 0;
while(timer[0] < 1000)
  frame;
end
//One second passed

Or use the fps variable, which always holds the framerate:

Code:
i = 0;
while(i < fps)
  i++;
  frame;
end
//One second passed
 
?
Timers always higher themselves or what? And why 1000 for one second passed?

And there is a fps variable??? :D I have always used my own to make counters :)


Please tell me how those timers work, Moogle.
 
Timers are in milliseconds and raise themselves indeed :). You can set them to zero to make it easier to measure a certain interval, but of course that is not necessary. I think you have 10 of them, 0 to 9, but not sure of that. You normally don't use that much of them, since it's easier to use the fps variable since Fenix runs in frames already.

Hm Quiest, if you didn't know the fps variable, you might find this interesting, sums up all globals :).
 
So, Moogle, FPS displays the current frames per second or just the value you ste at the start with set_fps?

I mean it does count the frames right, even if the programm is lagging, so you can count down seconds like the program were running at full speed?
 
Erm I currently have them offline, cause I have to change them a bit and I want to make some kind of template .prg to make it easier for me to implement and easier for other to make minigames :D

Expect something at the end of next week or so. :)
 
Quiest posted on Aug 22 2005 at 06:41 PM said:
So, Moogle, FPS displays the current frames per second or just the value you ste at the start with set_fps?

I mean it does count the frames right, even if the programm is lagging, so you can count down seconds like the program were running at full speed?

The amount of frames in the last second. So yeah, you can count seconds with it.
 
Last edited by a moderator:
Moogle posted on Aug 22 2005 at 12:54 AM said:
Or use the fps variable, which always holds the framerate:

Code:
i = 0;
while(i < fps)
  i++;
  frame;
end
//One second passed

I tried this for a timer to see how long it take you to do something, with every time it meets the fps adding one to my "time" variable, and it runs far too fast :S
 
Last edited by a moderator:
You can change "while(i < fps)" for "while(i < 50)" or some other number until you find your ideal speed.

Byes
 
Streets Of Rage Tactics? I can see the .dcb in the title :D when can we play that on the gp32? :D:D
 
Quiest posted on Oct 4 2005 at 09:06 PM said:
Streets Of Rage Tactics? I can see the .dcb in the title :D when can we play that on the gp32? :D:D

He he he...
It's a Fenix game i'm doing in my little spare time :)
It's something like Streets of Rage + vandal Hearts :lol:
Who knows when it will be finished... (i've never finished my old Dragon Ball Z project anyway... <_< )

I expect to be played in Gp2x (if FENIX is ported) because this game needs a lot of RAM for FPGS and sounds... but a "special version" can be made for GP32.

sor5.gif

sor6.gif

sor7.gif



PD: Sorry for my english.
Byes
 
Last edited by a moderator:
Thx for the info.

Do you still have source and stuff for that DBZ game anywhere oin your harddrive?

I remember seeing screenshots, it looked quite cool, and I`m maybe interested in making something out of it... in case you will never work on it again...
 
I will check it... but i abandoned the DBZ game because it was awfully coded (i really don't know how to code properly)... so i don't think you can make any good thing with the .prg jejejeje

Byes
 
Back
Top