Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-14-2010, 11:02 PM   PM User | #1
wjrasmussen
New Coder

 
Join Date: May 2008
Posts: 33
Thanks: 11
Thanked 0 Times in 0 Posts
wjrasmussen is an unknown quantity at this point
Communicating between two users/sessions

As a learning device, I want to create a tiny game which two players will play in real time. Both players will plot their action at the same time and submit their action. There doesn't seem to be a handy way to communicate the moves/results to each player.

I guess using javascript to poll for changes every few seconds would be doable but it would be nice to have a cleaner way to propogate changes. Any suggestions would be welcome. I don't want to run applets or flash. Consider PHP, javascript, mysql, html+ as my options.
wjrasmussen is offline   Reply With Quote
Old 12-14-2010, 11:03 PM   PM User | #2
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
MySQL for sure.

You can create a temporary table.
Use it during the game, and delete it afterwards.
mlseim is offline   Reply With Quote
Old 12-14-2010, 11:11 PM   PM User | #3
wjrasmussen
New Coder

 
Join Date: May 2008
Posts: 33
Thanks: 11
Thanked 0 Times in 0 Posts
wjrasmussen is an unknown quantity at this point
Normally, I think of events. Change is made and a signal is made from the server to the client. In this case, there isn't a way that I am aware of to signal the client end. Therefore polling is require from the client to the server.

I guess the bottom line question in all of this. Do I have any options to signal to the client such changes?
wjrasmussen is offline   Reply With Quote
Old 12-15-2010, 02:40 AM   PM User | #4
mlseim
Master Coder

 
mlseim's Avatar
 
Join Date: Jun 2003
Location: Cottage Grove, Minnesota
Posts: 9,045
Thanks: 8
Thanked 1,029 Times in 1,020 Posts
mlseim has a spectacular aura aboutmlseim has a spectacular aura aboutmlseim has a spectacular aura about
If you used a Windows Server with ASP.net, you could probably have each
player load and run some sort of Visual BASIC exe file. It would pretty much
connect them together online. That's a bit out of my area of expertise though.
mlseim is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 09:44 AM.


Advertisement
Log in to turn off these ads.