All Questions
246 questions
9
votes
2
answers
250
views
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 ...
8
votes
2
answers
959
views
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 ...
7
votes
1
answer
105
views
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 ...
7
votes
2
answers
817
views
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 ...
2
votes
2
answers
260
views
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 ...
3
votes
2
answers
237
views
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 ...
2
votes
1
answer
112
views
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
...
7
votes
2
answers
1k
views
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.
...
4
votes
2
answers
162
views
"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 ...
7
votes
3
answers
1k
views
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 ...
13
votes
2
answers
2k
views
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 ...
6
votes
1
answer
160
views
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.
...
2
votes
1
answer
127
views
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:
...
2
votes
1
answer
103
views
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 ...
2
votes
2
answers
874
views
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, ...