Creating Ruby applications for Windows
Asked Answered
R

3

8

I want to develop a Windows application. Honestly I care little about cross-platforms for now (but still would be good)

I want to use Ruby, since it has quite a simple syntax and is so.. well, simple and easy to learn.

My application is like a "game level creator", where you can design your own level and then run it with another application which is a "game level player" by reading the project file created by the creator app. You get the idea.

Now, I got a new PC and is completely clean. Absolutely no trace of my old Ruby experiments and fails.

First of all, I will need to choose a GUI platform for my Ruby application! Can you recommend me one? I have heard of Shoes and Tk, but want to know what you think.

Ridinger answered 2/1, 2011 at 2:33 Comment(0)
S
5

Have you considered IronRuby? It's an implementation of Ruby that runs on the .Net platform, which means you have access to all of the standard Windows Forms libraries, if you decide to run in Windows. http://ironruby.net/

According to david4dev, it also runs well on Mono, which makes it great for cross-platform compatibility, as the Mono platform runs on Mac OSX and Linux, as well as Windows.

Jorg W Mittag says that using the WPF (Windows Presentation Framework) is an even better option for creating GUI's since Mono has a very strong implementation of the WPF. The WPF was created to be platform agnostic and is better suited for cross-platform development over WinForms, since WinForms is tightly coupled with the Windows OS.

Stefanysteffane answered 2/1, 2011 at 2:35 Comment(4)
I think I would still prefer choosing between Shoes or TK. Which one is more powerful/flexible?Ridinger
Actually, IronRuby is cross platform - it works with the mono framework, which is available for Linux, OSX and Windows.Zoilazoilla
And if you use WPF instead of WinForms, Mono provides a pretty complete implementation of the subset of WPF that is also in Silverlight, whereas its implementation of WinForms is much less complete due to the simple fact that WinForms is tightly coupled to Windows (basically, the .NET WinForms classes are just a thin wrapper around the underlying WinForms, which are of course part of the OS) and Mono is cross-platform. WPF OTOH was specifically designed to be platform-agnostic, since Microsoft itself provides implementations for Windows, OSX (Silverlight) and Windows Phone.Sabrasabre
Thanks @Zoilazoilla and @JorgWMittag. I didn't realize that IronRuby ran on Mono, or at least, I didn't know it did it well. I will update my answer.Stefanysteffane
Z
2

I recommend using Shoes out of the 2. Shoes is a nice simple way to build small applications using Ruby. The reason why Shoes is better than TK for your application is that it makes it very simple to create graphics.

Shoes is well suited to small apps and it will be quite hard to create a game creator using it.

You are probably better off using an SDL based game framework such as Rubygame . This works on Linux, Windows and OSX.

Zoilazoilla answered 2/1, 2011 at 12:38 Comment(0)
S
0

For the simple, typical editing most GUI kit will do just fine. However, for the more complicated (and especially the level creation/editing) you're mostly gonna end up using a lot of self-made rendering in DirectX/OpenGL.

I don't know a lot about Ruby though, but I'd consider GUI kits Or frameworks with that aspect in mind.

Just thought I'd share my 2 cents :)

Supererogation answered 2/1, 2011 at 2:49 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.