[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: [QUIZ] Space Merchant (#71

Ross Bamford

3/20/2006 5:42:00 PM

On Tue, 2006-03-21 at 02:07 +0900, Joel VanderWerf wrote:
> Ross Bamford wrote:
> > One additional thing I did consider was multiplayer - it's fairly easy
> > to get a galaxy working over DRb, and I did work up a basic multiplayer
> > version like this but had one overriding problem - all output ends up on
> > the server, or the game ends up useless because of constantly
> > marshalling sectors to send down the wire. I toyed with routing output
> > through the Player but still had problems... Ho hum.
>
> What about including DRbUndumped in the sector class, to keep them on
> the server?
>

The setup I had in the end was: (server) Galaxy as front object,
Sectors, Planets and Stations DRbUndumped so they stay on that side too,
with Player marshalled. I wanted to have Player unmarshalled too, but on
the client side, but I couldn't figure out how to make that work (I
wanted to keep that client side and route output through a method on
it).

Anyway, the problem with that was that, since Sector handles most of the
output (and will probably just call puts) the output all goes to the
server's terminal :(

I guess I just don't know DRb all that well yet...

--
Ross Bamford - rosco@roscopeco.REMOVE.co.uk



1 Answer

James Gray

3/20/2006 5:48:00 PM

0

On Mar 20, 2006, at 11:41 AM, Ross Bamford wrote:

> Anyway, the problem with that was that, since Sector handles most
> of the
> output (and will probably just call puts) the output all goes to the
> server's terminal :(

Could you have the client pass you $stdout and $stdin, then set them
on the server?

James Edward Gray II