Timed events.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Mightywayne
Forum Contributor
Posts: 237
Joined: Sat Dec 09, 2006 6:46 am

Timed events.

Post by Mightywayne »

So my game's doing pretty well, almost ready for launch. Super.

I'm having trouble with what I call "ticks". My game has a part where you get a monster in an egg, and it hatches whenever the next tick happens. The problem is, the ticks are every 6 hours. I'd like to make it so the egg would be hatched in 15 minutes, but not have the server checking every monster every 15 minutes just to see if someone's egg is ready to hatch.

Any idea on how to do this?
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Sounds like a job for CRON and a MySQL query.
Post Reply