Python Game Development?

L

letsplaysforu

I was planning on making a small 2D game in Python. Are there any librariesfor this? I know of:

• Pygame - As far as I know it's dead and has been for almost a year
• PyOgre - Linux and Windows only(I do have those, but I want multi-platform)
• Cocos2D - Won't install and cant find any support
• PyCap - Can't find any documentation
• Panda3D - Dead since 2011 + overkill for what I need
• PyOpenGL - Overkill

Any help on what to do with this would be appreciated. I am making games mainly in Lua but I'd like to make one in Python for fun. I also understand that Python isn't exactly the *BEST* choice programming a game, but I have heard it is possible. Tell me if it's true. Thanks!
 
I

Ian Kelly

I was planning on making a small 2D game in Python. Are there any libraries for this? I know of:

• Pygame - As far as I know it's dead and has been for almost a year
• PyOgre - Linux and Windows only(I do have those, but I want multi-platform)
• Cocos2D - Won't install and cant find any support
• PyCap - Can't find any documentation
• Panda3D - Dead since 2011 + overkill for what I need
• PyOpenGL - Overkill

Any help on what to do with this would be appreciated. I am making games mainly in Lua but I'd like to make one in Python for fun. I also understandthat Python isn't exactly the *BEST* choice programming a game, but I haveheard it is possible. Tell me if it's true. Thanks!

Pygame is still quite commonly used, and the most recent commit was in
April, so I think it's too early to pronounce it dead (although
pgreloaded, which at one point was intended to be a successor to
pygame, is looking a bit dormant now).

A lot of folks also like pyglet, but I've never used it myself. I
suspect it might also be overkill for you.

And yes, it's definitely possible to make games in Python. Go to
pyweek.org and check out many of the awesome games that have been
developed in Python in only one week.
 
E

Eam onn

Pygame is still quite commonly used, and the most recent commit was in

April, so I think it's too early to pronounce it dead (although

pgreloaded, which at one point was intended to be a successor to

pygame, is looking a bit dormant now).



A lot of folks also like pyglet, but I've never used it myself. I

suspect it might also be overkill for you.



And yes, it's definitely possible to make games in Python. Go to

pyweek.org and check out many of the awesome games that have been

developed in Python in only one week.

Do you know of any tutorial for PyGame? Preferably a video tutorial but anytutorial at all is fine! I can't seem to find any, even on pygame.org!!!
 
E

Eam onn

I was planning on making a small 2D game in Python. Are there any libraries for this? I know of:



• Pygame - As far as I know it's dead and has been for almost a year

• PyOgre - Linux and Windows only(I do have those, but I want multi-platform)

• Cocos2D - Won't install and cant find any support

• PyCap - Can't find any documentation

• Panda3D - Dead since 2011 + overkill for what I need

• PyOpenGL - Overkill



Any help on what to do with this would be appreciated. I am making games mainly in Lua but I'd like to make one in Python for fun. I also understandthat Python isn't exactly the *BEST* choice programming a game, but I haveheard it is possible. Tell me if it's true. Thanks!

Pygame isn't too good. You still need a lot of other libraries from what I understand(like for physics). Is there any alternative for 2D?
 
I

Ian Kelly

Pygame isn't too good. You still need a lot of other libraries from what I understand(like for physics). Is there any alternative for 2D?

I don't know of any Python libraries that provide both a rendering
engine and a physics engine.

I'm not sure why you say pyame "isn't too good". A library that only
does one thing shouldn't be considered a bad library if it does it
well. I hear that pygame doesn't scale very well to large games, and
it certainly wouldn't be my first choice for a 3D game, but I've never
had any major issues with it myself. There's a largish list of
alternative libraries that you might consider here:

http://wiki.python.org/moin/PythonGameLibraries
 
D

Dan Stromberg

I also understand that Python isn't exactly the *BEST* choice programming
a game, but I have heard it is possible. Tell me if it's true. Thanks!

One of the Blizzard people told me that it's very common to program game
logic in Python, with the 3D stuff done in C wrapped up to be callable from
Python.

But I've since heard that Blizzard mostly uses Lua, from someone who
doesn't work at Blizzard. Maybe Blizzard use both Python and Lua, or maybe
they changed, I don't know.
 
I

Ian Foote

I was planning on making a small 2D game in Python. Are there any libraries for this? I know of:

• Pygame - As far as I know it's dead and has been for almost a year
• PyOgre - Linux and Windows only(I do have those, but I want multi-platform)
• Cocos2D - Won't install and cant find any support
• PyCap - Can't find any documentation
• Panda3D - Dead since 2011 + overkill for what I need
• PyOpenGL - Overkill

Any help on what to do with this would be appreciated. I am making games mainly in Lua but I'd like to make one in Python for fun. I also understand that Python isn't exactly the *BEST* choice programming a game, but I have heard it is possible. Tell me if it's true. Thanks!

You might also wish to consider Kivy (kivy.org).

Regards,
Ian F
 
J

Jan Riechers

I was planning on making a small 2D game in Python. Are there any libraries for this? I know of:

• Pygame - As far as I know it's dead and has been for almost a year
• PyOgre - Linux and Windows only(I do have those, but I want multi-platform)
• Cocos2D - Won't install and cant find any support
• PyCap - Can't find any documentation
• Panda3D - Dead since 2011 + overkill for what I need
• PyOpenGL - Overkill

Any help on what to do with this would be appreciated. I am making games mainly in Lua but I'd like to make one in Python for fun. I also understand that Python isn't exactly the *BEST* choice programming a game, but I have heard it is possible. Tell me if it's true. Thanks!

Hi,

I only have looked closer in pygame. But before asking for an general
overview of possible gaming libraries, I would start to answer the
question of what kind of game you want to make and what features do you
really need.

For some space game for example it is most unlikely that you will face
the requirement of having a bleeding edge physics engine. Especially if
you make use of 2d objects versus 3d models of any type. I guess you can
expand the latter to any extend here.

Also it is a common thing I might guess bravely, that the basics of game
programming are done similar in all game engines.

- Setting up a game loop
- Calculation present and future ob objects
- Handling user input by using events
- Redraw the screen

And this is in pygame quite simply, but I also had trouble finding the
right entrance to it, as you have to read a bit up on how components fit
together in that library.

An example basic setup looks like (with classing), I remove my code and
limited it to basic event/input handling and also the drawing of a
screen object in which you can add images and stuff.

Sorry for the formatting, I copied from idle and formatted in my email
client.

#----------------------------------------

class gameApp:
def __init__(self):
pygame.init()
self.clock = pygame.time.Clock()

self.screen = pygame.display.set_mode( (640, 480),
DOUBLEBUF|SRCALPHA )
self.run()


def run(self):
while not self.close_app:
self.clock.tick(60)

for event in pygame.event.get():
#print event

if event.type == KEYUP:
# Press tab for player info
if event.key == 9:
pass # Do something in tab key

elif event.type == MOUSEBUTTONDOWN:
if event.button == 1:
pass # Left click, mouse button is pressend

elif event.type == MOUSEMOTION:
mx = event.rel[0]
my = event.rel[1]
continue


elif event.type == QUIT:
self.close_app = True

self.screen.fill( (0,0,0) )
# Self interaction is a screen drawing object
self.screen.blit(self.interactions, (0,0),
special_flags=BLEND_RGBA_ADD)

pygame.display.flip()



pygame.quit()


if __name__ == '__main__':
import pygame
from pygame.locals import *
gameApp()


#----------------------------------------


Regards
Jan
 
F

Fábio Santos

It wasn't your question, but I was happy to find out that box2d exists for
python.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,954
Messages
2,570,116
Members
46,704
Latest member
BernadineF

Latest Threads

Top