Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2008
    Posts
    33
    Thanks
    11
    Thanked 0 Times in 0 Posts

    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.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,512
    Thanks
    8
    Thanked 1,090 Times in 1,081 Posts
    MySQL for sure.

    You can create a temporary table.
    Use it during the game, and delete it afterwards.

  • #3
    New Coder
    Join Date
    May 2008
    Posts
    33
    Thanks
    11
    Thanked 0 Times in 0 Posts
    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?

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,512
    Thanks
    8
    Thanked 1,090 Times in 1,081 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •