0

I want to create a somehow complex application:

It is a game level editor. You can put in tiles and other objects for a level. Then "compress" the level data into a file.

With another application, it will read the file's data and play the game.

The application is for Windows mainly. Other platforms are yet to be considered.

So I need help deciding:

If you were to do something like what I described, which programming language would you choose?

I want to decide between Ruby or Python. I want you to help me choose depending on my following needs:

  • Easy GUI platform for making the editor.
  • Can show sprites, move, transform them etc.
  • Can play audio.
  • Can compress data, graphics and audio. The compressed file can only be read by another application I make.
Saturn
  • 17,888
  • 49
  • 145
  • 271
  • 2
    Both Ruby and Python are great languages. Why are you still debating using Ruby or Python when you were adamant about using TK or Shoes for a Ruby GUI in your other question (http://stackoverflow.com/questions/4576810/creating-ruby-applications-for-windows)? – Sean Hill Jan 02 '11 at 04:45

2 Answers2

4

Python + PyGame. Hands down. You will benefit from:

  • Good docs for both the language and PyGame
  • GUI, sprites, and audio all in one, again with PyGame
  • Better Windows support than Ruby (you can install both Python and PyGame from .exes)

Desktop applications (esp. for Windows) aren't really Ruby's sweet spot. PyGame will serve your purposes perfectly, though.

That's not to say you couldn't do it with Ruby; you could write this in any language. But for ease of use, Python is the way to go.

Rafe Kettler
  • 75,757
  • 21
  • 156
  • 151
  • So PyGame has GUI functions? And it can "compress" data/graphics/sounds so nothing else can read it unless it is my "player" application? – Saturn Jan 02 '11 at 05:03
  • @Omega it does have GUI functions. I don't believe it has compression capabilities, but you can always use SQLite, which is also built in to Python. – Rafe Kettler Jan 02 '11 at 05:05
  • @Rafe Kettler SQLite is a database engine, not data compression. But of course there are all kinds of compression and graphics handling libraries for Python. Also pygame is not really GUI, it's just graphics and input (so yes, you can make a GUI with it), wxPython is a GUI toolkit with dialogs, menus etc. – MK. Jan 02 '11 at 06:43
  • @MK I think he's thinking more along the lines of persistence, which SQLite does well. And yes, PyGame isn't a proper GUI toolkit, but since the majority of his application would be a canvas-style widget, PyGame would do better. wxPython (or Tk, or Qt, or whatever) can also be mixed with PyGame in a pinch. – Rafe Kettler Jan 02 '11 at 06:46
  • Substitute Python for Ruby and PyGame fot Rubygame and this answer is just as valid (or silly). – steenslag Jan 02 '11 at 14:42
  • @steenslag I think there are major differences, especially in the quality of documentation. Specifically, Ruby has none. – Rafe Kettler Jan 02 '11 at 14:51
1

I've never used Ruby but I'm sure there is virtually no difference between the 2 when it comes to libraries. I know what you want can be done with Python using wxPython or pygame (or the combination of two). But I'm sure there are similar libs for Ruby. So just look at both languages and use the one you like better.

MK.
  • 33,605
  • 18
  • 74
  • 111