ggkfc Posted December 8, 2007 Share Posted December 8, 2007 i was wondering- does anyone know how the time/tick function works in popular games like utopia and hobowars? like you regain *energy* to do stuff, how does it work.. is it something you set onto your mysql database or something? like an autoincrement/limited script Quote Link to comment Share on other sites More sharing options...
noidtluom Posted December 8, 2007 Share Posted December 8, 2007 I don't like PHP Ticks. Not many people use them IMHO. What you might need is a frame which keeps on refreshing every so many seconds in order to increment a value in your MySQL database. Of course, before it increments it, it needs to check how long it has been since it last got incremented, so people can't just force refresh to increment manually, Quote Link to comment Share on other sites More sharing options...
ggkfc Posted December 8, 2007 Author Share Posted December 8, 2007 ty for the reply i was reading up on it, and it seems you need at least one user online @ a time for ticks to work properly. therefor when you're just starting out it wouldn't really work. I also ready something about shell scripts and bash buy couldn't really understand it. could someone verify whether i could use a periodically run shell script to emulate a tick function? Quote Link to comment Share on other sites More sharing options...
Seraph Posted December 8, 2007 Share Posted December 8, 2007 its possible. tell a cron to run lynx or links or wget to execute a php cron script that or create a time check between last login or hit, either works fine. however the later tends to cause longer load times Quote Link to comment Share on other sites More sharing options...
ggkfc Posted December 8, 2007 Author Share Posted December 8, 2007 atm, im still running my php @ local computer so how would i put a cron on that because it seems to be unix only? (the way things are going. i may go the php option- just leave my computer on to auto-refresh all day ) hahaha could you care to clarify the cron stuff for me (ive read about how it works and all that) but how would i run it on my system (homepc) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.