From: Leon Torres Date: 2002-01-19T20:38:59+09:00 Subject: Re: Client side tool - GUI - sockets On Sat, 19 Jan 2002, Rune Jarnes wrote: > Hello, > > I'm a newbie when it comes to Ruby. I've been lurking a bit and am wondering > if Ruby would be suitable for writing a GUI centered client that > communicates with a server with tcp-ip ? I'm also curious whether anyone has > done this and if you could comment a bit on your experience, regarding what > worked well and what worked less well. Yes. I've been writing a multiplayer board game in Ruby and have been using the Distributed Ruby library (drb), RUDL and Gtk. I began by trying to set up a chat server and gui client. It took less an hour, believe it or not. Ever since then, I rarely had to bother with the network layer. Unfortunately, I still don't know what to do about the gui setup. I need either SDL or OpenGL for animation and a widget library like Gtk or Fox for the user interface. Right now, I have a RUDL DisplaySurface running independently of the Gtk stuff. This setup isn't as painful as it sounds and might actually be preferable to a one-window game, but gettting the threads to work together properly is becoming more painful as I add features. Another problem is that some of the graphics are being loaded twice. I'm not sure if the situation will improve by using a library that embeds SDL or OpenGL in Fox or Gtk. And I'd rather use pure-SDL or pure-OpenGL because I want my game to be as portable as possible while remaining easy to install (my friends want to play it on their windows machines, I'm using linux). Nevertheless, this game would not have gotten off the ground if it weren't for the advantages offered by Ruby. I started writing it in C++ and prototyping in Ruby, but then gave up the C++ part entirely. Since then, most of my time has been spent doing useful things like creating graphics and debugging game logic. I'm about to release the game (BotFrenzy) on SourceForge in a day or two. Feel free to inspect my implementation. An obligatory screenshot (rather large): http://www.ugcs.caltech.edu/~leon/rr6.png You can see the RUDL windows on the left and Gtk windows on the right. - Leon