🌐
Reddit
reddit.com › r/python › i made a pong game with pygame and i just wanted to share!
r/Python on Reddit: i made a pong game with pygame and i just wanted to share!
August 6, 2014 -

http://pastebin.com/8qwZKnPG

just copy/paste and run the code.

Notes!

  • this game is unbeatable

  • changing the difficulty only changes the fps of the game

  • do not use disco mode if you cant do flashing lights

i know the code is VERY sloppy and poorly organized but id rather get the game done quick then spend hours making the code readable.

🌐
GitHub
gist.github.com › vinothpandian › 4337527
Classic Pong game in Python - using pygame · GitHub
May 7, 2026 - uhh? line 155, in draw(window) File "c:\Users\n\Desktop\ codes\games\pong.py", line 109, in draw if int(ball_pos[0]) >= WIDTH + 1 - BALL_RADIUS - PAD_WIDTH and int(ball_pos[1]) in range(paddle2_pos[1] - HALF_PAD_HEIGHT,paddle2_pos[1] + HALF_PAD_HEIGHT,1): Copy link · Copy Markdown · pygame 2.0.0.dev8 (SDL 2.0.12, python 3.8.3) Hello from the pygame community.
Discussions

python - Pygame Maze Game - Stack Overflow
Ok, so at my school we are required to do a Senior project, and I decided I would try and pick up on programing. To start out, I decided to start taking VEX classes, which taught me a bit of basic ... More on stackoverflow.com
🌐 stackoverflow.com
Is there a way to make a game that uses Python/pygame ...
Is there any framework or method that will allow to use browser to run a 2D game made in python with pygame graphical library? More on gamedev.stackexchange.com
🌐 gamedev.stackexchange.com
March 31, 2022
python - Speed logic for pygame game - Stack Overflow
I'm doing a final project for my coding class at school. I learnt from a tutorial online on how to use pygame by making pong. Then, I decided to create an Undertale battle system with the knowledge... More on stackoverflow.com
🌐 stackoverflow.com
i made a pong game with pygame and i just wanted to share!
It's great you actually finished something! The first thing that I completely finished was a pong clone in Python/Pygame too; it's a fantastic learning tool. More on reddit.com
🌐 r/Python
9
14
August 6, 2014
🌐
Pygame
pygame.org › tags › all
all
A math puzzle that involves clearing a grid of numbers using a combination of fast reflexes and knowledge of greatest common factors. Playable in Desktop (PC) or browser on any device. ... Quick platformer made in a week with Pygame. Full-featured game console based on pygame that can be integrated in your python game in order to execute python command/scripts/custom in-game functions, pip install pgconsole
🌐
Anirudh Jayaraman
pythonandr.com › 2015 › 05 › 16 › code-for-my-first-text-based-game
Code for my First Text-Based Game – Anirudh Jayaraman
July 6, 2015 - You shall be lost forever into the infinite abyss of the tree of the undead." exit(0) def start(): print "You are walking through an enchanted forest with gigantic trees as tall as mountains and as thick as large lakes." print "You got here magically teleported into a distant planet in a distant galaxy in the future." print "You see one such tree with a cave-like structure at its base. What do you do?" do_what = raw_input("> ") while True: if "cave" in do_what or "cave-like" in do_what or "enter" in do_what: print "You enter the dark hollow of an ancient tree that has had earthlings like you in the past." print "This tree is called the tree of the undying, where death won't touch you." print "On the other hand, pain can - if you don't make the right moves.
🌐
Quora
quora.com › How-do-I-make-a-game-in-Python-copy-paste
How to make a game in Python copy paste - Quora
Answer (1 of 3): You have to decide what to copy and paste - this is not really a Python question; it is a software design question. what data do you need to ‘copy’, how does the user select what to copy, when the user pastes how do they identify where the data is pasted ?
🌐
Grant Jenks
grantjenks.com › docs › freegames
Free Python Games — Free Python Games 2.5.3 documentation
$ python3 -m freegames copy snake $ python3 snake.py · Python includes a built-in text editor named IDLE which can also execute Python code.
🌐
GeeksforGeeks
geeksforgeeks.org › python › snake-game-in-python-using-pygame-module
Snake Game in Python - Using Pygame module - GeeksforGeeks
These are pygame, time, and random. Next, the code defines some variables. The snake_speed variable controls how fast the snake moves around the screen. The window_x and window_y variables define the size of the game window onscreen.
Published   July 23, 2025
🌐
Real Python
realpython.com › pygame-a-primer
Pygame: A Primer on Game Programming in Python – Real Python
July 18, 2023 - In this step-by-step tutorial, you'll learn how to use Pygame. This library allows you to create games and rich multimedia programs in Python. You'll learn how to draw items on your screen, implement collision detection, handle user input, and much more!
Find elsewhere
🌐
Invent with Python
inventwithpython.com › makinggames.pdf pdf
Making Games with Python & Pygame By Al Sweigart
The diff tool will show any differences between the source code in the book and the source code · you’ve typed. This is an easy way of finding any typos in your program. Copying and pasting text is a very useful computer skill, especially for computer programming. There is a video tutorial on copying and pasting at this book’s website at ... The online diff tool is at this web page: http://invpy.com/diff/pygame.
🌐
Opensource.com
opensource.com › article › 17 › 12 › game-python-moving-player
Using Pygame to move your game character around | Opensource.com
December 18, 2017 - More importantly, if you seek out a job writing code for money, you are expected to write code that works for everyone. Giving your users choices, such as the option to use either arrow keys or WASD (it's called accessibility), is a sign of a good programmer. Launch your game using Python, and watch the console window for output when you press the right, left, and up arrows, or the A, D, and W keys. $ python ./your-name_game.py left left stop right right stop jump · This confirms that Pygame detects your key presses correctly.
🌐
Stack Overflow
stackoverflow.com › questions › 27832096 › pygame-maze-game
python - Pygame Maze Game - Stack Overflow
I have it to the point where it will load the actual map when I hover over the ready button, but the actual game won't finish beyond there. This is my code so far, and I am confused because after loading the maze, the program won't do what it's supposed to when I touch the wall or when I touch the finish point. import pygame from pygame import * pygame.init() done = False getready = image.load('ready.png') backdrop = image.load('map.png') goon = image.load('continue.png') maze2 = image.load('map2.png') loose = image.load('loose.png') screen = display.set_mode((700, 500)) display.set_caption('M
🌐
Pygame
pygame.org › project › 5008
Pacman Clone
You can download all the code on the home page at the bottom. Instructions on playing the game are there as well.
🌐
Electron Studio
electronstudio.github.io › pygame-zero-book › chapters › text_quizes.html
3. Text-based quiz games — Coding Games With Pygame Zero & Python documentation
Program 3.3 is very similar to Program 3.2. The new lines have been highlighted. You can either modify Program 3.2, or else create a new file and use copy and paste to copy the code from the old program into the new.
🌐
Stack Overflow
stackoverflow.com › questions › 74624768 › speed-logic-for-pygame-game
python - Speed logic for pygame game - Stack Overflow
I have come across an issue however, and its regarding the heart's speed. ... import pygame import sys # setup pygame.init() clock = pygame.time.Clock() # main window screen_width = 900 screen_height = 600 screen = pygame.display.set_mode((screen_width, screen_height)) pygame.display.set_caption('Undertale') icon = pygame.image.load('heart.png') pygame.display.set_icon(icon) # game rectangles heart = pygame.image.load('heart.png') DEFAULT_IMAGE_SIZE = (20, 20) heart_img = pygame.transform.scale(heart, DEFAULT_IMAGE_SIZE) battle_width = 10 battle_height = 200 middle_offset = 30 length = 200 + 2
🌐
Wordpress
lorenzod8n.wordpress.com › 2007 › 05 › 25 › pygame-tutorial-1-getting-started
Pygame tutorial #1: getting started | Keeping it Small and Simple
May 25, 2007 - I copy and paste your data into a blank shell, run the module, and it works. I see the vertical line moving up and down, but when i type the code down in the the IDLE shell and press enter after pygame.draw.line(screen …ect..ect on turtorial two it starts spamming all that code.
🌐
Invent with Python
inventwithpython.com › pygame › chapter3.html
Chapter 3 - Memory Puzzle, Making Games with Python & Pygame
You can also copy and paste your code into the web form at http://invpy.com/diff/memorypuzzle to see if the differences between your code and the code in the book. You’ll probably pick up a few ideas about how the program works just by typing it in once. And when you’re done typing it in, ...
🌐
Read the Docs
pygame-zero.readthedocs.io › en › latest › examples.html
Examples — Pygame Zero 1.2 documentation
Pygame Zero has a collection of examples which you can use to learn by reading or modifying the code of the game. You can also play with them! These examples aren’t provided with a normal installation of Pygame Zero but they’re available in the source code repository. To download them, follow the following steps: Download the source code of Pygame Zero on the GitHub repository by clicking in the big green button and choosing Download ZIP · Copy the examples folder whatever you want.
🌐
Program Arcade Games
programarcadegames.com › index.php
Program Arcade Games With Python And Pygame
Below is the required code, which creates a window sized to a width of 700 pixels, and a height of 500: size = (700, 500) screen = pygame.display.set_mode(size) Why set_mode? Why not open_window? The reason is that this command can actually do a lot more than open a window. It can also create games that run in a full-screen mode.
🌐
Medium
rohit170590.medium.com › tetris-game-python-9927e84a5ee8
Tetris Game | Python. This script implements a classic Tetris… | by ROHIT CHOUHAN | Medium
September 13, 2024 - """ return any(grid[0]) def main(): """Main game loop.""" clock = pygame.time.Clock() tetromino = Tetromino() fall_time = 0 fall_speed = 0.5 score = 0 while True: fall_time += clock.get_rawtime() clock.tick() for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() sys.exit() if event.type == pygame.KEYDOWN: if event.key == pygame.K_LEFT: tetromino.move(-1, 0) elif event.key == pygame.K_RIGHT: tetromino.move(1, 0) elif event.key == pygame.K_DOWN: tetromino.move(0, 1) elif event.key == pygame.K_UP: tetromino.rotate() if fall_time / 1000 > fall_speed: fall_time = 0 if not tetromino.move(0, 1): merge_tetromino(tetromino) lines_cleared = clear_lines() score += lines_cleared * 100 tetromino = Tetromino() if game_over(): print(f"Game Over!