Creating Ruby applications for Windows

2020-07-09 03:01发布

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.

3条回答
放荡不羁爱自由
2楼-- · 2020-07-09 03:15

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

查看更多
干净又极端
3楼-- · 2020-07-09 03:20

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.

查看更多
我欲成王,谁敢阻挡
4楼-- · 2020-07-09 03:21

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.

查看更多
登录 后发表回答