Game development software based on the Python programming language.

learn more… | top users | synonyms

4
votes
2answers
605 views

Using Python what is the best way to perform heavy tasks in the background?

I'm generating large amounts of procedural map data on the fly, however my game engine doesn't rely on them to render the scene and I'd like to build it on in the background and pop it into the world ...
2
votes
2answers
913 views

PyGame custom isometric engine : caching or not?

Sorry if this question about is a bit broad. In the game I'm making, I need an isometric view with some altitude, which means players can go behind a hill, and be partly or totally hidden. To avoid ...
3
votes
1answer
647 views

Fatal Python error: (pygame parachute) Segmentation Fault when using PyGame and cx_Freeze

I'm using cx_Freeze to package my PyGame game. I'm running Ubuntu Linux, so I used the source package. However, I got the following error when I run cxfreeze game.py: Fatal Python error: (pygame ...
0
votes
2answers
153 views

Spritegroups and colorkeys

I have a problem using spritegroups in pygame. In my situation I have 2 spritegroups, one for humans, one for "infected". A human is represented by a blue circle: image = pygame.Surface((32,32)) ...
-2
votes
1answer
102 views

Imports in python [closed]

Recently I downloaded a game off pydev and the imports for it look like this below. import pygame from pygame.locals import * However I have only ever created games by calling the in this way. ...
3
votes
4answers
441 views

When connecting a physics engine to another engine, should you do all your logic in the units used by the physics side or the rendering side

I'm currently intergrating pygame and pyBox2D, and am wondering which side is best to try to keep to in terms of game units of size. Box2D is Meters PyGame is Pixels At the moment I am thinking I ...
1
vote
1answer
323 views

How to debug easily an 2D arcade game?

I am trying to learn pygame. In order to do that, I have downloaded one of their examples : http://rpg-world.googlecode.com/files/rpg-world-src-0.93.tar.gz And started to run it in debug mode. ...
1
vote
2answers
457 views

Pygame circular cropping/masks

I have been going through the documentation and the Pygame functions and classes today, but couldn't find a reasonable way to either create a circular crop of an image or how to use a mask to perform ...
2
votes
1answer
1k views

Pygame water ripple effect

I have Googled for it but there are no ready scripts - as opposed to the same effect on Flash. I have checked the algorithm on The Water Effect Explained and also tested an implementation of the ...
13
votes
3answers
2k views

What is a good algorithm for fractal-based procedural city layout?

Background I run a minecraft server where I'm going to design a starter city of fairly large scale. I have a series of things, like rule signs and mob cages, I would like to put in buildings there. ...
7
votes
4answers
7k views

Which language and tools should I choose for creating 2D games? [closed]

Recently I have returned to my childhood hobby (programming games) and found it quite enjoyable. I've been tinkering with PyGame (for Python) for a few months, made a couple of projects for ...
7
votes
2answers
2k views

Increase blitting speed?

I'm working on a 2d sidescroller in PyGame. For each map we use one texture (this is the actual size of the texture): Then we load the image with this code: sprite = ...
0
votes
1answer
468 views

python for game development [duplicate]

Possible Duplicate: Famous games written in Python Is python any good for game development? Can I have some examples of great indie python games. So I can have an idea what it's capable ...
3
votes
4answers
224 views

What can be a game-play element in a game with Shakespeare's plays as the main theme?

I was thinking of learning about making games, so I thought of an idea about making a game on a play, since the content is already there. I actually found well parsed XMLs of Shakespeare's plays. I ...
1
vote
3answers
501 views

Basic developing in python? [closed]

I have basic experience in Python, and I want to know which is the best library to use in development. I was looking originally at Pygame but found it a bit lacking in tutorials. Are there any good ...
1
vote
2answers
303 views

Secondary monitor freezes game window

I was bored and dragging my game window around the screen and noticed something interesting. When I drag my game window over to my secondary monitor, the screen updating just completely freezes. Is ...
4
votes
1answer
691 views

Issue with implemented Minesweeper algorithm

So I'm attempting to learn Python by way of Minesweeper. I've got experience with SDL, so I figured playing around with PyGame sounded like a fun way to learn the syntax of the language. Anywho, I'm ...
5
votes
1answer
607 views

Separating Sprites from Models with PyGame

So I'm trying to code a game using the Model-View-Controller pattern, and therefore have a need to separate the models for my game objects with their sprite representations. The problem that I'm ...
0
votes
1answer
369 views

Batch blit vs separate blit

A tutorial that I have followed had me collect and blit all of my sprites with the following lines: allsprites = pygame.sprite.RenderPlain((l_sprites)) allsprites.draw() At the moment, this is fine ...
3
votes
3answers
532 views

Problem in blitting a clean, crisp sprite

I am having a bit of a tooling problem...and I am unsure of how to solve it. I am currently using PyGame to try and write a simple Minesweeper clone, except my sprites that I made are hexagon based ...
2
votes
2answers
6k views

Pygame How To Use Collision?

Can someone tell me how to implement collision in Pygame? For example I have a sprite called A and another one called B. How do I detect if they collide in Pygame?
9
votes
2answers
612 views

Common pattern to scale “real units” to pixels?

This is a follow-up question to this other one. I would like to know if there is a common/typical/best pattern to scale my representation of the world (currently 160Kmx160Km) to fit it to the drawing ...
0
votes
4answers
969 views

When should I learn Pygame?

I've been learning python for about 2 months now. I think I'm getting used to the language. My question is, when should I start learning Pygame? Or how do I know if I'm ready for it? I'm learning ...
0
votes
2answers
475 views

sprite group doesn't support indexing

I have a sprite group created with pygame.sprite.Group() (and add sprites to it with the add method) How would I retrieve the nth sprite in this group? Code like this does not work: mygroup = ...
1
vote
2answers
262 views

shuffle a sprite group

Is there a way to shufle a group of sprites created with: pygame.sprite.Group() I have tried using random.shuffle but it apparently doesn't work on sprite groups.
6
votes
2answers
780 views

How to write reuseable components for pygame

Is there a recommended way to write reuseable components for pygame? Simple example would be a FPS counter. Should I write a class which has an init, update and draw method and call them from inside a ...
2
votes
2answers
887 views

Problems moving a rectangle in Pygame

I'm making a game in Pygame and I want to be able to target enemy unit. I made it so when I click on them a variable "targeted" becomes true, and stays true until I click somewhere else on the screen. ...
3
votes
3answers
814 views

What are the usual tools for importing models and animations?

I'm a total noob with regard to game programming (though not a noob to programming) and I'm using pygame + opengl to do some experiments with a little game I've been thinking of. I've been trying to ...
-1
votes
3answers
2k views

Will I have an easier time learning OpenGL in Pygame or Pyglet? (NeHe tutorials downloaded)

I'm looking between PyGame and Pyglet, Pyglet seems to be somewhat newer and more Pythony, but it's last release according to Wikipedia is January '10. PyGame seems to have more documentation, more ...
6
votes
5answers
2k views

Are there any good UI widget toolkits for Pygame? [closed]

Are there any good, modern widget toolkits for Pygame? I've looked at PGU, but it's apparently unmaintained.
5
votes
8answers
7k views

Alternative to pyGame? [closed]

i'm learning something about game programming from a book about "pyGame". pyGame is simple, but... python is a little complex and different from my previous knoweledge about programming. I know ...
2
votes
2answers
450 views

Help making a visual transition with pygame and NumPy

Perhaps this could be better answered on Stack Overflow, but I thought it would be worth posting here. Right now I'm trying to make visual transitions with pygame's surfarray module which uses NumPy. ...
9
votes
6answers
4k views

Make pygame's frame rate faster

By profiling my game, I see that the vast majority of the execution time of my hobby game is between the blit and the flip calls. Currently, it's only running at around 13fps. My video card is fairly ...