Jump to content
  • Advertisement
Sign in to follow this  
steveworks

graphics with python?

This topic is 3649 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm currently pretty far into learning python and after a lot of experimentation I would like to move onto making games that have graphics (not just ASCII text). What should I learn to use to accomplish this. I was Thinking about PyGame but I don't know of any alternatives. My games would be things like pong or tetris nothing 3D. It would be appreciated if you post recomended books or tutorials if you reply.

Share this post


Link to post
Share on other sites
Advertisement
I personally prefer Pyglet because I find that it works better for me, but both work quite well and it is mainly up to personal preference.

As a note, Pyglet can work with OpenGL which allows you to do 3D which you may find to be useful at sometime in the future.

~Cody

Share this post


Link to post
Share on other sites
Quote:
Original post by steveworks
Well I read that PyGame can be used in conjunction with PyOpenGL so I'm pretty sure it can do 3D too.

True, and PyGame and Pyglet are not mutually exclusive. I sometimes use PyGame for easy graphics setup in prototypes, but Pyglet for media playback services. I haven't tried rendering a video processed by Pyglet onto a PyGame surface yet, but I think it's possible.

Share this post


Link to post
Share on other sites
I'll throw my recommendation in for pyglet. You can write very concise event-driven code with pyglet's high-level classes, subclassing as necessary. I particularly like the event framework. You just make your own classes derive from the event dispatcher and then their custom events can be handled like any other pyglet event.

Using the OpenGL interface requires some knowledge of the ctypes module, but you could use PyOpenGL if that became too much of a pain. With the abstractions already provided you should rarely need to dip down to that "low" level anyway.

If you download pyglet go ahead and get the 1.1 beta since there are some significant changes that will become standard practice with the next release.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!