FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


php questions





Maxus
Hi all,

I have bit of experience and I want to do something 'big' now.

I'm planning to work on a race game:
Players set up their car, driver and so on
and at a certain time PHP calculates race time and so on.

I have 2 idea's:

Simple one: Just calculate with al the variables (car, driver, road, weather..)

2nd but harder I think:
Calculate every second speed, let driver decide when to use Nitro's...
Calculate every second tires quality, and so max speed, fuel (weight),.....

Any sugeestions, I haven't found any tut or howto in the internet yet
TomS
Only the first thing is possible in php.
But I would think, it's a bit boring. It's just like throw dices and the higher one wins... What if both racers have the same car set up? Then the speed is the same. What if one person is playing around all night long with your game and finally finds out, what settings are best. He would win everytime.

For the second thing, the browser has to refresh every second. That's too quick. For that you need Ajax skills. With that you can change sitecontent in realtime (almost) and show how fast one is and where the other racers are. With dad one can decide whether he takes a nitro or not.
Maxus
TomS wrote:
Only the first thing is possible in php.
But I would think, it's a bit boring. It's just like throw dices and the higher one wins... What if both racers have the same car set up? Then the speed is the same. What if one person is playing around all night long with your game and finally finds out, what settings are best. He would win everytime.

For the second thing, the browser has to refresh every second. That's too quick. For that you need Ajax skills. With that you can change sitecontent in realtime (almost) and show how fast one is and where the other racers are. With dad one can decide whether he takes a nitro or not.

no, I will explain better Very Happy
The players (!= drivers) can say wen they want use nitro.
And the results aren't live, then it's possible to calculate every second (whith while loop i think is best).

So my plan is to calculate and then show te results.
TomS
So the players have to say when they want to use nitro before your calculation(=race) starts ?
Maxus
TomS wrote:
So the players have to say when they want to use nitro before your calculation(=race) starts ?

Jep, they have to set everything and so you can play against eachother without having to be online at the moment of race, ofcours i have to work the idea more out.

I someone (or TomS) has any suggestions, shout Very Happy
Related topics
PHP Resources.
simple php problem, please help...
PHP Validation Class
Php and Other Wonderful Newbie Stories for Help.
How To : Improve Your PHP Programming
How to ask questions
Few questions
Ashens Web Design Questions Thread
Best PHP forum
a few email/parked domain questions..
[*READ THIS FIRST!*] Commonly asked questions
PHP Image Questions
where to install php?
[PHP] Some beginner questions
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.