Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: PySFML for a newbie?  (Read 6880 times)

0 Members and 1 Guest are viewing this topic.

tmTim

  • Newbie
  • *
  • Posts: 1
    • View Profile
PySFML for a newbie?
« on: April 14, 2011, 07:25:04 pm »
Hey guys,
I've managed to get PySFML installed with Python 3.1. It runs fine and I've even figured out a few things within minutes.

I am also new to Python and want to work on a small game as a hobby, is PySFML suitable for me? There aren't as much tutorials or examples compared to PyGame but this seems much better in the long run.
I just hope that I'm not diving into something experimental and that it is useable enough for a newbie to learn on.

So.. Do you think PySFML is ready for use as it is or should I be sticking to pyGame or something first? Just trying to save some time in learning.

-tmTim

bastien

  • Full Member
  • ***
  • Posts: 231
    • View Profile
    • http://bastien-leonard.alwaysdata.net
PySFML for a newbie?
« Reply #1 on: April 15, 2011, 03:55:35 pm »
I haven't tried PySFML for Python 3, but I guess it probably has bugs like 2.x, and they probably won't be fixed, as it isn't under development anymore.
I've written an up to date binding for SFML 2 (which is the version you should probably be using), but sadly I've recently realized that it will need some work before the Python 3 version works.
The Python 2 version is supposed to be somewhat stable, but I'm not getting a lot of feedback from the community. I also think it's very likely that some methods that I never use are buggy, but it should be quickly fixed once someone reports the bug.
Also, I don't really really know where this binding is going. There have been several attempts of writing a better Python binding, but as far as I know, mine is the most complete currently, as well as being as fast as the old binding according to my tests with crappy drivers (I'd need to run them on Windows to get more interesting results). However I didn't get any feedback about that either.

As of learning, currently the best way is to learn with the official C++ tutorials, then learn how it maps to the Python version. I'll try to write a tutorial here one of these days as well.

Pygame is a good alternative, although its API is more awkward and it's slower when you do heavy stuff on hardware-accelerated platforms.

I'd say pick whatever floats your boat. If you need a very stable library or if you need to release a game soon, Pygame is definitively better currently. If you want your game to be usable on all Unix platforms and you know it won't require heavy graphics effects, then I'm not sure everyone will agree with me here, but I think Pygame is more suited as well. (I have terrible performance with SFML on Linux because of Intel's ant ATI's open source drivers.)

Edit: another popular library is Pyglet. It's closer to SFML in that it also uses OpenGL.
Check out pysfml-cython, an up to date Python 2/3 binding for SFML 2: https://github.com/bastienleonard/pysfml-cython

 

anything