Hacker News new | past | comments | ask | show | jobs | submit login
PyDark – 2D Game Framework (pydark.com)
69 points by gnocchi on Feb 1, 2015 | hide | past | favorite | 20 comments



I wish people would stop building things with pygame.

Its a terrible, buggy, crash prone obsolete framework.

Learning pygame may teach you basic skills you can transfer to other better frameworks; but it teaches you 10 year old skills that are largely irrelevant on modern hardware, and gives you a rubbish introduction to python (welcome to segfault hell).


Hello shadowmint, can you be more specific what modern techniques pygame is missing and which ones it has are obsolete? I'm genuinely interested (no sarcasm.)


shaders. component entity systems. gpu processing. user interfaces. physics. an asset pipeline. an exporter.

I mean, geez, just open Unity or UE4 and look at the features either has. You won't find them in pygame.

However, my real complaint is that pygame is so widely talked about and used, no one has made something better, they've just sort of tacked more and more rubbish as extensions onto pygame.

(oh, and that it crashes all the time, but you could argue the same for the 32-bit editor in unity)


What do you recommend, then?


Can't speak for @shadowmint, but I would recommend Kivy, or else leaving Python altogether and using Haxe.


pySDL2 or a different programming language.

Kivy is good too, but honestly, my feeling at the moment after trying all these frameworks is that in general python is poorly suited to high performance simulations; familiarity with the SDL2 api will help bridge the gap to using a different language which uses an SDL2 backend.


Does this offer any performance advantage over vanilla pygame? Because I found myself pushing the limitations of it very quickly and had to move on to other frameworks and languages other than Python.

As one example of its shortcomings, Pygame doesn't seem to support hardware rendering and the maintainer seems to think this is an advantage [ http://www.pygame.org/docs/tut/newbieguide.html ]



In particular, in the game context there is kivent (http://kivent.org/), though it's at an early release stage.

Edit: To be clear, you can make games in vanilla kivy just fine (and it's probably much more performant than pygame), but kivent is a dedicated game engine with more efficient graphics internals and nice things like chipmunk integration.


Cool, thanks for the heads up.

I wish bundling Python was easier. I read this morning in the Kivy docs that you can't even bundle python 3 at all yet.

Many years ago a friend of mine wrote a Python binding to the PopCap engine. It was so great, the exe and the script. Thats all you needed and you could just whack those two things in a zip and you're done.


and it works on android!


Pygame does support hardware rendering. The newbieguide is just recommending (newbies) not to use it because of all the drawbacks mentioned.


Oops, misread that.

I suppose I just picked up on the writer's ceaseless discouragement of using hardware rendering and interpreted that as a sign that it didn't support it instead of fully reading what was written.


Please, add an Edit to the parent so no one misses this.


Having to write your own event framework and network functions every time you write a game in PyGame is kind of a pain, so I can see how this would be really useful. I think I've written the same event handler about a half dozen times at this point for various games I've written.

It wasn't clear to me how hard it would be to incorporate something like Pymunk for physics though. One thing that I find a pain when using Pymunk and Pygame is having to keep track of the your rects when things are bumping off of each other, spinning, etc. It'd be cool if Pydark had built in support for some kind of physics engine.


Discussion on reddit[0] leads to this gem: http://docs.pydark.com/PyDark.net-pysrc.html#ServerProtocol....

Who thought that could possibly be a good idea?

[0] http://www.reddit.com/r/Python/comments/2ufo9y/the_2d_game_f...


Personally the code is confusing to me - the author jumps between OO and non-OO. I'm not saying that's necessarily a bad thing - but from what I've seen is that stuff he has as functions might be better suited for a class.

I do like the concept/design of it though.


Based on pygame, stopped looking.


I initially thought the same thing, but this does address a few things Pygame is lacking for people that are still learning programming/Python. A common question I get is "How would I make a UI with Pygame?" or handle input for different scenes versus the UI, and this seems to abstract it well for those that just want to jump in and get a working game (as opposed to a working game engine...).


So does it work on pypy




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: