Skip to main content
Filter by
Sorted by
Tagged with
-1 votes
1 answer
47 views

The figure moves in different directions: left, right, up, and down. While moving, it should also fire in the direction it's moving when the space bar is pressed. In this code, when moving to the ...
fizer's user avatar
  • 1
0 votes
1 answer
47 views

i'm trying to make it so that a surface moves whenever the user scrolls the mousewheel, like how this website moves when you scroll. here's the code i'm working with so far. scrollVal=74 for event in ...
WyvernSlayer 7's user avatar
-3 votes
1 answer
113 views

I am a beginner to python & pygame, and im trying to make a pygame window. However, whenever the window opens, the window crashes and says not responding. can someone help me? import pygame ...
Dioa Plea's user avatar
0 votes
0 answers
54 views

I'm trying to replicate some animation concepts of particles with force fields in order to generate a vertical beam of particles going upwards, except they can experience "turbulences" at ...
Jeremy Baltigon's user avatar
3 votes
1 answer
158 views

I am making a game in which you have to roll the blue block to the "Touch me" text. When I run the code, the blue block is not visible and there are no problems found in VS Code. How can I ...
Dat Nguyen Tien's user avatar
1 vote
1 answer
62 views

I have different screens/menus set as instances of the Scene class. Whenever I want to switch screens, my gameloop checks for a button click, and if successful, it calls a function that defines the ...
Sandwich's user avatar
1 vote
0 answers
344 views

When running my Pygame 3d maze, I encountered a new error when loading it up. Here is my error:  Environment updated. Reloading shell... pygame 2.6.1 (SDL 2.28.4, Python 3.11.10) Hello from the ...
CloudDev's user avatar
1 vote
1 answer
147 views

I'm building a chess engine using pygame as a personal project. I was following a tutorial but I want to go further. For the moment I have the chessboard, the pieces in their initial position and the ...
coding_chicken's user avatar
-1 votes
1 answer
93 views

I'm trying to add controller inputs to a game I'm making but when pressing one of the buttons on the controller, the action is not being performed. I was told to use JOYHATMOTION but the Pro ...
uzn4v1's user avatar
  • 25
1 vote
0 answers
124 views

I'm currently making a Sonic game using Pygame (full project here: https://github.com/Dingleberry-Epstein/Sonic-Pygame-Test) and I am stuck on how to perfectly handle loops, slopes and overall tile ...
miggle's user avatar
  • 57
-2 votes
1 answer
50 views

I am using player = pygame.draw.rect(screen, player_color, player_pos, 30, 1, 1, 1, 1, 1) with screen as my surface player_color as my color player_pos as my rectvalue 30 as my width 1 as my ...
Wils Haverty's user avatar
2 votes
1 answer
146 views

I've been trying to get a Sonic The Hedgehog game working in Pygame and it works for the most part. Sonic can run fast, jump across platforms like a normal platformer, gets affected by gravity, ...
miggle's user avatar
  • 57
3 votes
1 answer
97 views

I have a fairly typical pygame project with a game loop that processes events, updates game state and data, and then draws the next frame. That's all working. For various reasons, this is Windows only ...
HumanJHawkins's user avatar
1 vote
1 answer
56 views

I have an issue with pygame module. I have a small program where user can click on any place in a window and a ball will spawn there and start moving up-left with 45 degrees angle (135 actually) and ...
Егор Золин's user avatar
0 votes
1 answer
103 views

I am trying to draw some text using pygame.freetype.Font however for this font to look good in the context it's in, I want it to have a custom letter-spacing/kerning. By this I mean the ability to ...
MoltenWolfCub's user avatar
0 votes
0 answers
32 views

I'm trying to convert my pygame into .wasm using pygbag but getting the following error, as the site is no longer active: ERROR 404: https://pygame-web.github.io/archives/0.9/pythonrc.py Any ideas on ...
Mel's user avatar
  • 15
2 votes
1 answer
91 views

I'm learning the basics of the pygame library and already struggling. The "game" at this point only has a player and walls. There are 2 main surfaces: "world" (the actual game map) ...
JB the frequently clueless's user avatar
-1 votes
1 answer
42 views

I'm following a begginner tutorial to start using pygame, but I'm stuck with the sprite display. I'm not able to make it visible on screen, please find below the code related to the sprite. I'm not ...
Macronaute's user avatar
0 votes
1 answer
70 views

I have made a top-down movement system in pygame, including acceleration and friction (the red square is the player): import pygame pygame.init() running = True x = 0 y = 0 speed = 3 friction = 10 ...
PythonCoder's user avatar
0 votes
1 answer
83 views

I've recently created a camera which follows the player around the map. The camera centers the player in the middle and can zoom in and out with CTRL+Scroll wheel. camera_handler.py: import pygame ...
rubysilver's user avatar
-1 votes
1 answer
60 views

I was able to create the collision of 2 objects in PyGame using the calculation of Euclidian distance. Circles created are moving on the screen, changing the coordinates based on the "gravity&...
frky's user avatar
  • 3
-1 votes
1 answer
49 views

So I am making a game for a school assessment where a turtle has to get to the water. Previously, I was playtesting the game as the turtle being a rectangle. But now I want the turtle to actually be a ...
Sandwich's user avatar
1 vote
1 answer
45 views

Im trying to make it so when my picture bounces, the window changes to a random color, but when it changes, it only changes for a split second when it collides then the window changes back to white ...
azzy's user avatar
  • 11
2 votes
0 answers
70 views

I'm making a python project for school, and created a general Enemy Class, which is then to be inherited by every common enemy. I created a Goblin Class that inherits this, and it works as expected, ...
turtles's user avatar
  • 131
-2 votes
1 answer
36 views

Hello first time user to the site, i am having a problem with Pygame not responding and don't know what is wrong i would be most thankful for any kind of help. here is the code sorry if this is not ...
Jonah Petitt's user avatar

1
2 3 4 5
361