Sega Saturn Development > General Jo Engine Help

How to make a timer? (again)


Hey... i am asking this question again, because the only answer, that i got on this question didn't help me... (It is about jo_get_ticks, but i didn't understand, how to use it)
So... how to create a comand that will be executed after a certain specified time, that i set, after starting the game (or after something else)? Can you please, give me an example as a code?

Well, you could read the ticks the functions returns and convert that into seconds. That could tell you how much time has passed. But idk how many ticsk are in a second.
You can also count number of frames that have passed and since you know what FPS cap there is (60 for NTSC). You can say that when you count to 60 frames 1 second has passed.
This however can be a problem if your game does not run at stable framerate.

Edit: Here is a code of what I am using might be of some use to you.
You would need to modify it for your usecase however.


[0] Message Index

Sitemap 1 2 3 4 5 6 7 8 9 10 
Go to full version