0

I am making a 2 player drawing game (Touch Game). On the left side you have a canvas where you as a player can draw, to the right of it you have an image that displays what your friend or opponent has drawn. At this moment the image you draw is uploaded to an SQL database and from that database the image of the other player is downloaded. I was wondering 2 things.

  1. Is it possible to keep track of who is online without a database or is it necessary to have a database for this. (If so I can do that but I think it is more neat to not do so)

  2. The images are stored on a database using: Your Name | Opponents Name | Image DataURL I was wondering if it would be possible to make a connection bridge between the two players with my website in the middle of it. It recieves an image and sends it through to the other player.

Marc Went
  • 144
  • 1
  • 13
  • 1
    Do you know how sessions are usually handled? – Florian Margaine May 29 '12 at 15:02
  • @FlorianMargaine Sessions cannot be read by another SSID, so those set on a pc won't be available to be accessed on another machine somewhere else; the whole point of security would be meaningless otherwise – Damien Pirsy May 29 '12 at 15:04

1 Answers1

0

You can try to use
http://socket.io/ [WebSockets with a flash XMLsocket fallback] if you require realtime and it seems you do.
or send Ajax requests every x time to a script that fetches from database the changes.

Gntem
  • 6,949
  • 2
  • 35
  • 48