Monday 31 March 2008

Programming language?

I've watched with bemusement over a few of the language wars that periodically erupt on rec.games.roguelike.development, 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.

Suggestions?

7 comments:

Kleedrac said...

After reading this article http://www.gamedev.net/reference/articles/article2259.asp 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.

Ryan 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.

http://www.db4o.com/

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.

[1]http://sun.com/javafx
[2]http://www.adobe.com/products/flex/
[3] http://graphics-geek.blogspot.com/

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.

[1] http://www.python.org
[2] http://www.pyglet.org
[3] http://www.pygame.org

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.

[4] http://code.google.com/p/los-cocos/
[5] http://matthewmarshall.org/projects/rabbyt/
[6] http://numpy.scipy.org/
[7] http://pypi.python.org/pypi/BitVector

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].

[8] http://www.pygame.org/docs/ref/draw.html
[9] http://groups.google.com/group/pyglet-users/web/2d-drawing-primitives-module

Aron Murray said...

Fast to develope vector graphics that is cross platform?

Flash.

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

FSK said...

How about INTERCAL and LOLCODE?