[gameprogrammer] Re: Play by Web games tutorial sought

Since it is not interactive, it could behave like a normal back-end driven webpage.

Database <-> PHP/Ruby <-> Webserver <-> User

1) The user logs in and is presented with the current state of play for their current game.
This can be presented perhaps in a nice way using graphics libraries available with Ruby/PHP or whatever your server side scripting language is.

2) the user makes their move by clicking the gui which submits data back to the webserver. This is then processed by the webserver and passed onto the server side scripting language. This could be just like processing a form from a regular website. Obviously need some kind of client and server side validation of the move that was made. This can be done with _javascript_ on the client side and php/ruby/whatever in the server side.

3) If the other player is logged out, then an email is sent to their mailbox (by using the server side scripting language) that notifys them that someone made a move

4) back to 1.

Other challenges:
Some games might need to replay previous moves to the user as they log in, so that they can recall what happened previously.
Some kind of reload that checks to see if the state of play has changed, if both players are online at the same time, making moves. This would stop any unnecessary email notifications.
Use AJAX techniques to have a sexy front end heavy client that does not require pages to reload in between transfering data back and forward between the webserver and the users browser. ( http://en.wikipedia.org/wiki/AJAX )

Another technique might be to have a Java application that runs on the clients, but i have seen java networked browser games have trouble with corporate network firewalls (especially if they try to open their own ports and transfer directly to the server machine.
Not sure if there is a way in java to tunnel network data from a java application back to the webserver, masked as a webdata. Probably is.

Josh

Paulo Pinto wrote:
Hi,

this is a chess web site where I play every now and then.

Although you can get to the code, at least you can get
an idea of how your site should look in functionality.

http://gameknot.com/

Cheers,
Paulo


Quoting Paul Smith <paul@xxxxxxxxxxxxxxxxxx>:

  
I'm having trouble finding the right combination of words to
successfully Google for tutorials covering Play by Web games.

I'm learning all about Ruby on Rails and quite enjoying the ride.
What I ultimately want to achieve is to create a website that hosts
various boardgames, i.e. games that are not played in real time, in
such a fashion that you load up the current state of the game, input
commands for your current move, then logout and go about your
business.

Then, after the other player(s) have moved, you get notified by e-mail
that it's your turn again, and the cycle repeats.

The thing is, Googling attempts always bring me to things like flash
games and other real time game tutorials, which is not what I'm
presently interested in.

So, if any of you have heard of a simple tutorial of how to do a
simple game - even Noughts and Crosses would do - in the web style
that I describe, speak up!

PS My recent posts make me out to be rather grouchy and short
tempered, sorry if I have offended anyone with them!  Pressures at
work etc etc.

-- 
Paul Smith
Computer programmer

paul@xxxxxxxxxxxxxxxxxx

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html



    




----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html




  
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html

Other related posts: