Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > General > PHP Games

PHP Games Like Games?, Like PHP?...

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2005-06-19, 12:07 AM
Junior Member
 
Join Date: Jun 2005
Posts: 2
ljungren13
Send a message via MSN to ljungren13
Default

I want to make a game with PHP but dont know how to start, I am looking for a turor liker person to help me when im struggling and teach me somethings. Private messgae me and we will talk
__________________
//ljungren13
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 2005-06-19, 10:49 AM
Xnuiem's Avatar
Senior Member
 
Join Date: May 2004
Location: DFW, Texas
Posts: 1,104
Xnuiem will become famous soon enough
Send a message via Yahoo to Xnuiem
Default

I will answer any specific question you have. Just post it on here. Dont PM me, I dont respond because I feel everyone should see the question and answer so they can learn too.
__________________
I rarely give code examples.
No, I have never used IIS or Windows of any kind as a web server. Get a real OS!
Please don't PM me, I won't respond.
Reply With Quote
  #3 (permalink)  
Old 2005-08-07, 01:35 AM
Junior Member
 
Join Date: Aug 2005
Posts: 1
BADBOYPlayas
Default

Well I guess I need help asweel, but I will ask it little by little, right now what I am intrested in is making a turn base RPG Game. You know like give X many points every hour.

So basicly I need a small script that will add 1 point every global hour using mysql or any other methods that people might have.

This would be really helpful thanks
Reply With Quote
  #4 (permalink)  
Old 2006-01-17, 12:18 PM
oeb oeb is offline
Junior Member
 
Join Date: Jan 2006
Posts: 3
oeb
Default

Hello,
It seems this topic has been idle for a while, but I figure it is information other people could use so I will reply to it anyway.

There are a couple of diffrent ways of handling ticks or turns in an online game. The first is by having a script that adds a number of turns to everyones turn_count

A useful mysql query would be
Update `users` SET `turns`=`turns`+5 WHERE `banned`=0

Which simply adds 5 turns to the users turn count if they are not banned. This could be set in a tick script that is automaticly run on the server as often as you want the turns to be updated. If you want to schedule this task on a linux machine you will need to use the task scheduler cron. You can set up the script as a shell script (By putting the path to PHP in the header, check out This Tutorial for instructions on how to do this.) Another method would be simply to get cron to invoke lynx or some other command line browser (even wget) to call it.

The second method of handling turns only really applies if a person is limited to a specific ammount of turns per day (rather than a turn build up*time). How you would handle this is by updating a timestamp in the users profile when he logs in. If the timestamp is for a diffrent day than the previous one, set his turns back to whatever they should be.

I hope this is of some help to someone.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.5 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.5 (a popular PHP IDE) and NuCoder 2.0 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 01:10 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.