Monday, 31 March 2008

Programming language?

I've watched with bemusement over a few of the language wars that periodically erupt on, with the kind of wry amusement of somebody who has learned C and realises everything worth doing can be done with it.

However, I'm at the start of prototyping a game project as a sideline to Unangband. And I'd like to stretch my programming legs.

I need something with a very quick time-to-screen. That's like time to crate, but I need to start outputting vector graphics very quickly, in order to test procedurally generation of in-game characters. I also need something with good handling of large bit vectors array, for genetic algorithms, and the ability to scale up to millions of individual actors. And a strong database back end so I can readily do reporting over the large amount of data that'll be generated.

And it has to be multi-platform.

C is not particularly suited to any of these tasks.



Kleedrac said...

After reading this article I've been spending what little free time I have learning Python and Pygame for exactly the reasons you stated in your post. I like rapid development and I really am a person who does better with quick gratification. Hope this helps.

oarfish said...

Java would sound like a reasonable fit, other than its terrible handling of native types. There's plenty of math libraries out there for it though, to help get round such matters.

There's C# too, which has much better native type support and transparent interop / direct c/++ compilation but if you want it portable you can't use most of the good bits of the framework.

You will need to rely on native libraries for performance sensitive bits of a python system, whereas with java / c# you can go managed all the way.

Also, have you considered an object db? They are great for rapid prototyping with persistence in managed languages, and have comparable performance to ORM and a traditional RDBMS.

tormodh said...

I'd say Java, and maybe especially if you take a look at JavaFX[1].

Flex[2] would perhaps fit the bill easy, perhaps even better. Chet Haase has a blog[3] started as he moved from Sun; there are some examples of vector drawing there.

(PS. Flex SDK is free download - it is at the bottom of the free trial version of the whole adobe flex dev suite. pretty sure you can get Eclipse set up for Flex.)

I'd love to see you blog extensively about this whatever language you choose. I need a bit of motivation to get into something else, too.


nornagon said...

Haskell! I've found that organising one's ideas and code succinctly and readably is most easily done in Haskell, out of the several languages I know (C, C++, Perl, Python, Ruby, and some others I forgot). If you've never programmed in a functional language before, learning Haskell is a good way to stretch your mind in a new way. It's not that functional programming is at all hard; it simply provides a different view of the problem domain, the understanding of which lends one a new perspective and a new approach for solving problems.

If you're feeling less adventurous, Python's a good choice for an imperative language. Personally I find it a little less expressive and fluid than Ruby, but it does feel more robust.

eykd said...

I'm currently participating in Pyweek 6, a game development competition for the Python[1] language, and I can say that Python+Pyglet[2] or Python+Pygame[3] both have very quick times to screen.


There are plenty of supporting libraries for most any feature you could want, to help you avoid reinventing the wheel for a prototype. I would recommend Cocos[4] for scene management, Rabbyt[5] for fast sprite management, numpy[6] for large arrays. There's also BitVector[7], but I've never used it.


The only thing lacking is good vector image (aka SVG) support. Pygame has built-in hooks to SDL drawing capabilities[8]. Pyglet has a 3rd-party library w/ vector drawing available[9].


Aron Murray said...

Fast to develope vector graphics that is cross platform?


javafx or air which are apprently flash++ seem good if bleeding edge options to.

FSK said...