Is python fast enough for a simulation heavy game similar to Dwarf Fortress?
Members - Reputation: 370
Posted 25 August 2012 - 08:55 AM
My fractal viewer was based at first on internal codes but this was bad and not really scalable. After that I used a very simple dll interface. The performance breaks down (nearly 30%!) . I also started a lua interface. The performance breaks down once more (nearly 50%!).
So on my opinion. Don't use scripting languages in big loops (10000 iterations and up) but you can use it for simple things.
This was my experience with scripting languages. I used lua the most of the time. But lua is a little bit faster than Python, so there shouldn't be much difference.
I have a blog: omercan1993.wordpress.com look there for more content
And I also do some art: omercan1993.deviantart.com
And whats about the Pear3DEngine? Never heard of it? Go and look!
Yeah, and currently I do this: SimuWorld
PS: Please look at this poll on my blog about scripting languages: A opinion poll about scripting language
Members - Reputation: 123
Posted 26 August 2012 - 03:25 AM
While it seems not as popular as Pygame, I can highly recommend Pyglet for rendering your game (2D or 3D).
Senior Moderators - Reputation: 9997
Posted 26 August 2012 - 12:15 PM
A word on PyPy:
CPython is obviously slow, and that is somewhat intrinsic to the fact that it is a straight-forward bytecode interpreter. Others have mentioned IronPython, native code modules, or hybrids thereof (cython, shedskin, etc.), to obtain better performance, but PyPy takes the cake for simplicity, being pretty much a drop-in replacement for CPython.
Is PyPy as fast as hand-coded C modules? Not yet, but it's getting closer. It is already significantly faster than CPython for most workloads, and even measures up to cython in some places. Plus there are the cases where a tracing JIT is just plain better at optimising than a static compiler...
Tristam MacDonald - Software Engineer @Amazon - [swiftcoding]
Crossbones+ - Reputation: 19568
Posted 26 August 2012 - 08:30 PM
I can't comment on the rest of the thread, and I'm not advocating C++ over Python, but if you do go the C++ route, I am advocating SFML over SDL (if you use C++).
Any thoughts on SDL vs SFML for c++?
Reason: SDL has somewhat lagged in development as of the past few years though it's still chugging along, SFML has a more C++ friendly interface, multi-window support, full hardware acceleration by default (SDL's is software by default with hardware optional). They both are well documented.
All glory be to the Man at the right hand... On David's throne the King will reign, and the Government will rest upon His shoulders. All the earth will see the salvation of God.
Of Stranger Flames - [indie turn-based rpg set in a para-historical French colony] | Indie RPG development journal
[Need web hosting? I personally like A Small Orange]