Forum: Ruby need help with a general concept

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Afabd225e57b433553138fead5a820d4?d=identicon&s=25 Raj Sahae (rajsahae)
on 2007-02-20 23:25
I'm trying to make an application with the following properties:
It uses FXRuby
It's a multiplayer turn based card game
Played over a network, or the internet
Players may play cards during other players turns
Players may manipulate their own components at any time
Players can make requests for info on any other players components at
any time

I originally planned to use threading, but I didn't know that Ruby
blocked IO in threads.  Is there a better way to implement this type of
game than using threads and sockets?  I am somewhat new to ruby, I
wouldn't consider myself an average ability ruby coder yet.  How should
I go about this?
4d5b5dd4e263d780a5dfe7ac8b8ac98c?d=identicon&s=25 Tim Pease (Guest)
on 2007-02-21 00:19
(Received via mailing list)
On 2/20/07, Raj Sahae <rajsahae@gmail.com> wrote:
> blocked IO in threads.  Is there a better way to implement this type of
> game than using threads and sockets?  I am somewhat new to ruby, I
> wouldn't consider myself an average ability ruby coder yet.  How should
> I go about this?
>

Two things to look into would be DRb and Rinda.  Eric Hodel has a nice
writeup about both on his segment7 blog.

http://segment7.net/projects/ruby/drb/index.html

DRb stands for Distributed Ruby and Rinda is the Ruby implementation
of a TupleSpace. The TupleSpace would be used to hold all the
information about the current game state, and DRb would be used by the
clients to communicate with one another.

Have fun with the project.

Blessings,
TwP
Afabd225e57b433553138fead5a820d4?d=identicon&s=25 Raj Sahae (rajsahae)
on 2007-02-21 21:59
(Received via mailing list)
Thanks for the info.  I probably should have read a little more through
the library, I could have found those things myself.  Just in case
anyone else is interested, I did find a little more detailed intro to
DRb at http://chadfowler.com/ruby/drb.html

Raj
This topic is locked and can not be replied to.