Skip to main content

Questions tagged [pygame]

A game development library based on the Python programming language. It wraps SDL for easy use alongside Python.

Filter by
Sorted by
Tagged with
0 votes
0 answers
67 views

I need help with how to apply greyscale shading to objects in a 3D renderer I made in Python. The code is pasted below: ...
BrainBonkers's user avatar
0 votes
0 answers
150 views

While drawing a map for a game in Pygame, I encountered a strange problem. Loading my grass sprite, which is a little over a kilobyte, and placing it, the FPS dropped by half. However, replacing the ...
Just Nick's user avatar
0 votes
0 answers
21 views

I have been trying many thing to make my code work to make a player shoot a small box both ways (left and right) without being able to change the direction of the projectile mid shot. I would be very ...
George Guise's user avatar
0 votes
0 answers
105 views

I am a fairly new user of pygame and i decided to start out with a simple but 'funny' game. I have successfully implemented jumping mechanics, movement mechanics and a one directional shooting ...
George Guise's user avatar
0 votes
0 answers
71 views

I'm making a game in Pygame running in Python 3.10 and the lastest version of pygame, and I can't get to display a volume control for the background music . The music is played correctly, but there is ...
Pablo's user avatar
  • 101
0 votes
1 answer
146 views

I am working on a basic side scroller platformer in Pygame. I want to add a camera system that tracks the camera and scrolls the world and I want to make the camera systems without using Classes. ...
Eren Bayrak's user avatar
1 vote
1 answer
94 views

I am experiencing some issues with pygame.display.Info() and the FULLSCREEN property on Linux. The game is displaying at roughly ...
Æ Hines's user avatar
0 votes
0 answers
62 views

I am making a Sonic game in Pygame and I have recently gotten my hands on a Python class that uses pygame.rect and pygame.mask in unison to create sensors that can be used to accurately detect the ...
miggle's user avatar
  • 1
1 vote
0 answers
88 views

I'm developing a 2D game where multiple types of objects interact with each other through collisions. Currently, I'm using pygame.spritecollide() to detect ...
Daniel Hall's user avatar
0 votes
1 answer
204 views

I am trying to learn to code a simple game with 2 players shooting at horizontal-moving enemies from the bottom of the screen. Everything is working fine except for this: When player 1 hits enemy ...
Marco Marchi's user avatar
0 votes
0 answers
63 views

How to make circular space after collision like this? Before collision: After collision: I'am using PyGame
Jorpy's user avatar
  • 101
0 votes
1 answer
181 views

I'm making a game (shocker) in pygame and had issues with tile-based collision detection. There are 5 different non-empty tile types (pictured below) which can be rotated in increments of 90 degrees ...
Sad Robot's user avatar
1 vote
1 answer
124 views

I'm making a GUI that can be controlled by a steering wheel. It need only run on Windows. It works as expected with exception of the fact that the first 90 degrees in either direction seems to be ...
Brian K's user avatar
  • 113
1 vote
1 answer
117 views

I am new to game development, I previously created games using tiledmap editor and pygame, but manually creating map was real pain, so i begun to look how can i procedurally generate map, after ...
Bishnu Chalise's user avatar
0 votes
0 answers
160 views

so I have some Python code to generate a random 10x10 grid in which a mine will be or won't be placed, I am having trouble trying to convert this list into a use-able set of coordinates. Any help ...
Joshua Carlson's user avatar
0 votes
0 answers
66 views

I am a beginner level programmer trying to learn Python. I could not figure out how to change the values so I can restrict the pieces of checkers from moving diagonally. I want them to be able to move ...
OneSec's user avatar
  • 1
0 votes
0 answers
63 views

...
esnar moquete's user avatar
1 vote
1 answer
89 views

I am making a game right now, and I am working on collision for different Rect walls (all of their data is stored in a list). It works great, except for one problem:...
Tiimzee's user avatar
  • 133
0 votes
0 answers
459 views

I'm trying to make a simple platformer game, which has code to move the camera towards a player as they jump around. Now I have two classes: one for the player, and one for the platform. In the ...
Divyansh undley's user avatar
2 votes
2 answers
191 views

I am new to creating games with graphics, and I want to make a very hard game. I have the movement down, but it has a weird bug where it if the user presses down the opposing movement key (i.e. A is ...
Tiimzee's user avatar
  • 133
0 votes
1 answer
166 views

I've been working on this golf game for a couple of weeks and have been trying to create a reliable collision system for whenever a golf ball (mini golf) hits a block. I'm using regular rectangular ...
Jet's user avatar
  • 1
0 votes
2 answers
323 views

I know we're able to scroll a background image hardcoded or using awsd keys(or arrows) if they're pressed. But what about scrolling it with mouse movement? So I have a piece of panoramic image as a ...
Intice's user avatar
  • 31
0 votes
1 answer
704 views

I am currently working on a Pygame project and would like to seek your advice on best practices for organizing my code, particularly when it comes to creating additional scripts. I find myself ...
anathrax's user avatar
0 votes
1 answer
105 views

I'm trying to get a turtle sprite to chase a falling algae sprite utilising Pygame's inbuilt functionality. I have spent many hours reviewing questions and answers and suspect I'm missing some ...
Lone's user avatar
  • 3
2 votes
1 answer
322 views

I have some images of static objects using per-pixel alpha (trees, rocks) for a background. In order to make them look a bit more natural, I want to create some kind of atmospheric fog, which means ...
Intice's user avatar
  • 31
1 vote
1 answer
109 views

I would like to understand the process of selecting the correct tile from a scaled Surface when I have information about the number of tiles on the x and y axes, the length of the Surface, and also ...
anathrax's user avatar
0 votes
1 answer
450 views

How do I use a sprite sheet in pygame zero? The height of the images are 32, width is 25
Tokyn Blast's user avatar
0 votes
1 answer
151 views

I'm trying to write a 2D RTS game with maximum of 10 players. When server finish intializing each player receives start coordinates and game start time so each client will start processing ticks ...
Mirula's user avatar
  • 1
0 votes
0 answers
78 views

I'm building my own engine using python and pygame however my cube model is not able to be displayed correctly. This is my result after applying translation, scaling and projection matrices: ...
Zoler1337's user avatar
0 votes
1 answer
355 views

I'm having trouble with a PyGame animation I'm writting. I have a Ball class that defines an object that moves on the screen and bounces on the edges. I initialize ...
WinterPanda's user avatar
0 votes
1 answer
237 views

I copied a perspective projection matrix from here (https://jsantell.com/3d-projection/) and applied it to my vertices. It looks ok but without depth. Rotation matrices also work. When I try to divide ...
Zoler1337's user avatar
0 votes
1 answer
90 views

This is my code: ...
David Tan's user avatar
0 votes
2 answers
286 views

This is my code: ...
David Tan's user avatar
1 vote
0 answers
251 views

I've seen several games made in Pygame, and none of them uses try/finally to call ...
Orisphera's user avatar
0 votes
1 answer
642 views

I am having issues where the variable action_cooldown does not update. I could remove this but then both the player and enemy attack at the same time, which is something you do not want in a turn ...
KianMckenna's user avatar
0 votes
1 answer
917 views

I'm not a gamedev, I'm a API/Cloud dev, performance has never been an issue for me since most of the time we are limited by network calls. I've been playing with that for the past 2 days, I wanted to ...
sliders_alpha's user avatar
0 votes
0 answers
197 views

I am making my own pygame game, but I want to reduce the size of the player's hitbox in order to make dodging bullets easier. ...
Kai van Loon's user avatar
0 votes
1 answer
647 views

I'm going through a tutorial and trying to build a game using Python and struggling to resolve below error. Not sure what I'm missing here can someone help with it Alien_invasion.py ...
user14932992's user avatar
0 votes
2 answers
465 views

Im making a "catcher" style game in python, where the player has to collect "Gems", and avoid the "Spikes". However the games collision detection is off by quite a lot. ...
theHouseExpands's user avatar
0 votes
1 answer
972 views

Goal, Description & Scope (when encountered issue) I was building a testing script to see how implementing different ideas (event handling, update handling, draw method) to loading sprite images, ...
DracoDaine's user avatar
0 votes
1 answer
240 views

I am creating a game with Pygame but my collisions are registering too soon. I'm using this code to end the game when the player collides with a pipe: ...
Shantanu's user avatar
0 votes
0 answers
24 views

I need to be able to find out which tiles are intersected when a line is drawn between two points. I'm currently working with a isometric perspective which makes things a little more complicated. I've ...
Zoler1337's user avatar
0 votes
1 answer
227 views

I'm working on a Tetris clone. When I clear a line, my code does this: I want to move the squares down + 1. My code is: ...
tony_ramos.98's user avatar
0 votes
0 answers
85 views

I recently programmed a game in Pygame and added a text box (which I made using pygame_gui) which will send data directly to a MySQL database. But whenever I type ...
cupbord's user avatar
0 votes
2 answers
2k views

Let's say there's a game that I could code in 1 file main.py but I decide to split it in more files like: main.py graphics.py settings.py interface.py menu.py and so on, would the game in turn perform ...
Lost's user avatar
  • 1
0 votes
0 answers
441 views

...
hasan abbas's user avatar
0 votes
0 answers
91 views

I'm making a driving game in Pygame, and want to give a player the option to send game data to a Forza-compatible dashboard app (like SIM Dashboard) or to an OBD app (like RevHeadz). How do I do so? ...
s3246's user avatar
  • 1
2 votes
1 answer
5k views

I'm coding a custom engine using Python and Pygame. It's a top down 2D isometric RTS and I wan't to implement pathfinding for my units. My research has lead me to using a Navigation mesh which seems ...
Zoler1337's user avatar
0 votes
0 answers
147 views

I am currently working on implementing a pathfinding module for my 2D game engine that I am writing in Python using Pygame. Currently there are objects such as trees or buildings which can be placed ...
Zoler1337's user avatar
0 votes
1 answer
2k views

I recently wrote a program where I needed to limit the fps. After some searching I found a way via pygame built-in methods pygame.time.Clock() and ...
anathrax's user avatar

1
2 3 4 5
10