Gui programming example

A

Aquila

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 ;-)

Thanks!
 
R

R. Mark Volkmann

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" <[email protected]>
Newsgroups: comp.lang.ruby
To: "ruby-talk ML" <[email protected]>
Sent: Monday, December 06, 2004 12:17 PM
Subject: Gui programming example
 
S

Steven Jenkins

R. Mark Volkmann said:
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
 
T

Tom Copeland

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 ;-)

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
 
B

Brian Schröder

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 ;-)

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
 
P

Phlip

Aquila said:
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 ;-)

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
 
N

Nick

Aquila said:
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 ;-)

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

http://wxruby.rubyforge.org

Nick
 
A

Aquila

Brian said:
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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,164
Messages
2,570,901
Members
47,439
Latest member
elif2sghost

Latest Threads

Top