Questions tagged [pygame]
Pygame is a portable Python package for video games, built on SDL.
251 questions
9votes
2answers
239views
Blackjack game for assignment
I’m a first-year IT student, and I’ve completed a working Blackjack game in Python as part of an assignment. I’d love to get some feedback on my code structure, readability, and comments to improve my ...
8votes
2answers
920views
2D block game like Minecraft
I have been working on a 2D block game. I like the progress I am making, but I would like to improve the performance and the overall quality of the code. The code and textures are stored in my GitHub ...
7votes
1answer
91views
Pygame self-made sprite loader
I just wanted to put this out here and see what people think and potential improvements I could make. I've been learning spritesheets in pygame as I was really scared to use them as I thought they ...
7votes
2answers
810views
Numerical cellular automaton way of simulating water, fire or smoke
I have made up some evolutionary rules for a type of cellular automaton that uses numbers instead of the more common binary black or white cells. Rules in English: Takes place on a square grid that ...
2votes
2answers
250views
Infinite 2d block world (2d minecraft) with chunk system, physics and slower loading
Follow up from this question. I have added a slower loading system that allows the main game to run faster but I still get under 30 fps with caves even if I allow the player to outrun the loading. I ...
2votes
2answers
222views
Infinite 2D block world chunk system with physics
I am coding an Infinite 2D block world chunk system with physics for fun. I am worried mainly about performance and code structure. I found that when I added more Perlin noise it made the performance ...
1vote
1answer
106views
Infinite 2D block world chunk system
I am coding an infinite 2D block world chunk system for fun. I would like to improve performance, but I'm not that worried. Game.py ...
8votes
2answers
1kviews
chess game: loading images for the rooks
I was ok with my pawn code but the rook code is very long and I want it to make the code shorter and cleaner and the same thing with my bishops, knights, kings and queens. ...
3votes
2answers
152views
"Element Fusion" game where 2048 meets Chemistry
I've developed "Element Fusion," a PyGame-based game inspired by 2048 but using chemical elements. I'm seeking feedback on: Gameplay mechanics Code structure and efficiency PyGame ...
7votes
3answers
1kviews
Is this Python/Pygame that draws a maze well structured?
I'm not very confident about this piece of code I created, it basically takes a file like this: ## # ## ## # #B # # # ## ## ## A###### Then proceeds to ...
13votes
2answers
2kviews
Space shooter game using pygame
I have made a space shooter game in pygame with over 800 lines of code (including blank lines). The aim of the game is to kill all of the ships in the game. You start with a small spaceship and one ...
6votes
1answer
154views
Code for a basic dodging game in Python
Can someone review the code for this dodging game I made a while back? I want to see if there are any improvements or optimizations I can make as I am more or less a Python beginner. ...
2votes
1answer
125views
Pong using pygame module
I made a game in Python where you play Pong against an AI. As I am quite new to pygame, I would be grateful to hear any possible improvements. This is my code: ...
2votes
1answer
93views
Agent based Dengue transmission simulation
I'm trying to implement the dynamics of Dengue transmission between mosquitoes and humans. I decided create two classes, one for the human population and another for the mosquitoes. Both are based on ...
2votes
2answers
853views
How can I get my CPU Utilization Down? PYGAME PROJECT
I get 25% CPU usage on this simple project. I hope it's okay if I just post the whole thing. It probably something to do with the rendering code. It's definitely the project though, my fans get loud, ...