Game development software based on the Python programming language.

learn more… | top users | synonyms

-1
votes
1answer
51 views

How to stop characters running in to each other? [duplicate]

I am new to pygame and am creating a small game in which players can push each other to go outside the given arena to score points. I have a problem in detecting when characters run in to each other. ...
2
votes
1answer
141 views

How do I get hardware accelerated graphics and shaders in PyGame?

I have created several simple games with PyGame, but until now, I have focused on mechanics rather than graphics. The graphics in my games have been extremely rudimentary, consisting of basic shapes ...
1
vote
1answer
39 views

When is messaging/observing preferable to 'built-in' functionality in game objects?

In working on a Python/Pygame project I recently came to an impasse which couldn't be solved elegantly via my previous methodology - using wrapping functions as an Observer pattern - and it was ...
0
votes
1answer
30 views

WebSockets and Python/PyGame

I am looking to start development on a game that will have the server be written in Python/PyGame and the front end be in HTML5. What I would like to do is, with as minimal impact as possible, open ...
0
votes
1answer
33 views

PyGame2Exe doesn't include spritesheet?

My directory for my Pygame program looks something like this: [Parent directory] lib engine Various .py files graphics spritesheet.py ...
1
vote
1answer
38 views

Midpoint Displacement 1D - How to properly reduce my random number range?

So I'm trying to implement this http://www.gameprogrammer.com/fractal.html#midpoint algorithm, to generate myself a terrain. In the tutorial is said: OK, before we go into 2D fractal surfaces, you ...
0
votes
1answer
95 views

Simulating Shadows with Pygame

I'm trying to simulate shadows for a 2d topdown RPG, but I can't think of the best way to do this so far I've tried making copies of the original game entities and turning all opaque pixels black ...
0
votes
1answer
35 views

Rotating image around a given point

Im trying to simulate shadows in a 2d RPG, So far I can make the shadows but i cant blit them properly, Im trying to rotate them according to where the "sun" is (just a position) I have looked at ...
0
votes
1answer
63 views

How to spin an object on its own axis?

I'm trying to spin up my own 3D vector graphics engine, so I'd like to do this without an existing library. And I don't seem to be able to find the math for the correct approach in rotating an object ...
2
votes
1answer
55 views

Get a random vector

I'm trying to make a small pariticle-like simulation, and I'm trying to make each parrticle go a random direction from one point (mouse pos). The problem is I don't know how to get the random vector ...
1
vote
1answer
76 views

3D vector graphics - maintaining correct Z 'length'

So I'm trying to build myself a 3D display 'engine', or whatever it ought to be called. I've been experimenting with PyGame, as it's familiar to me. In a way this has almost been more an excuse to ...
3
votes
1answer
77 views

Pygame collision detection less frequent when objects are increased

I currently experiencing an issue in pygame where whenever i increase the number of objects e.g. platforms, rocks for a in range(150): rock = Rock(0,0) OR incresing the range which they spawn ...
1
vote
1answer
78 views

pygame - avoiding sprite 'jitters' on rotating the image

Is there a common trick for getting around sprites that are changing directions 'too quickly' and causing their sprite to display erratically? In this project, the player moves in 8 directions by ...
1
vote
1answer
139 views

Detecting walls or floors in pygame

I am trying to make bullets bounce of walls, but I can't figure out how to correctly do the collision detection. What I am currently doing is iterating through all the solid blocks and if the bullet ...
0
votes
0answers
37 views

Figuring out commands of PyMo

I'm trying to develop a game for my mobile phone (runs on Symbian Belle), just something to learn how, not really planning on distributing and I've found a game engine called PyMo (SourceForge main ...
3
votes
1answer
125 views

What's the difference between Pygame's Sound and Music classes?

What are the key differences between the Sound and Music classes in Pygame? What are the limitations of each? In what situation would one use one or the other? Is there a benefit to using them in ...
2
votes
1answer
311 views

How to march tiles together like in Terraria?

I've been trying to get tile marching to work like in Terraria, and I got something to work. I don't think it's actually very good way of doing this, so I'm wondering what would be really the main way ...
0
votes
1answer
147 views

Collision detection without classes, in Pygame

I am writing a game in Pygame and want to get collision detection working. The aim is that when an object hits another, the target object disappears. I want to avoid having classes for now, to keep ...
-2
votes
2answers
85 views

Pygame 2d map error [closed]

I'm writing a Legend of Zelda like game in pygame. I have this code for loading a map from a text file. #Load maps f = open ("map1","r")#This file is a text file containing only: 1 map01 = f.read() ...
2
votes
1answer
126 views

How can I get post-processing effects with pygame?

I'd like to be able to make the screen like blurry and wavy, like when a player enters a portal in Minecraft. How would I make this with pygame?
1
vote
2answers
189 views

Sprite erasing text in Pygame

I'm making a Pong clone in which the user can press the 'p' button to pause/unpause the game. When the user presses the 'p' button the word 'PAUSE' is drawn to the screen and when he presses again the ...
1
vote
2answers
150 views

Monster attack is not randomising right [closed]

I have a code that I've been messing around with and the monster attack (monster.ma) isn't randomising after the first time it's called upon (elif statement). I've tried to make it a tuple since they ...
0
votes
2answers
132 views

Crossfade Between Two Music Tracks in Pygame

My intention is to have two music tracks, which are similar in nature, fade between each other at various times. When such a fade occurs, one music track should fade from full volume to muted in a ...
0
votes
2answers
273 views

Pygame - CollideRect - But How Do They Collide?

I'm having some trouble figuring out how I can handle collisions that are specifically colliding on the top or bottom a rect. How can specify those collisions? Here's a little code snippet to give ...
-1
votes
1answer
72 views

How to make an image bounce off the edges of the screen in Pygame?

I'm making a simple game where I bounce and image off the sides of the screen (a bit like the ball bounces in Pong) but I can't seem to the the bouncing part to work. Instead of bouncing of the edges ...
1
vote
1answer
123 views

How to get the angle to an object from angle you are facing [duplicate]

I am making an creature simulator where the creatures have a neural net for a brain. One of the inputs to the net is the angle it has to travel to go to be facing the nearest piece of food. I can get ...
2
votes
1answer
221 views

Tile based map player movement

I'm doing a tile based 2d rpg in pygame. The problem I'm working on right now is character movement... I am already able to create a map by using multidimensional arrays and a 'camera' follows the ...
3
votes
1answer
239 views

Adding lighting pygame

I have created a day and nigh cycle in a game of mine by drawing a rectangle over the screen and having it's alpha change constantly. However, I obviously want to add some lighting to the game. Is ...
0
votes
1answer
73 views

Pygame Particle Emitter Problems

so I've been trying to create a basic particle system in pygame which I can later expand upon but I've run into a spot of bother creating the particle emitter. Obviously what's supposed to happen is ...
1
vote
0answers
243 views

pygame double buffering

I am trying to use double buffering in pygame. What I'm trying to do is display a red then green screen, and switch from one to the other. Unfortunately, all I have is a black screen. I looked through ...
0
votes
0answers
85 views

Game physics movement

I am trying to write some code in Pygame that will achieve smooth movement from place to another. I've been able to do some nice physics for jumping but when I need to move horizontally I am not sure ...
22
votes
2answers
978 views

Random/Procedural vs. Previously Made Level Generation

What the advantages/disadvantages of using random/procedural generation vs. pre-made levels? There seems to be few that i can think of, other than the fact that items may be a problem to distribute ...
0
votes
2answers
133 views

Finding vectors with two points

We're are trying to get the direction of a projectile but we can't find out how For example: [1,1] will go SE [1,-1] will go NE [-1,-1] will go NW and [-1,1] will go SW we need an equation of ...
1
vote
1answer
148 views

Python + Pygame - Collision problems

I'm currently developing a game in Python + Pygame and i came up with a problem with the player and the platforms. The game is a 'runner' where the player it's fixed (The 'x' position isn't variable, ...
1
vote
1answer
125 views

Lightning Effect PyGame [closed]

I want to create a Lightning Effect Like http://www.youtube.com/watch?feature=player_embedded&v=mmU2GAYGVSU for my game. The following blog explains it briefly but I am not able to understand the ...
0
votes
1answer
87 views

PyGame sprite assistance

I've basically just started developing with PyGame and I am having trouble with the whole Sprite concept. I have been looking every where for guides on how to use it, I just can't seem to find any. I ...
1
vote
2answers
1k views

Installing the right version of PyGame

I've been trying to install PyGame for Python, and can't seem to get Python to recognize that it's there. I use Python 3.3, and have a 64-bit Windows computer, but that's really all I know. The ...
0
votes
1answer
367 views

Pygame top down shooter firing bullets

I'm working on a top down shooter in pygame and am having trouble getting bullets to fire. I'm using a class for the bullets, I'll show what I think is the relevant code. This is what I do after the ...
3
votes
1answer
92 views

How to make a map surface object

I'm making a 2d tile based game. In pygame I could create a map like this: screen = pygame.display(resolution) map = pygame.Surface(width, height) for tile in all_tiles: map.blit(tile) ...
1
vote
1answer
329 views

pygame performance issues

I'm trying to make a tactics game using python and the infamous pygame library. I use threading for networking and pathfinding. The game uses a p2p lockstep architecture, with one of the players ...
3
votes
1answer
248 views

Pygame: circular motion with Bresenham's algorithm

I'm trying to figure out a way to move an object in a circular path. I read about Bresenham's circle algorithm, but all the codes available online draw an entire circle. For my game, I want it so ...
0
votes
3answers
308 views

Python mini RPG enemy movement. (how to have two infinite loops running at the same time)

I have a problem with my RPG. I want enemies to wander randomly. So I put: enx_speed = random.randint(-2, 2) eny_speed = random.randint(-2, 2) in the main loop (while true:). However, that loops ...
0
votes
1answer
186 views

Pong pygame problem

I've been following a tutorial to make my first Pong clone. Here is the tutorial: http://muagames.com/tutorials/pygame-3-pong/pygame-3-pong-step-1/ When I try to run it I get this error message: ...
1
vote
1answer
222 views

How do I determine if one value is within a certain range of another in Python

I've been working on the attacking in my RPG. The problem I have recently encountered is, I have to be in Exactly the same x coordinate as the Enemy. When I want to attack the enemy this is what ...
2
votes
4answers
1k views

RPG movement holding down button

I've been writing a simple top down mini RPG in python. My problem is that when I move the player I have to repeatedly tap the arrow key. Each time I tap the key the player moves 5 PX in the ...
-1
votes
1answer
255 views

Flixel or Pygame for a small game? [closed]

I have some experience in Bash and Python, Lua. I've always wanted to try and make point & click quest games. Most quest games I loved aesthetically and gameplay wise were made with Flash. So ...
1
vote
3answers
448 views

Solving the riddle on distributing a python built game?

So, I've done the research, and i've done the try/catch process of almost getting things to work. . . almost. I've read this chart: ...
0
votes
1answer
113 views

Pygame Bounding Box at Player Feet

I'm new to python and pygame and am trying to build a very simple "game" (it's more of a test for me to figure things out) in which you move a character around the screen and he can collide with walls ...
1
vote
3answers
177 views

Geometry problem for area of sight

My player have a line of sight and all objects between the white lines, turns red. To compute this, the following conditions are met: if the angle between the yellow line and the red line are small ...
5
votes
2answers
143 views

Pygame fails on KEYDOWN with Russian keyboard layout

When I press a keyboard button on a keyboard with a Russian layout, my application pygame game crashes with this message: UnicodeEncodeError: 'ascii' codec can't encode character '\u0444' in ...