New answers tagged

0

I would try making sprites, but if your new to pygame and python that can be a complicated idea. What I wuld do then is draw a rect around your paddles that have the same position as your paddles so the rects will follow the paddle. Afterwords Id put a rect around the ball. Then make a collision detection that sais. if ball_rect.collidepoint(x,y): ...


0

Read the docs, they can be very helpful. For both get_at and set_at, there's this comment: Getting and setting pixels one at a time is generally too slow to be used in a game or realtime situation. It is better to use methods which operate on many pixels at a time like with the blit, fill and draw methods - or by using surfarray/PixelArray. This ...


3

A rational approach might be to simplify your problem. This is a game, so most of the time there is no need for 100% accurate physics. Instead of tracking every single component that makes your ship, you can instead prepare several damaged ship models and swap then on the fly as it gets more and more damage. When you swap the models, you could spawn some ...



Top 50 recent answers are included