Question

I would like to build a simple standalone solitaire game in ruby. Are there any libraries I should use? Do I even need game libraries to have cards moved from one stack to another? I have never written any games, and I haven't built a standalone app for a long time, that's why I'm lost :)

Was it helpful?

Solution

It seems you are rushing into the graphics part of your game. Have you thought, deeply, about your game logic? I'm also into game development and what I usually do before going into graphics is getting all the game logic implemented (or the most part of it) so I can test in the system console / command line. After I'm happy with it, I move on to graphics, sound, animation and other cool stuff

OTHER TIPS

I tend to agree with nairdaen about working on the domain logic first. But, if/when you want to work with graphics/sounds, I suggest Gosu as it has a very nice and simple API.

I used Rubygame once to prototype collisions and visualize them. It's a good graphic library for 2d games.

For the "standalone" part of your question, it's a little bit tricky in Ruby because running a Ruby application requires the Ruby interpreter and all the libraries used by your application. Distributing your game can become cumbersome for the user. However, you can have a standalone Windows application (read: .exe) using RubyScript2Exe.

I hear Shoes is easy to use for GUI development, but I don't have any personal experience with it. You could use it to draw up the game screen and move the cards around once they're clicked. Asides from that, I wouldn't think there's any libraries you would need unless you have a particular problem in mind.

As others are suggesting, start with game engine, which can be controlled entirely by console, and worry about GUI later.

Do I even need game libraries to have cards moved from one stack to another?

No, you can implement it as dynamic web application and use prototype javascript library for moving cards (as images) from one "heap" to another.

Yeah you really need to program all the logic before even thinking about graphics. A lot of people getting into programming think about the graphical representation as the main representation of the code as opposed to the logic backend. The logic is where everything happens the graphics are just representations of the logic.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top