[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[pygame] Pygame vs RUDL



I recently tried Ruby along with RUDL - the Rubyesque Directmedia Layer -
and found out a few things:

1) I don't really see why so many people decide to use Ruby - Although some
of it's features are nice, the syntax is too ambiguous and/or obfuscating at
times (IMHO). Of course I still like it better than most other scripting
languages out there (cough, PERL), with the notable exception of Python :).

2) I LOVE RUDL - at first it seems like a straight port of Pygame to Ruby,
but there are some points where I believe Pygame could in fact learn from
its counterpart.
Here are some of them:

- pygame.draw : why not add the primitive drawing functions to the Surface
class? And, more importantly: why does Pygame not accept alpha values for
primitives at ALL, while RUDL handles them nicely (IIRC those functions are
based on the same C source in both)

- In RUDL, I can do this:
$Display=DisplaySurface.new($ScreenSize)
$Display.flip()
In Pygame however I have to write:
Screen=pygame.display.set_mode(ScreenSize)
pygame.display.flip()
and can not do Screen.flip()
I think that having a special DisplaySurface class here is more intuitive.

- RUDL supports SFont: I like bitmapped l33t effect fonts with alpha-layered
shadows. (This may only be a personal preference ;)

- RUDL implements the Surface.print( coord, text, color )  method from
SDL_gfxprimitives, which is quite useful for temporary debugging output. If
you use part of the library why not add support for this too?

Okay, that's it for the comparison basically, but I have another request:
Let the width parameter of those pygame.draw objects that can be filled
default to 0 - just for the convenience factor.
Now please don't get me wrong, I like Pygame a whole lot and appreciate the
effort put into it so I just want this post to be taken as constructive
criticism or, more precisely the ranting of a f00l that demands the best of
2 worlds ;).

Oh, something else I discovered when working with both of these SDL
implementations that may interest some of you is that they are exactly
equally fast, as long as the fps rate is limited by gfx processing and not
the language itself. (I coded the same app in both to test this)





____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org