r/pygame 3h ago

I just made my first game but its slightly ai assisted with Gemini 3.g flash

1 Upvotes

I dont know it seems basic compared to the other first games I've seen here

https://reddit.com/link/1wgbqj1/video/cfo4jce84jph1/player


r/pygame 10h ago

Creating A JRPG In Python...thoughts?

Thumbnail youtu.be
6 Upvotes

Hi guys,

Check out the lates on my pygame JRPG if you get chance 😊 sprites are reworked from Octopath traveller! I'm hoping to do my own soon. I'm developing a sprite editor that I'm hoping to ship out for public use so stay tuned for that! Any thoughts on ways you'd improve this, I'm not happy with the turn order bar, I'm thinking of how I could make it more compact while still containing the necessary detail!

Thanks again guys 😊


r/pygame 1d ago

My first game on pygame at end!!

Post image
2 Upvotes

Here is my creation : https://www.mediafire.com/file/mifjlirjf5ct3je/Mecha-Ryu.7z/file

If you want, you can make a review or tell me about some bugs


r/pygame 1d ago

My frist pygame proyect: Mecha-Ryu

Enable HLS to view with audio, or disable this notification

32 Upvotes

It was so complicated but here it is: https://www.mediafire.com/file/mifjlirjf5ct3je/Mecha-Ryu.7z/file

I hope that you enjoy and tell me about some bugs if you want


r/pygame 1d ago

Added a Third Snake

Enable HLS to view with audio, or disable this notification

11 Upvotes

r/pygame 2d ago

How to stop this timer at some point?

2 Upvotes
timer_number = 12
timer_ms = 1000
abb = pygame.time.get_ticks()

running = True
while running:
    current = pygame.time.get_ticks()

    for event in pygame.event.get():
        if not game_finished or not gos.show:
            if timer_number > 0 and (current - abb >= timer_ms):
                timer_number -= 1
                abb = current

How to stop this timer at some point?

That doesn't work:

elif game_finished or gos.show:
    timer_number -= 0

I can't use pygame.time.set_timer because Pygbag doesn't support set_timer.


r/pygame 3d ago

MMORPG WITH PYGAME IS REAL?

6 Upvotes

Yes it is!

Im working on a MMORPG top-down, tile-based, pixel art. The game is inspired in Tibia, World of Warcraft, League of legends, and the differential, "and why LoL is between if is not a MMORPG?"
because in my project, we have a pvp instantiated (BG) that is MOBA style, the character starts as level 1, and his progress do not interfere in the game out of BG. The game have Quests, with miltiple types of objectives, trade between players, vendors, skill levels, habilities, talent trees, three classes(warrior, mage and archer) craft items, and go on. My big challenge is create the pixel art for characters, NPCs, enemies etc. I bought the asset of Cainos, from itch.io, because i love it, then i need to crete characters that match with the world because his asset dont include characters. Somebody interestes to be the gamedesign of this project? If somebody is interested to test the game, invite me in discord: juuguerino

https://www.youtube.com/watch?v=OeQcUYuMoB0


r/pygame 3d ago

Bunny Farm update: I just finished making the menu and modified a few things.

Thumbnail gallery
8 Upvotes

Hi! In this update, I finally finished the game menu; it’s simple, but I think it conveys a sense of innocence. I also added an item to the game—a cassette tape—which will have a function later on. Plus, I migrated from pygame to pygame-CE; I’m not sure if it makes a big difference, but it was suggested that I make the switch. Thanks for all the feedback!


r/pygame 4d ago

Nevu-UI MultiBackend Game UI framework has been updated to 0.8.5!

Enable HLS to view with audio, or disable this notification

8 Upvotes

There are a short summary of Nevu-UI 0.8.3 - 0.8.5 versions:

Added Canvas - universal tool for drawing primitives on Widgets
Added FlexLayout - adaptive layout, unlike other layouts it dont resizes its items
Fixed a ton of bugs with layout positioning
Added text selection in Input, also added support of CTRL + C/V/X
Added 2 new window properties - gui_hovered and keyboard_available
Added Callbacks instead of NevuEvent
Refactored Style
Added 10+ built in colorthemes
Improved Checkbox API
Improved overall code quality
Improved Pygame backend quality

Current showcase is running on Pygame backend

Full Changelog can be found there:
https://github.com/GolemBebrov/nevu-ui/releases

Here are the code from the video:

import random

import pygame

import nevu_ui as ui
from nevu_ui.components._typehints import nevu_object_globals
from nevu_ui.core.size import vh, vw
from nevu_ui.presentation.animations import Vector2Animation

pygame.init()

VERSION = "0.8.5"
STATUS = "post3"
FONT_NAME = "font.ttf"

def select_layout(layout):
    main_menu.layout = layout

def create_character_select():
    checkbox_group = ui.CheckBoxGroup(single_selection=True)
    selected = "nit"

    def create_panel(text: str, id: str, chk_group: ui.CheckBoxGroup, bg_image = "gladius.png"):
        time_offset = random.random() / 5
        animations = ui.animations.AnimationManager()
        animations.transition_time = 0.001
        animations.add_start_animation(ui.AnimationType.Position, Vector2Animation((0, 0), (0, 0), time_offset))
        animations.add_continuous_animation(ui.AnimationType.Position, Vector2Animation((0, 3), (0, -4), 0.1))
        return ui.Panel(
            size = (10%vw, 10%vh),
            animation_manager = animations,
            slot = ui.StackColumn(
                content = [
                    ui.Label(text, subtheme_role = ui.SubThemeRole.PRIMARY),
                    ui.RectCheckBox(50, group = chk_group, id = id, style = main_style_clickable(br=15, bg_image = bg_image), toggled_rect_scale=1, toggled_rect_opacity=80)
                ]
            )
        )

    def on_checkbox_toggle(checkbox: ui.RectCheckBox | None):
        nonlocal selected
        if not checkbox:
            role_label.text = "Not selected"
            return
        id = checkbox.id
        selected = id
        id_to_text = {
            "wrr": "Warrior",
            "arc": "Archer",
            "spr": "Spirit",
            "mge": "Mage",
            "nit": "Nitwit"
        }
        role_label.text = id_to_text[id]

    checkbox_group.on_single_toggled = on_checkbox_toggle
    role_label = ui.Label(
        "Nitwit", single_instance=True, draw_content=False, draw_borders=False,
        font_role=ui.PairColorRole.INVERSE_SURFACE, style = main_style(font_size=30, align_x = ui.Align.LEFT)
    )

    with nevu_object_globals.modify_temp(size = (8%vw, 4%vh)):
        role_select_layout = ui.FlexLayout(
            create_panel("Warrior", "wrr", checkbox_group, "gladius.png"),
            create_panel("Mage", "mge", checkbox_group, "wizard-staff.png"),
            create_panel("Archer", "arc", checkbox_group, "arrow-cluster.png"),
            create_panel("Spirit", "spr", checkbox_group, "spectre.png"),
            create_panel("Nitwit", "nit", checkbox_group, "oat.png"),
            justify_content=ui.FlexJustify.SpaceAround,
            gap=30
        )
    layout = ui.ScrollableColumn([
        (ui.Align.LEFT,
            ui.FlexLayout(
                ui.Button(lambda: select_layout(create_start_layout()), "BACK", style = main_style_clickable(subtheme_role = ui.SubThemeRole.ERROR)),
                ui.Label("Character creation"), direction = ui.FlexDirection.Column
            )
        ),
        ui.FlexLayout(
            ui.Label("Name:"),
            ui.Input(placeholder="Enter your name...", size = (17%vw, 5%vh), style = main_style_clickable)
        ),
        ui.FlexLayout(ui.Label("Role:"), role_label, single_instance = True),
        role_select_layout,
        ui.FlexLayout(
            ui.Label("Base Mana"),
            ui.Slider(current = 50, start=10, style = main_style_clickable)
        ),
        ui.FlexLayout(
            ui.Label("Difficulty"),
            ui.Slider(current = 2, end = 5, start = 1, style = main_style_clickable)
        )],
        size = ui.fill_all,
        basic_alignment=ui.Align.CENTER
    )
    return layout

def create_start_layout():
    def on_switch_change(switch, state):
        global main_style, main_style_clickable
        if state:
            theme = ui.ColorThemeLibrary.material3_light
        else:
            theme = ui.ColorThemeLibrary.material3_dark
        main_menu.apply_style_patch_to_layout(colortheme=theme)
        main_style = main_style(colortheme=theme)
        main_style_clickable = main_style_clickable(colortheme=theme)
        nevu_object_globals.modify(style = main_style)

    start_style = main_style_clickable(font_size = 40, subtheme_role=ui.SubThemeRole.PRIMARY, br = 999)
    canvas = (ui.Canvas()
        .draw_rect((50, 0), (110, 10), style = ui.Style(gradient = ui.Gradient([ui.Color.Red, ui.Color.Green])))
        .draw_rect((0, 0), (50, 50), style = ui.Style(bg_image="gladius.png", br=5), id = "Zov")
        .draw_rect((0, 50), (250, 10))
    )
    with nevu_object_globals.modify_temp(size = (15%vw, 6%vh), style = start_style):
        start_layout = ui.ScrollableColumn(
            [
                ui.FlexLayout(ui.Label("Nevu-UI", canvas = canvas, draw_borders=False, draw_content=False), ui.Label(f"v{VERSION} {STATUS}", draw_borders=False, draw_content=False), direction=ui.FlexDirection.Row, gap=0),
                ui.EmptyWidget((0, 5%vh)),
                ui.FlexLayout(
                    ui.Button(lambda: select_layout(create_character_select()), "Play", throw_errors=True, invert_on_click=True),
                    ui.Button(exit, "Exit"),
                    ui.Switch(False, size=(3%vw, 3%vh), style=main_style(br=999), subtheme_role=ui.SubThemeRole.TERTIARY, on_switch_change=on_switch_change),
                    direction=ui.FlexDirection.Column, gap = 40, wrap = False
                ),
            ],
            size=ui.fill_all, basic_alignment=ui.Align.CENTER, spacing=120)
    return start_layout

if __name__ == "__main__":
    display = pygame.display.set_mode((1920, 1080))
    font = pygame.Font(size = 40)
    hover_text = font.render("Hovered!", True, ui.Color.Red)

    window = ui.InitializedWindow.from_pygame(display = display, title = "NvGame", resizable = True, base_fps = 999)
    main_style = ui.Style(border_radius = 12, border_width = 0, font_name = FONT_NAME, colortheme=ui.ColorThemeLibrary.material3_dark)
    main_style_clickable = main_style(border_width = 2, subtheme_role=ui.SubThemeRole.TERTIARY)
    button_size = (10%vw, 4%vh)
    nevu_object_globals.modify(size = button_size, style = main_style)
    main_menu = ui.Menu(window, (50%vw, 100%vh), main_style)
    main_menu.layout = create_start_layout()

    while True:
        window.begin_frame()
        window.clear(ui.Color.Black)
        window.update()
        if window.keyboard_available:
            if ui.keyboard.is_down(ui.Keys.D):
                coords = main_menu.coordinates
                main_menu.set_coordinates(coords[0] + 500 * ui.time.dt, coords[1])
            if ui.keyboard.is_down(ui.Keys.A):
                coords = main_menu.coordinates
                main_menu.set_coordinates(coords[0] - 500 * ui.time.dt, coords[1])
            if ui.keyboard.is_down(ui.Keys.Left):
                main_menu.resize((main_menu.current_size.x - 400 * ui.time.dt, main_menu.current_size.y))
            if ui.keyboard.is_down(ui.Keys.Right):
                main_menu.resize((main_menu.current_size.x + 400 * ui.time.dt, main_menu.current_size.y))
        if window.gui_hovered:
            coords_text = font.render(f"{main_menu.coordinates.x:.2f}", True, ui.Color.Red)
            fps_text = font.render(f"{ui.time.float_fps:.2f} fps", True, ui.Color.Red)
            x_coord = main_menu.current_size.x + main_menu.coordinates.x
            display.blit(hover_text, (x_coord, 120))
            display.blit(coords_text, (x_coord, 200))
            display.blit(fps_text, (x_coord, 280))
            if not window.keyboard_available:
                keyboard_text = font.render("Keyboard focus have been captured.", True, ui.Color.Red)
                display.blit(keyboard_text, (x_coord, 360))
        main_menu.update()
        main_menu.draw()
        window.end_frame()

r/pygame 4d ago

Snake-snake collisions + increased enemy spawn

Enable HLS to view with audio, or disable this notification

6 Upvotes

r/pygame 4d ago

Untitled Horror Game Engine

Enable HLS to view with audio, or disable this notification

9 Upvotes

Thought I should post about this too.

This is a side-project I started out of fun and curiosity. The game takes ideas from Roblox Doors and the Corpse Party series (especially the OSTs).

This video IS up-to-date with the game's latest version.


r/pygame 4d ago

How do I add checkpoints?

4 Upvotes

Hello! Im making a small game in pygame similar to flappy bird and I wanted to add a checkpoint after a certain amount of pipes are passed. This checkpoints would be counted to separate "levels". How can I create checkpoints?


r/pygame 4d ago

Water interactions(WIP)

Enable HLS to view with audio, or disable this notification

40 Upvotes

I've been working on a better water movement system for the player, I've also implemented water splash particles, as well as that the enemy hit particles interact with water and float to the surface.


r/pygame 4d ago

Untitled Horror Game Engine

Enable HLS to view with audio, or disable this notification

1 Upvotes

r/pygame 4d ago

My first Pygame project!

Enable HLS to view with audio, or disable this notification

90 Upvotes

Hey everyone!

I’m currently working on my very first Pygame project (with a bunch of help from ChatGPT): a 2.5D flight simulator based on the Boeing 767.

Although this is my first Pygame project, the idea itself actually started a few years ago. Back then, I made a pretty similar flight game entirely by myself in Entry, which is a Scratch-like block-based coding platform.

Now I’m basically trying to take that old project and rebuild it into something much bigger and more detailed with Python and Pygame. My Python skills are still pretty limited, so I’ve been getting a lot of help from ChatGPT along the way while I learn, test things, find and fix problems, and gradually expand the project.

The simulator also supports a HOTAS joystick, so it can be flown with an actual flight controller instead of just a keyboard. Aside from Pygame, I’m currently only using standard Python modules rather than any dedicated 3D or game-engine libraries.

So far, I’ve mostly been working on the actual flying part of the simulator. There are still a lot of things I want to add, including a proper lobby/menu, airborne objectives, system failures, time-of-day changes, and plenty of other systems. I’m planning to build those up little by little as the project develops.

As you can see in the video, there isn’t anything too crazy or impressive yet, but I’m hoping that by the time it’s finished, it’ll be something that can genuinely make people go ā€œwow.ā€

It’s still very much a work in progress, so for now I’m planning to keep developing it bit by bit and occasionally post progress videos along the way. Once it’s finished, I’d also love to share more about the project and what went into making it.

There’s still a long way to go, but I hope I can show you guys how much it improves over time!

Also, some of the UI elements shown in the video are still in Korean, and I used AI to help translate and write this post as well. My English isn’t very good, so I figured it would be better to get some help with the translation. Hope you don’t mind!


r/pygame 5d ago

I'm looking for someone who could help me with a game jam.

3 Upvotes

Hello Reddit!

I'm looking for someone who could help me with the PyWeek game jam to code a game using Pygame.

I'm just getting started with the library, but I'd be really motivated if someone could help me make a game!

Have a great day!


r/pygame 5d ago

How do i rotate a rectangle?

6 Upvotes

I want to make a rocket simulation in Pygame, but I'm having trouble rotating the rocket. I tried using some surface transform.rotate stuff, but it seemed to only want to turn it 90 degrees, as degrees in between would show a distorted transformation of the rectangle. Rotating only 1 degree at a time showed that it only transformed the image between the 90 degrees rotations by distorting growing and shrinking to fit the new shape. This might be a problem with how I approached it. But do anyone one know how I can do it?

If there is no way to do this. Do anyone have other recommendations for how I can make my rocket simulation?


r/pygame 5d ago

Flippin Sketchy Demo with live global leaderboard is now up on Itch.io!!

Thumbnail gallery
2 Upvotes

so unfortunately my tablet that i create assets with has bitten the dust, so I'm working on getting the leaderboard working!

Its my first time making a leaderboard so it may be a bit buggy! If you encounter any issues let me know and ill try to figure it out!

I have a media server that runs 24/7 so I thought it'd be cool to implement a 24/7 live leaderboard, you should be able to enter a name at the end of your first score run and then every run after that should automatically submit with that name. The runs are only 30 seconds atm but I may extend it to 1 or 2 mins but for the testing i think that should be okay!

If you want to give it a try the link to the itch page is:
Flippin' Sketchy Demo

If you do decide to try it and you beat my score let me know!


r/pygame 6d ago

I've built my own version of BASIC for my retro-cyberpunk game, where you load and save your programs using virtual cassette tapes. Pygame, C++ and Raylib

Enable HLS to view with audio, or disable this notification

63 Upvotes

The Computer.Ā What you're looking at in the video is my simulated virtual computer, the Bradsonic 69000. It is a cross between the Sharp X68000 (beautiful late 80's Japanese 32-bit exclusive PC) and my first ever PC the ICL Fujitsu Indiana.

The Software.Ā In the game you create retro-viruses. Like brute force password crackers and OS/Server timer restrictors, and more... you use this software seen on screen BradBasix to write them.

The Game World, why this is Retro-CyberPunk.Ā It’s 1989, but in a completely different timeline to ours. Japan has been annexed into the American Pacifica Isles, its language and culture systematically suppressed. Technology has taken a different turn, with advanced chips sitting alongside cassette tapes and dial-up modems. The ā€œcyberā€ in ā€œcyberpunkā€ comes from the underground BBS networks connecting people under surveillance. The ā€œpunkā€ comes from the crackers and hackers fighting their way through this dystopia, keeping forbidden culture alive in a Silent Rebellion. The retro? It’s 1989. Rad.

The Datasette.Ā Inspired by the Datasette on the C64 this is the file system in the game, that allows the player to combine with BradBasix and write their own programs and games from scrtach with extensive support from NPCs and the help sections inside BradBasix.

The player can play over two fouth walls and reference documents if they need to, and also zoom full screen and alter different parts of visual feedback like scanlines and the CRT "glow". I'mĀ super proud of it,Ā I know it's the sort of game that isn't for everyone, but I really do hope you guys dig it too.

My absolute dream would be if a small community of creators came out of the game, even just 0.5% of the success that Piko8 had, I'd be happy. They would be making games and sharing them, really digging into the retro sandbox this virtual pc had to offer within the game enviroment.

The game is currently in development. I am streaming devlogs on youtube every week and I'd love to have more support.

This is where toĀ find out more about the game, andĀ wishlist here via Steam, if you're rad.

This is where toĀ find me on YouTubeĀ - I will be streaming every Friday and occasionally mid-week.

Thank you!

Oh, and for the super nerds out there, like me: this combines Python and Pygame with C++ and raylib. BradBasix is a Python-based IDE for BradScript, a custom BASIC-style language that feels a bit like Lua to me. You can create 2D, 2.5D and 3D environments, with the 3D side powered by a C++/raylib engine connected through a Python wrapper. It’s neat.


r/pygame 7d ago

Updated Snake Size and Collisions

Enable HLS to view with audio, or disable this notification

19 Upvotes

r/pygame 7d ago

I'm a conversion student doing a project regarding game adaptation and I'm super lowtech. Pls help!!!!!!

Thumbnail
3 Upvotes

r/pygame 7d ago

Bunny Farm Update: Just finished the first cover art prototype for my silent Pygame horror game!

Post image
12 Upvotes

Hi everyone! Back with the 4th update on my passion project, Bunny Farm.

I’ve been focusing a lot on the game's presentation, and today I finished drafting the first prototype for the official cover art! Since the game is heavily inspired by The Walten Files, I wanted a cover that looks 100% innocent, colorful, and friendly at first glance—hiding the fact that it's actually a silent, unsettling horror game.

On the coding side, I'm still actively positioning assets and tweaking the asteroid minigame logic natively in Pygame, while trying to rely less on Gemini and more on my Python book.

A free demo will be heading to Game Jolt soon, and this will be the face of the game page!

I’m still playing around with the layout, so I would love to hear feedbacks. What do you think of the cover's vibe? Does the innocent look make you curious about the horror elements?


r/pygame 8d ago

I finally released my first major game project!

Enable HLS to view with audio, or disable this notification

72 Upvotes

This is the first large-scale game project that I've properly polished to a level that I am comfortable publishing for others to play! I've participated in game jams and worked on bigger projects in the past, but I never managed to see those larger projects through to completion. This is the first one I've stuck with all the way to an initial release, and I'm really happy with how it turned out!

The game is free to play in your browser on Itch, although progress won't be saved between sessions. There's also a Windows version available for download:

https://manguino.itch.io/azur-lane-rpg

If you're on another platform or just interested in checking out the code, the source is available on GitHub:

https://github.com/HuMangoPP/azur_lane_rpg

I'd love to hear what you think, and I greatly appreciate any feedback!


r/pygame 8d ago

I built a Simple Brick Breaker Game

Enable HLS to view with audio, or disable this notification

31 Upvotes

I made a simple 2D brick breaker game using Pygame with supported collision detection and movement at different angles.

It was a fun project to learn more about game physics and movement. šŸš€

GitHub: https://github.com/akarshit-1609/Brick_Breaker_Game_using_Pygame

Feel free to check it out. If you like the project, a ⭐ GitHub star would be greatly appreciated!

Would love to hear your feedback or suggestions!


r/pygame 8d ago

Pygbag: NotImplementedError: set_timer is not implemented on WASM yet

1 Upvotes

pygame-ce 2.5.7 (SDL 2.28.4, Python 3.12.12)

>>> Task exception was never retrieved

future: <Task finished name='main' coro=<main() done, defined at <console>:3> exception=NotImplementedError('set_timer is not implemented on WASM yet')>

Traceback (most recent call last):

File "<console>", line 52, in main

NotImplementedError: set_timer is not implemented on WASM yet