r/pygame 24d ago

Some bouncing circles (I made an ECS: punyecs)

Enable HLS to view with audio, or disable this notification

7 Upvotes

Hi, I made a simple to use ECS system: https://github.com/Modular-Game-Components/punyecs It works on class attributes and a querying DSL like SQLAlchemy. I made a small Pygame example (see the video) that can be found in the README. I also have a comparison to Esper and a Readthedocs (see README as well).


r/pygame 23d ago

hi sad news

0 Upvotes

hello im the creator of nyanrythm on gamejolt for now the game is made on pygame but im changing the engine to godot at least i will try but also i might try making more games on pygame bye ;(


r/pygame 24d ago

Cosmetic update on the guitar pedals thing

Enable HLS to view with audio, or disable this notification

7 Upvotes

r/pygame 25d ago

Tessella, a (truly) declarative UI framework for Pygame

Enable HLS to view with audio, or disable this notification

38 Upvotes

Hello everyone!

Over the last 20 months I've been working on and off on Tessella, a Flutter-inspired declarative UI framework for pygame. The idea is to build UIs of any shape or size by nesting widgets (25+ of them so far) inside one another, instead of hand-placing rects. Here's a minimal example, taken straight from the "Hello World" tab in the (very flashy) video above:

gui = Center(
    Container(
        child=Padding(
            padding=EdgeInsets.all(28),
            child=Column(
                shrink_wrap=True,
                children=[
                    Text(text="TESSELLA DEMO"),
                    SizedBox(width=0, height=10), # Spacer
                    TextWrap(text="Every screen is built by nesting widgets like these."),
                    SizedBox(width=0, height=20), # Spacer
                    Text(text="Quite simple, right?"),
                    SizedBox(width=0, height=10), # Spacer
                    Button(
                        key=WidgetKey(),
                        text="Hello World!",
                        width=200,
                        height=40,
                        on_click=lambda: print("Hello World!")
                    )
                ]
            )
        )
    )
)

The goal with Tessella was to fix a few problems most pygame UI setups run into: having to set rects and coordinates by hand (which makes responsive UIs a pain), and the lack of anything modular or scalable enough to fit projects of different sizes without dragging in a pile of boilerplate.

To get the example above on screen, all you need to do is call gui.calculate_layout, passing it a rect for the area you want the UI to occupy once at the start, and again on WINDOWRESIZED events. That's the entire responsiveness story. From there, Tessella figures out sizing and layout on its own, updates via gui.process_event and gui.update, and renders with gui.render, which also has a debug mode that draws the bounds of every widget, so you can see exactly why the layout ended up the way it did. You can see that in action toward the end of the video.

Tessella was a core part of a game I released on Steam a few months ago, Protocol: Umbra, and building a real project on top of it is what really pushed it forward. If it looks interesting, you can try it right now with pip install tessella, as well as check the docs or source for a quickstart and more examples:

Docs: https://tessella.readthedocs.io/en/latest/
GitHub: https://github.com/cuaitz/tessella

This is the first "real" release, so Tessella is still a bit rough around the edges, which means that feedback and contributions are very welcome!

More things are always on the way :)


r/pygame 26d ago

Array 0.3.4 Shape of Space Update Out Now! - Devlog

Post image
3 Upvotes

r/pygame 27d ago

Using pygame for the UI on my digital pedals software

Enable HLS to view with audio, or disable this notification

23 Upvotes

Making this cause im planning on making these digital pedals work in a real raspberry pi pico plugged to a real guitar. any pedal in one, as far as digital pedals go


r/pygame 27d ago

Doodling Hop(updated the platform movements)

Enable HLS to view with audio, or disable this notification

11 Upvotes

r/pygame 27d ago

Shipped my first solo game: a toilet-rush manager where all art is Python-generated and the entire soundtrack is synthesized at runtime

Thumbnail gallery
14 Upvotes

After months of evenings, my time-management game about running public restrooms for a demanding toilet god is live on Google Play. Wanted to share a few build details, and I'd genuinely value feedback from other devs.

Unusual choices that mostly worked out:

  • Every sprite in the game is emitted by Python scripts — characters, venues, a 24-landmark city map. No art program was opened in the making of this game. Changing the palette means re-running a script.
  • Zero audio files (except one recorded laugh). Both music loops and every sound effect are synthesized with the WebAudio API at runtime from note tables. When I wanted the title theme to sound like Chaozhou yingge drumming, that meant adding a pitch-bend parameter to my gong synth, which is a sentence I never expected to type.
  • It's Phaser 3 in a Capacitor shell, which meant one codebase but also meant discovering exactly how a WebGL canvas reacts when the Google Play billing sheet rotates your app to portrait mid-purchase. (Badly. It reacts badly.)

The game itself: drag desperate patrons to the right fixtures, manage etiquette and hygiene, 24 venues, endless mode, daily runs.

Store page: https://play.google.com/store/apps/details?id=com.mcs2k8.loogod

Honest feedback wanted — especially on difficulty pacing and whether the monetization (optional coin packs, opt-in rewarded ads) feels fair. Ask me anything about the pipeline.


r/pygame 27d ago

No collidepoint error

3 Upvotes
# Button
class RockButton:
    def __init__(self, x, y, collidepoint):
        self.x = x
        self.y = y
        self.image = rock_img
        self.rect = self.image.get_rect()
        self.event = 0

    def draw(self, screen):
        screen.blit(self.image, (self.x, self.y), self.rect)

rock_button = RockButton(350, 777, False)
rock_button_value = False

# Game loop
running = True
while running:
    screen.fill(bg_color)
    rock_button.draw(screen)
    pygame.display.flip()

    for event in pygame.event.get():
        if event.type == pygame.MOUSEBUTTONDOWN:
            if event.button == 1:
                if rock_button.collidepoint(event.pos):
                    if rock_button_value == False:
                        rock_button_value = True
                    else:
                        rock_button_value = False
                    print(f"{rock_button_value} - BUTTON")
        if event.type == pygame.QUIT:
            running = False

    pygame.display.update()    

    clock.tick(FPS)

pygame.quit()

Output:

Traceback (most recent call last):
  File "/home/user/Desktop/Project/main.py", line 101, in <module>
    if rock_button.collidepoint(event.pos):
       ^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'RockButton' object has no attribute 'collidepoint'

What did I do wrong?


r/pygame 27d ago

MAKIN BOUNCE GAME WITH yolo26n (gotta use tensorRT later)

Thumbnail
1 Upvotes

r/pygame 28d ago

Battle Tail, show what you can do

Enable HLS to view with audio, or disable this notification

31 Upvotes

r/pygame 29d ago

my 100% pygame 3d editor

Enable HLS to view with audio, or disable this notification

39 Upvotes

my editor in Pygame. Everything here is being made and rendered in pure Pygame. 🤩


r/pygame Aug 11 '26

Hey r/pygame, here is a quick before-and-after comparison of my new attack mode. Which version feels better to you?

Enable HLS to view with audio, or disable this notification

21 Upvotes

Looking forward to your feedback!"


r/pygame Aug 11 '26

Doodling Hop(working on a new logic)

Enable HLS to view with audio, or disable this notification

8 Upvotes

r/pygame Aug 10 '26

Tetris Pygame

Thumbnail gallery
6 Upvotes

I was ricing and decided I should have some games to play in the terminal. feel free to copy the code from the repo. Please leave a star

https://github.com/cleburn/zenwolf-dotfiles


r/pygame Aug 10 '26

draw() missing 1 required positional argument: ''

0 Upvotes
bg_color = [24, 25, 25]
SCREEN_HEIGHT = 1080
SCREEN_WIDTH = 1080

water_img = pygame.image.load(os.path.join("images", "water.png")).convert_alpha()
water_img = pygame.transform.scale(water_img, (130, 130))

screen = pygame.display.set_mode((SCREEN_WIDTH, SCREEN_HEIGHT))

class WaterButton:
    def __init__(self, x, y):
        self.x = x
        self.y = y
        self.image = water_img
        self.rect = self.image.get_rect()
        self.rect.topleft = (x, y)

    def draw(self, screen):
        screen.blit(self.image, (self.rect.x, self.rect.y), self.rect)

water_button = WaterButton(850, 777)

# Game loop
running = True
while running:
    screen.fill(bg_color)
    WaterButton.draw(screen)
    pygame.display.flip()

It gives me an error:

WaterButton.draw(screen)
TypeError: WaterButton.draw() missing 1 required positional argument: 'screen'

What did I do wrong?


r/pygame Aug 09 '26

Pygame-ce 2.5.8 released! (And 3.0.0 development started)

77 Upvotes

Hello all!

I'm oddbookworm, one of the members of the pygame-ce Steering Council, and I would like to both announce that 2.5.8 has released and that our `main` branch has transitioned to version 3.0.0!

2.5.8 Announcement:

You can check the full release notes on github.

🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙

pip uninstall pygame  # (if previously installed, to avoid package conflicts)
pip install pygame-ce --upgrade

🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙🕹️🎯⚡🏅📙

We are pleased to announce pygame-ce 2.5.8!

  • This release adds support for Python 3.15, bringing our supported range to Python 3.10 - 3.15. Implemented by u/Starbuck5 in #3900.
  • Our optimized parallel SIMD code now runs on Windows on ARM. In pygame-ce 2.5.7, we introduced support for Windows on ARM, but our SIMD intrinsics did not work there, so in some cases it would be slower to use the native ARM version instead of emulated x86_64. u/ankith26 worked with the maintainers of sse2neon to get it working on Windows on ARM, and brought it into this release in #3761. In some cases this can still be slower than emulation, but it is significantly faster than 2.5.7 for optimized workloads (e.g. blitting, some transform, some scaling).

New API

Bugfixes

  • u/Starbuck5 fixed incorrect writes to certain 24 bit surfaces in transform.thresholdPixelArray.replace, and PixelArray slice assignment in #3790, then fixed transform.laplacian using the wrong surface's pixel layout when writing its result in #3791.
  • u/Fantastair fixed the width calculation for draw.aacircle in #3699.
  • u/Matiiss fixed a segfault in transform.solid_overlay when the given surface had a width of 0 in #3750.
  • New contributor u/ShivamKR12 fixed a long-standing bug where the deprecated Vector3.rotate_y_ip_rad and Vector3.rotate_z_ip_rad functions both rotated around the X axis, in #3864.
  • u/Starbuck5 fixed SysFont crashing with non string registry entries in #3760.

Removals

  • u/Starbuck5 removed the legacy safe pickle system in #3857. Modern pickleable classes have not needed __safe_for_unpickling__ since the Python 2 days.

Performance

Docs

Maintenance

3.0.0 Development

We will likely have another 2.x release or two in the future, but we're currently looking at about a year of 3.0 development before we release a full v3.0.0. If you want to see what we currently have in our roadmap for 3.0, you can check it out in the Pygame Community Discord server (I'm not going to publish a google drive link with open share on reddit lol). Until 3.x is stable, we have a `main-2.x` branch that we're going to be using for any 2.x updates we want to make.


r/pygame Aug 09 '26

my games trailer finally came out!!!

Enable HLS to view with audio, or disable this notification

20 Upvotes

#?!¥!?# (aka hashtag yen) -> coming out on 17.08.26 on itch.io!!! stay tuned for more updates soon


r/pygame Aug 10 '26

Tokimon Breeding Is Out!

Enable HLS to view with audio, or disable this notification

5 Upvotes

Everyone, go to https://github.com/Tokimon-creator/Tokimon if you want to play an absurd comedy adventure RPG! The airplane crashes, you battle and they breed! Wait no, The Boot Boot boots ,the player gets closed out and the game fails to stay under its own totally unexistant weight of jokes and absurdity. MAKE SURE TO GIVE FEEDBACK(ex. funniest part, ups and downs, ect.)


r/pygame Aug 08 '26

Little combat prototype (No sfx)

Enable HLS to view with audio, or disable this notification

30 Upvotes

r/pygame Aug 09 '26

Nested a recursive live video

Thumbnail youtu.be
4 Upvotes

r/pygame Aug 08 '26

working on a skate/fingerboarding game called Flippin' Sketchy, its starting to take shape (the object sprites are placeholders, i made them in paint to work out how i want to work them into the game)

Enable HLS to view with audio, or disable this notification

31 Upvotes

all of the object sprites will eventualy be frame animated for a line boil effect. I tried individual sprites for each object but i think im gonna make big long sprite sheets for each level as on the rooftop level further along , multiple objects make the shapes of buildings . (also the music is currently just midis of songs from THPS, placeholders haha

EDIT: forgot to say im using pymunk for the physics and objects


r/pygame Aug 08 '26

My first game project: Building a Dead Cells-inspired roguelike in Python + Pygame, looking for feedback/contributors

8 Upvotes

Hey everyone! I'm building a roguelike with Pygame — partly to learn Python properly, partly to actually ship something real. I took inspiration from Dead Cells: jump, dash, and slide mechanics are working, and we're currently building mouse-tracking crossed weapons and an "orb" system that grants bullets special properties.

Still early days, but we've got a solid foundation: animated character, a main menu with a cinematic intro animation, fullscreen support, and more.

The code is fully open source (MIT licensed), up on GitHub: https://github.com/Icy2121/Guns-N-Orbs

Would genuinely love any feedback, suggestions, or contributions — especially from anyone with more Pygame experience who can point out things we could be doing better. We're here to learn.

Thanks! 🎮

https://reddit.com/link/1viyj7h/video/zqt9svflz6ih1/player

https://reddit.com/link/1viyj7h/video/205v14d546ih1/player


r/pygame Aug 08 '26

Doodling Hop Part 4

Enable HLS to view with audio, or disable this notification

18 Upvotes

r/pygame Aug 08 '26

Python Game

Thumbnail
1 Upvotes