Lost Password?


Go Back   CodeCall Programming Forum > Web Development Forum > PHP Forum

PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-10-2006, 08:05 PM
DiscoBob DiscoBob is offline
Newbie
 
Join Date: Jul 2006
Posts: 12
Rep Power: 0
DiscoBob is on a distinguished road
Default Real Time?

I'm coding a game in PHP, have most of it coded, but I recently implemented clans into the game. One of the features I would like to add in is Real-Time clan fights...however, I have not the slightest idea on the approach to Real-Time coding. Please help.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 07-10-2006, 08:38 PM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default

Real-Time fighting in PHP? Hmm. I'm not sure that it is possible with PHP alone. Do you know Java?

How does the game work right now? Is it based off of a database? Got a link so I can test it out?
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-12-2006, 12:16 AM
DiscoBob DiscoBob is offline
Newbie
 
Join Date: Jul 2006
Posts: 12
Rep Power: 0
DiscoBob is on a distinguished road
Default

the link is at http://mayhem.sbdesigning.com

It's all text based, and runs off of a MySQL database...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 07-12-2006, 10:28 AM
Lop's Avatar   
Lop Lop is offline
Speaks fluent binary
 
Join Date: May 2006
Posts: 1,149
Rep Power: 18
Lop will become famous soon enoughLop will become famous soon enough
Default

That is a cool game! You'll have to use AJAX or Java+PHP to get real time fight.
__________________
Lop
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 07-12-2006, 07:53 PM
Jonas Jonas is offline
Newbie
 
Join Date: Jul 2006
Posts: 25
Rep Power: 9
Jonas is on a distinguished road
Default

I don't know if you can get exact real time, but if you just had a database backend that you did not mind pounding into submission, couldn't you just create a turn-based environment (I guess you could do it without the database as well), and speed it up as such that it appears to be real-time. Ie there are actual rounds to the game, but perhaps those rounds are so short that the player would not even realize it.

By the way I am not sure how Java or Ajax would work for a real-time fight since those are both client side. The two clients would need to communicate for a real time battle. Would be better to do it just in PHP me thinks.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #6 (permalink)  
Old 07-12-2006, 10:09 PM
DiscoBob DiscoBob is offline
Newbie
 
Join Date: Jul 2006
Posts: 12
Rep Power: 0
DiscoBob is on a distinguished road
Default

ya, I'm actually thinking of going with the quick turn based...maybe make the actual user status's and such in an iframe so i can call it to a page that refreshes with their new status, health, and such. And put in a "shoutbox" type thing so they can communicate.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 07-13-2006, 01:51 PM
Crane's Avatar   
Crane Crane is offline
Programming Expert
 
Join Date: Nov 2005
Posts: 399
Rep Power: 14
Crane is on a distinguished road
Default

With AJAX you could run the PHP without having to refresh the users browser. This would be realtime. Since a large part of AJAX is java script you could also just use PHP and Java script. There is a tutorial in the XML, JSP and AJAX section about connecting AJAX to PHP and MySQL.

The thoughts mentioned above about a turn-based PHP/MySQL would work as well although not as good IMO.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP: Execution Time Function Jordan PHP Tutorials 18 Yesterday 02:07 PM
8 Steps to Growing Your Blog Community One Person At a Time bbalegere Marketing 4 01-22-2007 12:03 PM
A time showing tutorial ahsan16 VB Tutorials 1 01-10-2007 05:50 AM
Time format xXHalfSliceXx HTML Programming 0 12-10-2006 08:15 PM
Odd Timestamp dirkfirst C# Programming 10 12-08-2006 05:40 PM


All times are GMT -5. The time now is 06:06 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 97%

Ads