Sign in to follow this  
Palk

[PHP] GameDev basic

Recommended Posts

Well as I said initial in other post i'm new at game developer, i know how to programm but i know that i don't have the basic game developer knowledge. First of all i was looking for how the game change window content without that silly refresh of opening form closing form hidding etc... on another language Well this is my really question, how on manager web based game such as football sim games, soccer, etc... how they change the day? I mean...when a team is going to a game that is only 5 hours from now after 5 hours the game happens how it's done that? the client only see is information but the main server is running other website with the necessary things? What i try to said is....for that management sports and other games there are two websites, one for the client to login and see his information and other for the game background, such as update the players information, stats, update the game... By the way, can anyone tell me a good book for basic game development knowledge? Thanks,

Share this post


Link to post
Share on other sites
If I understand you correctly your question is about how to display information from the server on a page without doing a full page refresh.

The answer to this problem is typically to do one of the following:
1) Use javascript with some kind of ajax solution to poll your server and update the html on your page.
2) Use flash and write some actionscript to poll the server.
3) Use java and build an embedded aplication.

These are the most common methods I can think of. Each of these things requires going above and beyond simple server-side scripting, you do need to do client side scripting in order to update the client side dynamically. PHP won't do it for you, but you can use PHP to gather the information you need from the database etc.

Share this post


Link to post
Share on other sites
Hmm no my really question is how the manager(sim) web based games do they game update? The client only see is info but there's other website for admin who control the updates for player stats, team results?
Or this is apart of php and they have a windows application to do that?

Share this post


Link to post
Share on other sites
I havent worked on web programming in quite a few years, but the answer to your question would be using whats called "cron." Thats how a popular php game called BlackNova Traders used to update the server and such as well as a few other php based games. Like I said though, this is all from a while time ago and there very well may be more and better ways to do it now.

http://en.wikipedia.org/wiki/Cron

Share this post


Link to post
Share on other sites
Quote:
Original post by Palk
Hmm no my really question is how the manager(sim) web based games do they game update? The client only see is info but there's other website for admin who control the updates for player stats, team results?
Or this is apart of php and they have a windows application to do that?

It's very easy to do admin via the website. Just check to see whether the user is an admin when they log in, and if so, show them the special admin pages.

Usually the game doesn't require an admin to log in to update, however. It can just do all due updates as soon as someone loads a page, before sending that player their details. Or as stated above you can run a cron job to periodically performs the work directly, or just to periodically load a special PHP page that does the work.

Share this post


Link to post
Share on other sites
Well i already looked for cron, the question is....how can i know if the webhost that i'm hosting the website have cron enable? or how can i setup cron on those webhosts?

For sure the best way is to host the website in servers that i have full access, but for those that i don't have it is possible?

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