Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pygame]

Pygame is a portable Python package for video games, built on SDL.

4
votes
3answers
455 views

First Python program: Snake

I've started learning Python yesterday with the intention of studying machine learning. Before this, my experience with programming was exclusive to my first semester where I had a C course. I ...
4
votes
1answer
42 views

Python Pygame treasure hunt game

This is a python game that I am working on. It is a grid based treasure hunt game in which you collect coins from specific tiles (some tiles ask you questions in which you need to answer correctly in ...
6
votes
1answer
92 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 ...
1
vote
2answers
56 views

Pygame simulation of a production line

So my code works as intended, but suffers major performance issues every time I add a new object to the screen. The speed of my objects basically gets cut in half. All you have to do to observe this ...
2
votes
3answers
119 views

Pygame maze game

This is my first attempt at python game in pygame. It's a maze game where the maze is randomly generated using Prim's Algorithm. ...
2
votes
1answer
52 views

First Pong game

This is my first pygame project that I've worked on and wanted to start with something simple. Pong was, I think, a pretty good choice now that I'm done with it. I will continue to make improvements ...
4
votes
3answers
180 views

Simple text escape room game

I recently started coding and after learning a bit about functions and basics I tried to make a simple text escape room game. My code is working and the game functions as intended but I now there are ...
3
votes
1answer
67 views

Implementation of Game of Life in pygame

This is my first project in pygame so I am open to suggestions how I can improve my python/pygame skills. I have started programming in python couple of weeks ago and I really want to know what I am ...
1
vote
0answers
28 views

Converting 2D arrays into strings

I have this function which converts a couple of 2D NumPy arrays into strings and then saves them in a text file (grid, quality, <...
4
votes
2answers
154 views

Simple Python Pygame Game

I'm trying to make a simple game for a school project. Do you have any tips on how to simplify and beautify the code? GitHub ...
10
votes
2answers
204 views

Paint program made in PyGame

I am making a paint program in Python using Pygame. Right now the program is very laggy, and I wanted to get my code reviewed incase the reason is in the way I have written the code. EDIT: I was ...
1
vote
1answer
205 views

Implementation of the Snake game in Pygame, with GUI

I wrote a simple Snake game in Pygame, with GUI. It`s my first Pygame game and one of my first projects in Python. My goal with this implementation is to make it bug-free with fluid UI and as fast/...
2
votes
0answers
73 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. Here it is: <...
3
votes
0answers
108 views

Nibbles/Snake game in Python

I am a total beginner at Python, so I wrote a very simple snake game using pygame to get some practice with it. I also don't have too much experience with object-oriented design. Does the code ...
1
vote
0answers
56 views

Arabic Language lesson program Part 3

This is the third time I am asking for a review of this code (first time can be found here: Arabic language lesson program and the second can be found here: Arabic language lesson program Part 2). ...
1
vote
0answers
281 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 ...
3
votes
1answer
240 views

Memory Game using Tkinter/Pygame

I'm very new to python and programming in general. For a school assignment, I made this Memory Game and would love to receive feedback from you guys. ...
5
votes
1answer
97 views

Beginnings of a neuron simulation

I have 2 classes that do extremely similar things. The only differences are that they draw using different colors, and that one draws in the back. The classes ...
4
votes
0answers
69 views

Mouse Click Controlled Meteor Avoidance Game

Ongoing development of game. The player is controlled by mouse click to move upward. The goal is to avoid meteors for as long as possible. I would be grateful if someone could critique my code. ...
1
vote
1answer
92 views

The start of a game in pygame, blitting images to the screen

The small bit of code below blits and image to the screen within a class. I call this 4 times to display the image 4 times, each image has a different y coordinate and doesn't need different x but ...
6
votes
1answer
124 views

Flappy Bird Style Game in Space Setting

Simple game where you control space shuttle with mouse click and try to avoid meteors moving in random speed toward you. There are some things I am still developing like rotation and menus, but wanted ...
2
votes
1answer
78 views

ball-game created in Python 3

This is a very simple ball game in which we have to avoid projectiles falling from the sky. This is my second project and first game. Please review and tell where I can improve. ...
5
votes
1answer
180 views

Simon memory game in pygame

I've been teaching myself python and I decided to make a Simon copy. Please let me know if there's anything notable that I should improve on. I understand my use of globals in some functions is ...
4
votes
1answer
203 views

Movement function for a Sokoban game using Python [closed]

I've been working on the functions that handle when a player's sprite interacts with either a wall (0) or say the crate to push (£) I'm just wondering how this looks and if there alternative methods, ...
1
vote
0answers
177 views

Python Pygame Tic tac toe PVP [closed]

I am trying to make a player vs player Tic Tac Toe game using pygame. So far I got a simple grid setup that shows me the coordinates and changes the box color to green when it's clicked. How do I ...
3
votes
1answer
456 views

Server and client for pong game

This is a pong style game which is very basic but involves sending and receiving data using TCP. The data is encoded using pickle which seems to be very inefficient yet I am still using it. The ...
5
votes
1answer
119 views

Conway's game of life in pygame

I've made a game of life in pygame. I need it to get it to run as fast as possible. I've done everything I can think of. ...
2
votes
0answers
41 views

Checking surrounding pixels inefficiently in pygame [closed]

This checks surrounding pixels to my object's pixel: ...
0
votes
0answers
28 views

Object/Component Game Engine in Pygame

I've been working on a game engine in Python 2.7. I've been researching different engine archetypes and have started implementing an ...
-2
votes
1answer
232 views

Get list of surrounding pixels of a pixel in pygame [closed]

I am doing some pixel operations in Python, which obviously uses a lot of processing power and makes the program extremely slow. I have these nested loops: ...
4
votes
1answer
78 views

Using Pythagoras' Theorem to Check Point Distance [closed]

I want to procedurally generate several points on a graph that are suitably distant from each-other. These points are meant to represent castles that are part of towns in the world-map of my game. ...
6
votes
0answers
125 views

Game involving catching falling items

This is my first game. Everything in the game was created by me during this week - from assets, music and, of course, code. As I am new to Python I have wondered if the design template for this game ...
4
votes
1answer
195 views

Mars Lander pygame

Here is my code about our final project in uni called 'Mars Lander'. The thing is that my code seems to be all over the place (more specifically in the 'main' function at the end of the code...) ...
14
votes
2answers
398 views

Counting people inside the house game

This program animates people going inside and outside of a house, the user has to keep a running sum in their head and must give the answer at the end. The speed of people, the number of maximum ...
2
votes
1answer
107 views

2D Basic 'evade the enemy' type game

I'm trying to learn how to become a good programmer. I think this means making my code more readable for others. I would really appreciate any feedback whatsoever. I'm not quite sure what specifically ...
8
votes
1answer
177 views

Animation of linear transformations

Coordinates Given a 2d space, we can fix a coordinate system to talk about transformations numerically. The red vector, that ends at (1, 0) and the green vector that ends at (0, 1) are called the ...
6
votes
1answer
245 views

Python implementation of Conway's Game of life with Pygame

So I've started learning programming a few months ago and this is one of my first projects. The program works, but I feel like it's a bit slow compared to the other implementations of Conway's Game of ...
4
votes
1answer
1k views

Snake Game on pygame

I'm working for a month or so on a Snake game in Python. It's working well (I got some good help on it already), but since I'm a beginner in pygame, I would like some feedback from better programmers ...
5
votes
1answer
150 views

Trigonometry Circle representation using Python and Pygame

I wrote this code using Python 3.5 and Pygame to help me learn more about sine waves. Its goal is to show the variations in the sine and cosine values in the Trigonometry Circle as the distance ...
1
vote
1answer
65 views

A small to medium sized pygame game

Github Link To Code Pastebin Link I am well aware of how terrible the SettingsMenu class is, it's still a work in progress and is the way it is so it can actually work. Can't paste it directly in ...
6
votes
1answer
697 views

Python/Pygame Fighting Game

I've been working on a fighting game using python and pygame and its quite finished, currently I'm looking for some constructive feedback about any issues/functions I should change in my code. ...
3
votes
0answers
399 views

Using arecord through subprocess to record in Raspberry Pi

I am using arecord through subprocess to record in raspberry pi : press joystick button to start recording and press button again to stop recording. I am really a noob in programming. ...
1
vote
0answers
281 views

Core of a text based game displaying graphics in pygame

I'm working on a silly personal project, - a text based game with minimal graphics such as characters (people, not the text), enemies, gear, little effects. But the core of the game is the text and ...
7
votes
2answers
3k views

Ping Pong game in pygame

I wrote a very simple Ping Pong game using pygame and everything worked out quite well. The only issue is the high CPU usage, which seems a bit strange. One thread is immediately occupied up to 100% ...
5
votes
1answer
775 views

Gomoku in Pygame

I was playing around with the pygame module, and decided I should try to make a game. I like to play Gomoku, so that was the game I decided to make. It is my first experience with pygame, thus I'm ...
0
votes
1answer
550 views

Pygame Flappy Bird clone - Object oriented

Recently, I have been trying to improve my programming and coding skills in python so I have decided to make some games with the pygame module. I have made this flappy bird clone with pygame and ...
1
vote
0answers
60 views

Pygame Slideshow2 that uses Curses with SSH to pause and move Pictures

I have added a few new features to Pygame Slideshow that includes using curses that works with ssh, a way to move pictures to a different directory while viewing them, a pause, and redisplay mode. A ...
5
votes
1answer
146 views

Bare bones SNAKE game

This is the bare bones of a SNAKE game that I'm working on, the code runs as is, I've taken great care to keep my code clean and readable. I would appreciate feedback on my code. I plan on creating ...
5
votes
2answers
292 views

Optimizing a Text-To-Speech program with a lot of repetition

I have a Text-To-Speech program that will ask the user to input text, convert it to speech and then output that speech from within Pygame by loading the file into memory, getting Pygame to play the ...
4
votes
1answer
326 views

Creates a maze from file and enable user to go trough it with graphic display

I'm following the learnpythonthehardway.org book for learning Python. I recently made a one week projet and as I'm fairly new to coding program with POO and multiple files, I'd like to have someone ...