Skip to main content
The 2025 Developer Survey results are in. Explore insights into technology and tools, careers, community and more. View results.

All Questions

Filter by
Sorted by
Tagged with
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 ...
José Gomes's user avatar
3 votes
1 answer
223 views

pygame with infinitely scrolling background - handling of sprites movement

In my current project, I try to implement the basic logic of the game "Vampire Survival" (Little impression of the first level can be seen in this video on Youtube). Question I want to know, ...
Rabinzel's user avatar
  • 131
2 votes
1 answer
444 views

Robotic swarm simulation: aggregation

This program simulates the phenomenon of aggregation of a swarm of robots with no cooperation between each other and each robot following a very simple rule: The velocity of this robot has a random ...
Caridorc's user avatar
  • 28k
4 votes
1 answer
213 views

class that handles the rpg game map

I created a class to handle maps in my RPG game, before it became a class this was a collection of functions I created, but I thought it could be used as a class. although this code is working but i ...
syafiqfadillah's user avatar
3 votes
2 answers
187 views

Asking for player name and age using OOP

I have a text adventure game, and I need to use OOP so I've chosen to use it when getting the player's name and age. I need to keep the OOP, but was wondering if there are any ways to clean up the ...
CCryda's user avatar
  • 31
9 votes
2 answers
1k views

Python PacMan with son

I have been coding 'Pac-Man' with my 16yo. A hopefully not too boring project to help improve his Python coding. We have just moved the 'Ghosts' into a class which was a good first introduction to ...
Kevin W's user avatar
  • 191
5 votes
1 answer
1k views

Python code for UNO Game

I've been learning Python for a couple of months, and I decided to have a go at a small project that I felt able to complete on my own: a version of the card game UNO, using PyGame for the graphical ...
Fernando Manzanares Preciado's user avatar
3 votes
2 answers
88 views

Card-'Drafting' Engine

Here is a functional "card-drafting engine" which runs through pygame. It simulates fliping cards face up on the table, and the ability for two players to draft through the cards.There are two ...
Claude Fried's user avatar
3 votes
2 answers
436 views

A simple Pygame that has a square move and jump

How does this Pygame code look? Is the run loop usually in a class? I'm a beginner and was wondering what the best format and structure is for using OOP in Pygame. ...
Tommy Shelburne's user avatar
3 votes
2 answers
891 views

Object-oriented cat-and-mouse in Pygame

I'm rather new to programming. So far I've only done some small coding tasks once every now and then, and this the first "bigger" project for me. I love the idea of object-oriented programming and I'...
MaxD's user avatar
  • 133
2 votes
1 answer
4k views

Card game of war using pygame module

I implemented a card game using pygame. The game is a game of war and uses png files that I made in Microsoft Paint. I tried to ...
CE3601's user avatar
  • 189
6 votes
1 answer
1k views

First OOP in Python 3: Pygame Pong

I have been studying Python for a few months and just recently decided to stop avoiding OOP and reworked a Pong game to a more object oriented style. Please tell me how I should improve my code. Some ...
Eduardo Gomero's user avatar
4 votes
1 answer
332 views

Object Oriented Tic Tac Toe

I've been learning to code in my spare time for a couple of years. I have covered object oriented stuff before and can usually understand other people's object oriented code. This is the first time I'...
user11128's user avatar
  • 141
4 votes
2 answers
277 views

Object-oriented model of a machine gun using Pygame

I just started to use classes in Python, so I don't know all concepts, rules and conventions about it. I made a little program of a machine gun which simulates firing by user's action. ...
Biopy's user avatar
  • 49
2 votes
0 answers
3k views

Text-Based Adventure RPG with PyGame

I'm creating a text-based adventure game using PyGame. I plan on also implementing kind of a Pokemon/Final Fantasy style combat system that works with menus instead of commands, but I haven't started ...
Schrodinger'sStat's user avatar

15 30 50 per page