Gui programming example

I'm absolutely new to ruby but I can program in a lot of other languages. To
get to know this language better I would like to animate a robot walking to
a maze, does anyone of you have pointers to examples on GUI programming
with ruby? I'll learn the rest :wink:

Thanks!

···

--
"May the source be with you"

Sounds like you need something with the power of Tk's Canvas widget. I've been playing with that lately and like it a lot. I'm not familiar with the details of other GUI toolkits for Ruby. I'd like to hear if they have something equivalent to Tk's Canvas widget.

If you decide to play with Tk Canvas, I can send you my code.

···

----- Original Message ----- From: "Aquila" <braempje@netscape.net>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
Sent: Monday, December 06, 2004 12:17 PM
Subject: Gui programming example

I'm absolutely new to ruby but I can program in a lot of other languages. To
get to know this language better I would like to animate a robot walking to
a maze, does anyone of you have pointers to examples on GUI programming
with ruby? I'll learn the rest :wink:

Duane Johnson just posted a Ruby game (tadpoles) that uses SDL here:

http://tadpoles.rubyforge.org/

It's even got a level editor:

http://tinyurl.com/5psso

Yours,

Tom

···

On Mon, 2004-12-06 at 13:17, Aquila wrote:

I'm absolutely new to ruby but I can program in a lot of other languages. To
get to know this language better I would like to animate a robot walking to
a maze, does anyone of you have pointers to examples on GUI programming
with ruby? I'll learn the rest :wink:

A small example project I once used in a ruby course can be found at.

http://ruby.brian-schroeder.de/ants/

Its cut down to be as simple as possible. Maybe it can help you as a starter.

Regards,

Brian

···

On Tue, 7 Dec 2004 03:17:34 +0900 Aquila <braempje@netscape.net> wrote:

I'm absolutely new to ruby but I can program in a lot of other languages. To
get to know this language better I would like to animate a robot walking to
a maze, does anyone of you have pointers to examples on GUI programming
with ruby? I'll learn the rest :wink:

--
Brian Schröder
http://www.brian-schroeder.de/

Aquila wrote:

I'm absolutely new to ruby but I can program in a lot of other languages.

To

get to know this language better I would like to animate a robot walking

to

a maze, does anyone of you have pointers to examples on GUI programming
with ruby? I'll learn the rest :wink:

Such a maze would be totally simple to animate using the Tk Canvas.

Here's an example of Ruby driving this canvas:

    http://www.rubygarden.org/ruby?SvgCanvas

···

--
  Phlip
  http://industrialxp.org/community/bin/view/Main/TestFirstUserInterfaces

Aquila wrote:

I'm absolutely new to ruby but I can program in a lot of other languages. To
get to know this language better I would like to animate a robot walking to
a maze, does anyone of you have pointers to examples on GUI programming
with ruby? I'll learn the rest :wink:

If you have any familiarity with the MFC, then wxRuby will seem very familiar (without the bad stuff).

http://wxruby.rubyforge.org

Nick

R. Mark Volkmann wrote:

Sounds like you need something with the power of Tk's Canvas widget. I've been playing with that lately and like it a lot. I'm not familiar with the details of other GUI toolkits for Ruby. I'd like to hear if they have something equivalent to Tk's Canvas widget.

Ruby-gnome2 supports the Gnome Canvas. I've used the Canvas in C, and written a little Gnome/GTK+ code in Ruby, but haven't yet used the Ruby API for Canvas. The ruby-gnome2 source tarball includes some nice examples (http://ruby-gnome2.sourceforge.jp/\).

I've been dabbling a little with Glade (Gnome UI builder) and Ruby. It's almost too easy once you get the hang of it.

Steve

Brian Schröder wrote:

A small example project I once used in a ruby course can be found at.

http://ruby.brian-schroeder.de/ants/

Its cut down to be as simple as possible. Maybe it can help you as a
starter.

That's a very nice project, that helps quite a lot. Thanks, and thanks for
every other suggestion!
Now I do have a question: what is the "best" way to animate my robot walking
trough the maze? I probably should do some threading?
And one more thing: can I use existing images (png) as tiles for my maze?

I'm starting to like this language...

···

--
"May the source be with you"

FOX/FXRuby has a 2d canvas (FXCanvas) and a 3d GL canvas
(FXGLCanvas/FXGLViewer).

You'll see some examples on:
http://www.fxruby.org/ under the left hand link 'Screenshots'.

-Rich

···

On Tue, 7 Dec 2004 04:09:07 +0900, Steven Jenkins <steven.jenkins@ieee.org> wrote:

R. Mark Volkmann wrote:
> Sounds like you need something with the power of Tk's Canvas widget.
> I've been playing with that lately and like it a lot. I'm not familiar
> with the details of other GUI toolkits for Ruby. I'd like to hear if
> they have something equivalent to Tk's Canvas widget.

Ruby-gnome2 supports the Gnome Canvas. I've used the Canvas in C, and
written a little Gnome/GTK+ code in Ruby, but haven't yet used the Ruby
API for Canvas. The ruby-gnome2 source tarball includes some nice
examples (http://ruby-gnome2.sourceforge.jp/\).

I've been dabbling a little with Glade (Gnome UI builder) and Ruby. It's
almost too easy once you get the hang of it.

Steve