Re: Asking for help - Timer question
Posted: Fri Jan 29, 2010 5:43 pm
How is it any more hackable than any other kind of request?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
If one stops the execution of JS, the server side update is not going to happen, right?arborint wrote:How is it any more hackable than any other kind of request?
Wouldn't that involve some complicated session control? I guess the in-browser game could send out a ping every so often and that would take care of it.arborint wrote:Yes, but is this a multi-player game? I didn't get the sense it was. If it is not, then you could recalculate those values when the user logs-in -- based on the last time they were online.
Agreed ... but that's not hackable, that's just breakable.VladSun wrote:If one stops the execution of JS, the server side update is not going to happen, right?
I was just thinking that requests would update a timestamp, so the system would know the time of the last request. When you logged-in it would compare the current time with the last timestamp and update game values accordingly. You could reduce database writes by only writing the timestamp every minute or so -- by checking against a copy of the last timestamp in the session.JakeJ wrote:Wouldn't that involve some complicated session control? I guess the in-browser game could send out a ping every so often and that would take care of it.
Web applications have database and server side programming, they also use Javascript (not Java) to do work in the browser. Some of that work is to lessen the work on the server; some of that work is to do things like animation or CSS manipulations that can only be done in the browser. So it is not PHP or Javascript, it is very much becoming a requirement for PHP AND Javascript -- especially for rich interfaces like games. You will need to learn both. I would recommend using a Javascript library like jQuery. That will greatly increase you capabilities to do interesting stuff in the browser.SpHawk wrote:...And that's my intention. All server side work with a web interface. ... But seriously, if PHP w/MySql isn't the langauge I should be using, let me know.
If you write it for Apache/PHP running on Windows then you will have few/no problems moving it to a Linux/Apache server later. Many of us work on Mac/Windows and deploy to Linux servers. Just don't use IIS.SpHawk wrote:Should I be looking for an external server with Unix? (And PHP and MySql. But they all seem to have that.