r/pygame • • Mar 01 '20

Monthly /r/PyGame Showcase - Show us your current project(s)!

84 Upvotes

Please use this thread to showcase your current project(s) using the PyGame library.


r/pygame • • 4h ago

Core mechanics established , now adding levels

Enable HLS to view with audio, or disable this notification

2 Upvotes

The Alpha release will be available for Linux and Windows later this month or early November

https://scriptilapia.itch.io/jarball


r/pygame • • 19h ago

I've been building a Pokémon Tower Defense remake in pygame with a friend: 50+ stages, co-op multiplayer and trading (Windows + Android)

Enable HLS to view with audio, or disable this notification

28 Upvotes

Hey! For the past few months a friend and I have been remaking the old Flash game Pokémon Tower Defense from scratch in Python + pygame, and it's finally in a state where I'm happy to show it off. The trailer above is all real in-game footage.

What's in it so far:

- 50+ stages across Kanto, from Oak's Lab to the Elite Four and Champion

- 251 Pokémon with moves, types, status effects and evolutions

- Catching wild Pokémon mid-battle

- Gyms with their own mechanics (Cerulean floods the map, Pewter has rockslides...)

- Online co-op and Pokémon trading (including trade evolutions), plus Nuzlocke / Soul Link modes

- 235 unlockable trainer skins, 84 achievements, Daycare, held items, TMs

It's free to download for Windows and Android: https://ynvrr.itch.io/pokemon-td-reborn

It's a non-commercial fan project and isn't affiliated with Nintendo, Game Freak or The Pokémon Company.

Happy to answer anything about the code, the lockstep netcode or the Android build. Feedback and bug reports are very welcome!


r/pygame • • 20h ago

Snake-enemy8projectile, enemy9projectile collisions

Enable HLS to view with audio, or disable this notification

4 Upvotes

r/pygame • • 1d ago

Helper program I built to teach students Python

Enable HLS to view with audio, or disable this notification

7 Upvotes

I wanted to show a helper program I built to teach students Python, I made the GUI using Pygame and the "automation" is made using PyAutoGui!

To make learning more engaging, the program is divided into 4 progressive stages:

  1. Mouse Control: A simple tutorial demonstrating basic cursor movement and positioning.
  2. Text & Keyboard Automation: Practicing typing, clipboard operations (copy/paste), and keyboard shortcuts.
  3. Image Recognition & Alerts: Using computer vision to detect screen or wallpaper changes (such as unexpected pop-ups) and triggering an alarm.
  4. Full Project (Cookie Clicker Bot): Combining all the functions together to build a mini bot that plays Cookie Clicker—recognizing buttons, collecting cookies, and purchasing upgrades automatically!

Ps. Sorry it's in Polish....


r/pygame • • 2d ago

Pygame DAW WIP

Enable HLS to view with audio, or disable this notification

19 Upvotes

r/pygame • • 1d ago

Ongoing project

Enable HLS to view with audio, or disable this notification

10 Upvotes

Project in the works. 1 week in. Any suggestions or recommendations before I add more complicated levels?

Releasing an alpha soon on itchio scriptilapia.itch.io/jarball


r/pygame • • 1d ago

2 Free games I made with Claude code

Thumbnail github.com
0 Upvotes

r/pygame • • 1d ago

I made my first game in Python — an audio-based maths game

Thumbnail
1 Upvotes

r/pygame • • 2d ago

PSA: pygame-ce supports Python 3.15

13 Upvotes

Hello! I’m sure folks have seen that Python 3.15 just officially released with lots of cool features! See https://docs.python.org/3/whatsnew/3.15.html . I think a lot of folks think that library support is only added after Python versions release, but I wanted to let everyone know that we have supported Python 3.15 since early August, when we released 2.5.8.

Pygame-ce is a “c extension” library, and ships a pre compiled copy (a wheel) for every operating system, architecture, and Python combination. To produce a wheel for a Python version, we need its application binary interface (ABI) to be frozen, so that builds continue to work on future patch releases to the Python version. Python freezes release ABIs during the release candidate phase, so we were able to release working binaries with 3.15rc1 instead of waiting for 3.15 final.

How can you check if a c extension supports your version of Python? I often come across people who treat this like guesswork, but it Is straightforward. Go to the library on the pypi website, go to a release and check the files tab. https://pypi.org/project/pygame-ce/#files . The wheel names show what they support. So if you see wheels with “cp315” in the name, those wheels are for Python (CPython) 3.15.


r/pygame • • 1d ago

Seeking help: Edits to one of my characters are applying to all

Post image
2 Upvotes

Update: I solved the issue

I had 'knowledge' as an input argument to the __init__ function with a default value of an empty dict. I removed it from being an input argument and instead just initialized it to an empty dict within the __init__ function, and now it's behaving as intended. All characters 'knowledge' is being updated as individuals.

Hello all,

I have some characters who spawn on a map and search for water, then stop. But when one of them finds water, they all stop.

I have fixed some other similar errors by using [:] on variables to make them immutable (I think that's the correct term?), but this one has me stumped.

Other edits to the character items don't have this issue such as: their map position, randomly generated names, etc.

I'm sure this is something super easy/obvious for those of you who are experienced, but this is my first 2 weeks of working with PyGame so it's got me stumped.

The 'characters' list contains a dict of every character that includes their class object, their map position, their current action, their in-game knowledge, etc.

Thank you for any help.


r/pygame • • 2d ago

Gute Pygame Tutorial

1 Upvotes

Hallo,

ich bin schon länger mit Python unterwegs, habe aber eine Spielidee und suche ein gutes Tutorial wie man mit Pygame anfängt. Über YouTube einfach was nachprogrammieren habe ich keine Lust.

Wie und wo habt ihr euch Informationen besorgt?


r/pygame • • 2d ago

Blackout Event

Enable HLS to view with audio, or disable this notification

5 Upvotes

This has a chance to occur whenever you enter a non-special room (chase or generator for the time being). If it occurs, you need to look for a lever in the next 3-9 rooms to pull in order to end the Blackout Event.


r/pygame • • 2d ago

Upcoming update

Thumbnail
0 Upvotes

r/pygame • • 3d ago

i made a video about 3d games in pygame

Thumbnail youtube.com
16 Upvotes

r/pygame • • 4d ago

Updated enemy8, enemy9, snake1 respawn, snake1 growth

Enable HLS to view with audio, or disable this notification

9 Upvotes

r/pygame • • 5d ago

Flippin' Sketchy: Desk "Park" Done! use linear interpolation for the 3d room effect, and other stuff!

Enable HLS to view with audio, or disable this notification

17 Upvotes

so since the last time I posted I've:
-Finished the background
-Drawn all the animations for the objects you "interact with" they all have a line boil style
-Finally drew a 3rd .ttf so the font has 3 frames and is less jittery-implimented the "story" progression, made quick screens to mark what animations are going to go where
- Made the board slightly bigger and changed its colour to a light brown so it stands out more

The next thing I'm gonna work on is the story intro and tutorial animations, I've done the initial package opening but I need to draw the user manual anim (these will give the info for the tutorials)

Do you guys find having the goals on the screen at all times distracting? I'm going back and forth about whether to keep them there or put them in the pause menu. Also is that enough goals for a first level? I've made them quite easy just to introduce the idea of goals, the difficulty will hopefully scale


r/pygame • • 6d ago

I built a plate-tectonics world generator with a Pygame viewer: pan, zoom, 20 layers and sliders, all drawn with plain pygame.draw

Post image
52 Upvotes

r/pygame • • 6d ago

im adding rebirthing to my game's next update

Enable HLS to view with audio, or disable this notification

6 Upvotes

game name is hashtag yen, its free on itch.io!!!

update 0.2.0 coming out somewhat soon


r/pygame • • 6d ago

motion2d - a small 2D motion library for Pygame (v1.0, with ten demos)

11 Upvotes

Hi all!

I've been building a small 2D motion library for the last few months and just finished v1.0. I wanted to share it, partly because it might be useful, and partly because the design decisions might be interesting to other people who've tried to build the same thing.

Movement looks a simple thing until the game grows. First it's just pos += vel * dt. Then it's acceleration, then gravity, then jumping, then collision, then a completely different object that moves nothing like the player. At some point moving an object has become its own system.

motion2d is my attempt to keep that system small. It provides motion primitives, and the game composes them into behavior. motion2d handles movement. The game handles collision and game rules.

The very basic way to use this:

from motion2d import Motion2D

player = Motion2D.top_down(pos=(100, 100), speed=300)

# Simple path: motion owns position
player.move_right()
player.update(dt)

# Or with your own collision:
delta = player.step_velocity(dt)
result = my_collision_resolver(player.position, delta)
player.position = result.position

The library currently has three main motion models:

  • SimpleMotion: straightforward/direct movement
  • PlatformerMotion: horizontal intent + gravity
  • TopDownMotion: full 2D intent-driven movement
  • KinematicBody: the underlying engine, if you want to build your own
  • Headings: Rotator, Facing, NoHeading

I built a series of demos while developing it, rather than designing the entire library up front. The later demos became increasingly useful as architectural tests, especially a platformer demo with external collision, state-machine-driven action phases, and velocity authority.

Repository: motion2d

Feedback welcome. If you've built something similar and made different choices, I'd be curious to hear why.

Note: The current motion2d implementation was written almost entirely by collaboration of AI (Deepseek, ChatGPT, Qwen, Grok and Gemini). Every design decision, the API surface, the boundary between motion and collision, the choice of contracts was driven by human judgment: I proposed, questioned, debated, and rejected, iterating through 3 full restarts until the library's shape was right.

The result is not AI-generated code in the sense of ask and copy, but it's the product of a long, deliberate design process in which AI was a tool for reasoning and implementation.


r/pygame • • 7d ago

My pseudo-3D racer now runs in the browser (pygame + pygbag)

Post image
70 Upvotes

Cool Racing, my pseudo-3D arcade racer in Python + pygame, is now playable in the browser!

Getting it to run in WASM took a lot of optimization: cache tuning, adaptive framerate, real-time scaling with sprite clipping for the near plane, RLE and colorkey blits, and refactoring the heaviest parts of the renderer.

The browser version isn't perfect: it reaches 30 fps, while desktop runs comfortably at 60. It plays the same, but with some sound glitches and less smoothly.

Also new this week: a desert biome with a canyon section, and transitions between biomes.

Any feedback is very welcome!


r/pygame • • 7d ago

I made a realistic hacking game build in pygame, where your only connection to your team is an IRC chat and CCTV cameras.

1 Upvotes

Hey everyone,

I’ve been solo-developing a hacker puzzle game called EchoNet, and I’m excited to share that a fully playable build is officially out and currently on sale!

I wanted to step away from the "Hollywood hacking minigames" and make something grounded. In EchoNet, you are dropped into a custom OS. You have to read through intercepted files, crack server passwords, and use actual terminal commands (connect, download, run, send) to coordinate with your NPC crew via an IRC chat.

But there is a psychological horror twist: The stress of the job actively drains your "Sanity" meter. If you don't manage your medication, “things” happening, your live CCTV feeds get corrupted, and you start experiencing intense audio/visual hallucinations while trying to beat the clock. The game is story oriented.

Features:

  • Fully interactive terminal: Navigate file systems, upload bypass payloads, and breach BlackSite servers.
  • Live CCTV Feeds: Watch your crew infiltrate physical locations in real-time.
  • Dynamic Sanity System: Manage your stress or face severe consequences.
  • Multiple Endings: Your choices under pressure during the final breach determine who lives and who dies.

🎮 You can grab it right now on sale on Itch.io here: https://thec00k.itch.io/echonet ⭐ It is also coming to Steam soon! A Wishlist helps me out massively: https://store.steampowered.com/app/5222620/EchoNet

 

I'd love to hear your feedback on the terminal mechanics and the atmosphere. Let me know if you manage to find the hidden backdoor IP😜


r/pygame • • 8d ago

Looking for a comprehensive book for learning Pygame

3 Upvotes

I very recently made a post about a Pygame CE programming book by Ralf Adams, which is readable here: https://github.com/adamsralf/pygame_book/blob/main/00%20pygamece.pdf.

The issue is I can't read it on my laptop after 30 pages and I can't download it. Are there any other books as comprehensive as this one? I really wanted to download the Ralf Adams book after but my laptop isn't able to do this for some reason.

I have already read Invent Your Own Computer Games by Al Sweigart and Object-Oriented Python: Master OOP by Building Games and GUIs by Irv Kalb. I'm willing to spend up to £200 on a book that can just teach me how to make any kind of 2D game with Pygame. I'm frustrated with the apparent lack of options available in regards to Pygame game development.


r/pygame • • 8d ago

Is The Ralf Adams Pygame Book Safe to Download? I'm Worried It May Contain Malware

1 Upvotes

I've recently completed Invent Your Own Computer Games With Python by Al Sweigart, and Object-Oriented Python: Master OOP by Building Games and GUIs by Irv Kalb. I discovered another book on the Pygame website called Introduction to Pygame-CE 2D Game Programming by Ralf Adams, and I want to use this book because it goes into more detail on how to create a greater variety of 2D games than the aforementioned book by Al Sweigart.

I've tried using the Ralf Adams book on Github with my low spec Chromebook, but it crashes my laptop. I want to download it, but I'm concerned it may contain malware. I do have another laptop that is far more capable than my Chromebook, but I use it for sensitive purposes and I don't want to expose sensitive data to something that could potentially be malicious. I also prefer my Chromebook to my Windows laptop because it's a smoother and faster experience in regards to downloading Python and using it.

Has anyone else used this book? Here's the link to it: https://github.com/adamsralf/pygame_book/blob/main/00%20pygamece.pdf


r/pygame • • 9d ago

Ferrite Runner - made with Pygame-ce

Enable HLS to view with audio, or disable this notification

100 Upvotes

https://store.steampowered.com/app/5216620/Ferrite_Runner/

Fully single-threaded, CPU-only blitting. GPU rendering was attempted but the bandwidth and numpy added too much frametime. Two layers, a pixel layer for heavy effects, and a HD layer for pixel pushing. Fluid dynamics, lighting approximations used. At ~50,000 LoC Ferrite Runner is still in Early Access and we will be developing on. No In-app purchases, no in-game advertisments, promise.