Sign in to follow this  
Awoken

browser game with server side calculations.

Recommended Posts

is it possible to have a broswer game where the player has access to the gui which provides the information, but the bulk of the calculations are provided by a background server?

So if a player makes an action (let's say he buys some men) How are all the calcuations handled? are they done on the computer that is hosting the website or the background server?

Share this post


Link to post
Share on other sites
hun, so if I have a thousand people access my website at the same time and the browser game needs to calculate information every minute, the hosting server will do all the calculations?

Share this post


Link to post
Share on other sites
yes generally that's the case.

I recommend learning PHP. (Also look into AJAX later after you write some examples).

I also recommend the first thing you write is a registration system. It's a really good way to get familiar with databases and common actions that web pages must do.

-User fills out form that asks for username, password, retype password, email. They then hit submit which posts the data to register.php and after verifying all of the information is correct and escaping the input inserts a line (id, username, password, email, authenticated, authenticationKey) (making sure to hash the password) into a database called "users" with the column authenticated set to false and then sends an email to the requested email with a link to authenticate.php?key=32fafaf89a88f9adaf8a9f89...
-When a user clicks the link the php file looks up said key and sets authenticated to true. Done.
-Then write the login information that correctly handles all of the possible errors like if a user isn't authenticated (tell them to check their email).
-Research captchas and implement one into the registration form.

That's the first thing I wrote when I learned PHP and it covered most of the common tasks. Then you need to learn how to use CSS if you don't already know it and make the forms and everything pretty. Then the last step is probably using AJAX to do an asynchronous login without leaving the page which is a neat trick.

(If you want a real-time discussion for help join #gamedev on irc.afternet.org).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this