Skip to main content
Filter by
Sorted by
Tagged with
-5 votes
0 answers
170 views

In my code pasted below, I try to save the new level status(what level the player is on) in stats.txt. When I read the text file after saving it in the code, the file has the correct value. But when I ...
Grant Stapley's user avatar
Advice
1 vote
2 replies
80 views

I am new to Python from having programmed in VBA my entire life, so please don't laugh at my code :-0. I know it is might be ugly and that it is not very consistent, and probably more VBA'ish that ...
Morne McCartney's user avatar
-3 votes
0 answers
58 views

import os import sys import math import random import pygame from scripts.utils import load_image, load_images, Animation from scripts.entities import PhysicsEntity, Player, Enemy from scripts....
Ebrahim's user avatar
-2 votes
1 answer
70 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
-4 votes
1 answer
116 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
3 votes
1 answer
120 views

I'm using replit as my IDE, and I installed everything correctly. for some reason, when I run the code, it says it's running but has no pygame window in the display tab. my code: import pygame import ...
Staetyk's user avatar
  • 43
0 votes
0 answers
58 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
-4 votes
1 answer
113 views

Here is my rotating code: pos = pygame.mouse.get_pos() x_dist = pos[0] - self.rect.centerx y_dist = -(pos[1] - self.rect.centery) self.angle = math.degrees(math.atan2(y_dist, x_dist)) self.image = ...
Aadvik's user avatar
  • 1,522
3 votes
1 answer
162 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
-2 votes
1 answer
130 views

I am trying to make a pixel-art 2d platformer in Pygame-CE. When I use a standard pygame display, the pixels come out as blurry: Minimal Reproducible Example: #Import everything import pygame, sys ...
JustNeutral14's user avatar
1 vote
1 answer
64 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
-4 votes
1 answer
100 views

I'm working on a little project (a video game) that asks me to use accurate physics events. My goal is to have 2 rectangles who can move (here with the keyboard) and can collide. In case of a ...
Pax's user avatar
  • 19
2 votes
1 answer
400 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
0 votes
1 answer
70 views

I created a way to handle the inputs for my pygame project, but made a mistake that resulted in a code that works the same way as the following: def run(self): got_mouse_click = False ...
Simone Rosada's user avatar
1 vote
1 answer
157 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

15 30 50 per page
1
2 3 4 5
1202