• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
AniMerrill

Performance issues with Pyglet? Alternatives?

7 posts in this topic

I'm going to ask a question here I asked over at StackOverflow just because I'm not really getting an answer over there. :/

 

Basically I've been avoiding Python for my game just because its supposed to have a lot of performance issues. I actually bought a book today that demonstrates how to do some basic programming with C and the SDL/OpenGL libraries (partially just because I've always wanted to learn C anyway, for fun) when I noticed somewhere Pygame is actually backed up by having most of the SDL be in C, and it just acts as a wrapper.

 

I heard Pyglet was a good tool for using OpenGL which I'd rather use, both for specific features and just general performance from being hardware accelerated, but I noticed that it was written in "pure" Python. Is Pyglet known for having performance issues? Has anyone here used it to any great effect?

 

And since I'm going to be learning it anyway, if Pyglet DOES have issues since its all Python, what are my best alternatives for getting OpenGL in Python with maybe some C to back up the performance?

 

Thanks!

0

Share this post


Link to post
Share on other sites

There are not really general performance issues with languages, you always need to consider the context. Even most hi-performance engines like UDK use slower scripting languages ingame to perform certain tasks. So you need to define your goal first and then choose a suitable language (there will be always a lot of options). If performance would be all we need, all games would be most likely writting in asm by a handful of uber-experts smile.png

 

If you want to learn this language with a small test project/game, then just do it. Many performance issues come from using wrong data structures, bad coding styles or badly suited algorithms and not directly from the language. happy.png

Edited by Ashaman73
1

Share this post


Link to post
Share on other sites
AFAIK you can use OpenGL via PyGame as well, right?
 

Is Pyglet known for having performance issues? Has anyone here used it to any great effect?

I've never used it, but it was initially made as a university project by a guy with no games industry experience, so I'd expect performance to be typical of "academia" ;) tongue.png Edited by Hodgman
0

Share this post


Link to post
Share on other sites

Note that pygame and pyglet are not game engines. They are APIs. A full engine with bindings to python could perform very well. Check out PyOGRE (not a full game engine, but a powerful 3D graphics engine) and Panda3D (full game engine).

0

Share this post


Link to post
Share on other sites

I've never used it, but it was initially made as a university project by a guy with no games industry experience, so I'd expect performance to be typical of "academia" ;) tongue.png

I wrote a planet renderer with it...

But then again, the planet renderer is pretty much all GPU-side. One could probably get away with write the CPU-side portion in bashscript.
2

Share this post


Link to post
Share on other sites


Basically I've been avoiding Python for my game just because its supposed to have a lot of performance issues.

 

I've read somewhere that Python is, on average, around 20x slower than C, with the "worst case" scenarios reaching as high as 100x.

 

These measures, if true, seem unforgivably high, but in most cases, I think it basically reduces down to "the speed of light vs the speed of sound" argument: The speed of sound is ~880991x slower than the speed of light, but this is only obvious in specific circumstances, and it's only then that it actually matters.

 

So, if I were you, I would consider theoretical execution speed to be irrelevant, until it actually becomes a problem (which might be never).

1

Share this post


Link to post
Share on other sites
If performance becomes an issue, you could give PyPy a try. Of course, you could give PyPy a try without having any performance issues, as well. smile.png

According to the PyPy compatibility page pyglet works fine with PyPy. This is only true for pyglet 1.1.4, though, as PyPy doesn't support Python 3 yet.

Here is the most recent status update for the py3k branch of PyPy (the branch that adds support for Python 3) in case you're interested:
http://morepypy.blogspot.se/2013/06/py3k-status-update-11.html
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0