Page 3 of 3

Re: Best free hosting?

Posted: Tue Feb 02, 2010 12:55 am
by Torniquet
there are a couple ways you can get out of using crons, depending what you want them to do.

as chris said, the page on buildingbrowsergames.com is a very good way to bypass this. i currenatly use it and it works fantasticly.

i have searched high heaven for a decent cheap host that will allow crons to run on a short time line. and its not easy to find without going onto a VPS or dedi server. If you use the above method, you dont need crons what so ever. unless you need things to change serverside information that players have no controle over its influence. (i.e time of day or seasons. (night day, summer winter kinda thing)) then you can get away with them ran a couple of times an hour. which 000webhost will easily allow you to do.

another thing that you need i realised when on my hunt for a decent host, was the fact that you could have 100's or 1000's of people sign up, but give up playing. therefor adjusting information that is not needed to be adjusted.

for eg.

5000 poeple are registered on your game. 3750 of them no longer play. you are still updating their energy etc without the need to, making pointless calls to the database and running pointless scripts without the need to. ultimatly wasting server resources.

I personally am sticking to quick calculations ran everytime a page is entered when its needed, these calculations run against a timestamp held in the databse. if the current time is past the time set in the db then a further action is ran. if not, nothing happens. i am sure in the long run it would save alot of resources that would ordinarily be used if you ran these proccesses by crons.

i am saving my crins for more important events, such as spawning boss mobs and such like. which also means i dont need to find a host that has the power to run these things all the time on such a short time line. so if i wanted to. i could use 000webhost as my webserver and assign it a proper domain, and no one would be any the wiser as to it was a free webhost.

but they do have their major downfalls. like session periods only last a very short time, and you cant alter the time of them. also it doesnt support php functions called from an included script. (well atleast they never seem to with me... i might just be being special in the head though lol)

hope this helps you somewhat. if you want some guidence on running such scripts according to timestamps rather than crons feel free to ask and ill do my best to hlp you understand them :)


also. as far as i can remember... 000webhost alows one ran every 5 mins, their premium service allows 1 a min