18,028 questions
-1
votes
2
answers
992
views
Pygame - Different sided collision question! [duplicate]
I'm making a Pygame of, basically, "Breakout".
I'm using collisions, and want a simple way to have different bounce effects of the different sides of one rectangle.
What I currently have for the ball-...
1
vote
2
answers
3k
views
How to add a second bouncing ball to the window?
I have coded an animation (in python) for a beach ball to bounce around a screen. I now wish to add a second ball to the window, and when the two collide for them to bounce off each other.
So far, ...
1
vote
3
answers
9k
views
Pygame: Sprite changing due to direction of movement
I've just started learning how to use pygame yesterday. I was read this one book that was super helpful and followed all its tutorials and examples and stuff. I wanted to try making a really simple ...
1
vote
2
answers
472
views
pygame is screwing up ctypes
import mymodule, ctypes
#import pygame
foo = ctypes.cdll.MyDll.foo
print 'success'
if i uncomment the import pygame this fails with WindowsError: [Errno 182] The operating system cannot load %1. ...
3
votes
4
answers
3k
views
Intercepting changes of attributes in classes within a class - Python
I have been messing around with pygame and python and I want to be able to call a function when an attribute of my class has changed. My current solution being:
class ExampleClass(parentClass):
...
2
votes
4
answers
4k
views
Rotation based on end points
I'm using pygame to draw a line between two arbitrary points. I also want to append arrows at the end of the lines that face outward in the directions the line is traveling.
It's simple enough to ...
15
votes
2
answers
12k
views
What do the blend modes in pygame mean?
Surface.blit has a new parameter in 1.8: blend. The following values are defined:
BLEND_ADD
BLEND_SUB
BLEND_MULT
BLEND_MIN
BLEND_MAX
BLEND_RGBA_ADD
BLEND_RGBA_SUB
BLEND_RGBA_MULT
BLEND_RGBA_MIN
...
2
votes
2
answers
537
views
pygame function appears to be being ignored
I'm building a relatively simple programme to test collision detection, it's all working fine at the moment except one thing, I'm trying to make the background colour change randomly, the only issue ...
16
votes
2
answers
17k
views
Fully transparent windows in Pygame?
Is it possible to get a fully transparent window in Pygame (see the desktop through it)? I've found how to create a window without a frame, but there doesn't seem to be any obvious way to make it ...
0
votes
4
answers
285
views
How do you make a class attribute that isn't a standard data type?
I have one class that needs to grab an attribute that is set in another. It's not a standard data type though. Here's the code;
class graphics:
def __init__(self, Fullscreen = False, Width = 640, ...
4
votes
2
answers
4k
views
How to blend drawn circles with pygame
I am trying to create an application like the one here:
http://www.eigenfaces.com/
Basically lots of overlapping circles drawn with pygame. I cannot figure out how the blend the circles to make them ...
59
votes
3
answers
64k
views
How to make a surface with a transparent background in pygame
Can someone give me some example code that creates a surface with a transparent background in pygame?
18
votes
9
answers
29k
views
Is Python and pygame a good way to learn SDL? [closed]
If I want to move to C++ and SDL in the future, is Python and pygame a good way to learn SDL?
13
votes
7
answers
6k
views
Toolkit Options for 2D Python Game Programming [closed]
What are some toolkits for developing 2D games in Python? An option that I have heard of is Pygame, but is there anything that has more range to do more things? What are the good and bad parts about ...