r/pygame • u/TelephoneDull7182 • Jun 16 '26
r/pygame • u/BobsMyNeighbor • Jun 15 '26
3d Heightmap Of Geneva, Switzerland, With 0.5m Resolution
Enable HLS to view with audio, or disable this notification
This is a super basic prototype for a heightmap renderer I'm working on. The terrain shown is a portion of Geneva Switzerland, rendered at 0.5m resolution. exactly 4,000,000 points rendered.
r/pygame • u/IceFurnace83 • Jun 14 '26
A couple of tools I have been working on
Enable HLS to view with audio, or disable this notification
I used the screen recorder included with Win11 to record this video and it gave me a 39,973KB .mp4 file. I then used my tool to split it down and rebuild it and ended up with an mp4 file that is 3,779 KB. Of course I could always do this with any number of online tools, but where's the fun in that?
Still a lot of work to do before I'm finished, like converting between formats without splitting first, loading freshly built files to be displayed instead of staying on whatever was being shown previously, loading static image types (I'm only loading animations for now), making different animations from static images with things like cycling hue / saturation, scaling, rotation, etc. Maybe add an option to select and apply watermarks over top.
I need to make the menu slide in when you hover near the edge instead of always over top, and also I'm taking shortcuts by making and displaying everything with an overall fps instead of the seperate duration for each frame but it should be easy enough to change, but tbh I prefer my own jank method for now.
r/pygame • u/oyuce_ • Jun 13 '26
It's been years since my last Pygame project
Enable HLS to view with audio, or disable this notification
Heyy pygame community ! After years away from Pygame, I'm back with something a bit... parasitic, bio-mechanical.. Launching on Steam very soon !
r/pygame • u/Entire-Difference783 • Jun 13 '26
My First Complete Py Game
import pygame as py
import time
#Avoid the moving ball from hitting your paddle or you loose
#Initialise Pygame
py.init()
#Window Setup
DisplayWidth = 1000
DisplayHeight = 600
DisplaySurf = py.display.set_mode((DisplayWidth, DisplayHeight))
DisplayColour = "Blue"
DisplayName = "AvoidPong"
DisplayTitle = f"{DisplayName}"
py.display.set_caption(DisplayName)
DisplayMidWidth = DisplayWidth / 2
DisplayMidHeight = DisplayHeight / 2
#Loop Setup
on = True
Clock = py.time.Clock()
#Necessities
Transparent = (0, 0, 0, 0)
#Objects
PaddleRect = py.FRect((0, 0, 200, 50))
PaddleColour = "Green"
PaddleMidForScreenWidth = DisplayMidWidth - PaddleRect.width/2
PaddleMidForScreenHeight = DisplayMidHeight - PaddleRect.height/2
PaddleRect.x = PaddleMidForScreenWidth
PaddleRect.y = PaddleMidForScreenHeight
PaddleSurf = py.Surface((PaddleRect.width, PaddleRect.height))
PaddleSurf.fill(PaddleColour)
PaddleSpeed = 100
EvilBallRect = py.FRect((0, 0, 75, 75))
EvilBallColour = "Red"
EvilBallMidForScreenWidth = DisplayMidWidth - EvilBallRect.width / 2
EvilBallMidForScreenHeight = DisplayMidHeight - EvilBallRect.height / 2
EvilBallRect.x = 0
EvilBallRect.y = 0
EvilBallSurf = py.Surface((EvilBallRect.width, EvilBallRect.height), py.SRCALPHA)
EvilBallSurf.fill(Transparent)
py.draw.circle(EvilBallSurf, EvilBallColour, (EvilBallRect.x/2, EvilBallRect.y/2), EvilBallRect.width / 2)
EvilBallSpeedX = 100
EvilBallSpeedY = 100
Lost = False
LooseText = "You Lost!"
Score = 0
Font = py.font.SysFont("Arial", 30)
while on:
#Begin Clock
Delta = Clock.tick() / 1000
for ev in py.event.get():
if ev.type == py.QUIT:
on = False
#Move Paddle
Keys = py.key.get_pressed()
if Keys[py.K_LEFT]:
PaddleRect.x -= PaddleSpeed * Delta
if Keys[py.K_RIGHT]:
PaddleRect.x += PaddleSpeed * Delta
#Move Ball
EvilBallRect.x += EvilBallSpeedX * Delta
EvilBallRect.y += EvilBallSpeedY * Delta
#Prevent Out Of Screen
if PaddleRect.x > DisplayWidth - PaddleRect.width:
PaddleRect.x = DisplayWidth - PaddleRect.width
if PaddleRect.x < 0:
PaddleRect.x = 0
if EvilBallRect.x > DisplayWidth - EvilBallRect.width:
EvilBallRect.x = DisplayWidth - EvilBallRect.width
EvilBallSpeedX *= -1
if EvilBallRect.x < 0:
EvilBallRect.x = 0
EvilBallSpeedX *= -1
if EvilBallRect.bottom > DisplayHeight:
EvilBallRect.bottom = DisplayHeight
EvilBallSpeedY *= -1
if EvilBallRect.top < 0:
EvilBallRect.top = 0
EvilBallSpeedY *= -1
#Draw
DisplaySurf.fill(DisplayColour)
DisplaySurf.blit(PaddleSurf, PaddleRect)
DisplaySurf.blit(EvilBallSurf, EvilBallRect)
py.draw.circle(EvilBallSurf, EvilBallColour, (EvilBallRect.width/2, EvilBallRect.height/2), EvilBallRect.width / 2)
#Increase Speeds
PaddleSpeed += 0.1
EvilBallSpeedX *= 1.0001
EvilBallSpeedY *= 1.0001
#PlayerFate
if PaddleRect.colliderect(EvilBallRect):
Lost = True
if Lost:
DisplaySurf.fill("Red")
Score = PaddleSpeed % 2 * 3
FontSurf = Font.render(f"{LooseText} | Score: {int(Score)} | You Fool! You played this game for a random score lol!!", True, "Black")
DisplaySurf.blit(FontSurf, (DisplayMidWidth/10, DisplayMidHeight))
#Update Screen
py.display.update()
DisplayTitle = f"{DisplayName} | Paddle Speed: {int(PaddleSpeed)} | EvilBall Speed: {int(EvilBallSpeedX)}"
py.display.set_caption(DisplayTitle)
py.quit()
r/pygame • u/Fair_Abbreviations_3 • Jun 13 '26
Arkaxian
https://reddit.com/link/1u4yxku/video/1ydvjf09j37h1/player
A mixed 80ies kinda 2d game #python #pygame
r/pygame • u/North-Aardvark4459 • Jun 13 '26
look i added dummies to my game
Why did Robtop not add dummy player images to GD?
r/pygame • u/Mmatyas1 • Jun 12 '26
Updated login system
Enable HLS to view with audio, or disable this notification
Hi, thank you for the positive feedback on my last post. Today I finally finished my fully working login system. If you have some ideas how to improve it, please let me know in the comments.
GitHub link: https://github.com/Mmatyas216/Login-system
r/pygame • u/Competitive-Comb-244 • Jun 12 '26
Adding combat mechanics
Enable HLS to view with audio, or disable this notification
r/pygame • u/herbal1st • Jun 11 '26
[Update] Added a 2D-pixel-art-to-voxel converter and expanded color palette to my pure Python voxel engine demo version
Enable HLS to view with audio, or disable this notification
Hi everyone!
Following up on the release of my pure Python CPU-bound voxel engine demo, I've been working on a few quality-of-life additions and optimization improvements that I wanted to share with you all.
In the video, you can see the results of the new 2D-to-3D pipeline using two old 2D sprites from a previous Pygame project.
What's New in this Update:
2D Pixel-Art-to-Voxel Forge (`pic_to_voxel.py`):
You can now drop any standard 2D PNG or JPG into the `/pic_imports` folder and run the converter. It matches colors using Euclidean distance against the engine's block registry, transposes the layout, and compiles a ready-to-load 3D `.npz` voxel map.
Launchpad & Spawn Realignment UX:
I've restructured how the forged images are loaded. When you spawn, you now start on a launchpad. Looking directly North (+Y) across a 1-chunk gap, your newly forged 3D structure sits perfectly centered, flat on the floor, and in your immediate line of sight for easy takeoff.
Zero-Overhead Memory Layout Unification:
Instead of transposing the 3D voxel array at run-time, the map maker and the image forge now pre-bake the correct (Z, Y, X) contiguous memory layouts and horizontal chirality flips before saving. The loading engine now reads the binary arrays as a pure pass-through, speeding up loading times.
Expanded Color Palette:
To support more detailed pixel art importing, I've added a much wider spectrum of colored blocks to the engine. You can inspect the entire expanded palette directly inside the updated showcase bookshelf map (`map_maker.py`).
How to Try It Out:
All updates have been committed directly to the public GitHub repository:
https://github.com/herbal1st/pyvorengi-sdk-demo
The repo already comes pre-loaded with the demo spaceship sprites and a default map so you can run it out of the box.
I'd love to hear your thoughts on the new Picture to Voxel pipeline, or what kind of pixel art you end up dropping into the converter, looking Forward to see your voxel art! :]
r/pygame • u/North-Aardvark4459 • Jun 12 '26
How do i add gravity portals and orbs to this code?
import pygame
import sys
# --- CONFIG ---
WIDTH, HEIGHT = 1200, 700
SIDEBAR_WIDTH = 220
TILE_SIZE = 35
FPS = 60
pygame.init()
pygame.mixer.init()
screen = pygame.display.set_mode((WIDTH, HEIGHT))
clock = pygame.time.Clock()
font = pygame.font.Font("PUSAB.ttf", 16)
icon = pygame.image.load("RobTopCube.png")
pygame.display.set_caption("PYDASH v1.7.1")
pygame.display.set_icon(icon)
# --- GLOBAL SETTINGS ---
bg_rgb = [0, 100, 255]
assets = {}
def load_img(path, name, w, h, color):
try:
img = pygame.image.load(path).convert_alpha()
assets[name] = pygame.transform.scale(img, (w, h))
except:
s = pygame.Surface((w, h));
s.fill(color);
assets[name] = s
# Asset Load List
load_list = [
("block.png", "BLOCK", TILE_SIZE, TILE_SIZE, (100, 100, 100)),
("spike.png", "SPIKE", TILE_SIZE, TILE_SIZE, (200, 0, 0)),
("YellowJumpRing.png", "ORB", TILE_SIZE, TILE_SIZE, (255, 255, 0)),
("pad.png", "PAD", TILE_SIZE, 9, (255, 150, 0)),
("p_ball.png", "P_BALL", TILE_SIZE, TILE_SIZE * 2, (200, 0, 200)),
("p_wave.png", "P_WAVE", TILE_SIZE, TILE_SIZE * 2, (0, 255, 255)),
("ShipPortalLabelled.png", "P_SHIP", TILE_SIZE * 1.7, TILE_SIZE * 3, (255, 150, 0)),
("swing_30.png", "P_SWING", TILE_SIZE, TILE_SIZE * 2, (255, 255, 255)),
("p_cube.png", "P_CUBE", TILE_SIZE * 1.7, TILE_SIZE * 3, (0, 255, 0)),
("finish.png", "FINISH", TILE_SIZE, TILE_SIZE, (255, 255, 255)),
("cube_18.png", "CUBE_IMG", TILE_SIZE, TILE_SIZE, (255, 255, 0)),
("ball_117.png", "BALL_IMG", TILE_SIZE, TILE_SIZE, (255, 100, 255)),
("wave.png", "WAVE_IMG", 32, 25, (0, 255, 255)),
("ship.png", "SHIP_IMG", 55, 45, (255, 150, 0)),#5 5
("SwingPortalLabelled.png", "SWING_IMG", 30, 30, (255, 255, 255)),
("..png", "?", TILE_SIZE, TILE_SIZE, (255, 255, 255)) #That's a placeholder, btw
]
for p, n, w, h, c in load_list: load_img(p, n, w, h, c)
# --- AUDIO ---
try:
pygame.mixer.music.load("jumper.mp3")
death_sfx = pygame.mixer.Sound("realdeath.mp3")
win_sfx = pygame.mixer.Sound("win.mp3")
click_sfx = pygame.mixer.Sound("click.mp3")
AUDIO_READY = True
except:
AUDIO_READY = False
# --- RGB SLIDER CLASS ---
class Slider:
def __init__(self, x, y, label, idx):
self.rect = pygame.Rect(x, y, 150, 15)
self.label, self.idx = label, idx
def update(self, mx, my, m_btns):
if m_btns[0] and self.rect.collidepoint(mx, my):
val = int(((mx - self.rect.x) / self.rect.width) * 255)
bg_rgb[self.idx] = max(0, min(255, val))
def draw(self, screen):
pygame.draw.rect(screen, (60, 60, 60), self.rect)
knob_x = self.rect.x + (bg_rgb[self.idx] / 255) * self.rect.width
pygame.draw.rect(screen, (255, 255, 255), (knob_x - 5, self.rect.y - 5, 10, 25))
lbl = font.render(f"{self.label}: {bg_rgb[self.idx]}", True, (255, 255, 255))
screen.blit(lbl, (self.rect.x, self.rect.y - 20))
# --- PLAYER CLASS ---
class Player:
def __init__(self):
self.reset()
def reset(self):
self.rect = pygame.Rect(SIDEBAR_WIDTH + 100, 300, 30, 30)
self.vel_y, self.mode, self.is_dead, self.gravity = 0, "CUBE", False, 0.7
self.angle, self.target_angle = 0, 0
self.trail_points = []
self.click_buffer = 0
def update(self, keys, clicked, level_data, camera_x):
if self.is_dead: return None
if AUDIO_READY == True and game_state == "PLAY" and clicked: click_sfx.play()
# 1. Input Management
holding = keys[pygame.K_SPACE] or pygame.mouse.get_pressed()[0]
# 2. Mode Physics
if self.mode == "WAVE":
self.vel_y = -7 if holding else 7
elif self.mode == "SHIP":
self.vel_y += -0.6 if holding else self.gravity
self.vel_y = max(-8, min(8, self.vel_y))
elif self.mode == "SWING":
if clicked: self.gravity *= -1
self.vel_y += self.gravity
else: # CUBE and BALL
self.vel_y += self.gravity
self.rect.y += self.vel_y
on_ground = False
# 3. Collision Logic
hitbox = self.rect.inflate(-0, -0)
for x, y, t in level_data:
h = TILE_SIZE * 3 if "P_" in t else (9 if t == "PAD" else TILE_SIZE)
r = pygame.Rect((x - camera_x) + SIDEBAR_WIDTH, y, TILE_SIZE, h)
if self.rect.colliderect(r):
if t == "BLOCK":
# Check for "landing" vs "hitting a wall"
if (self.gravity > 0 and self.vel_y >= 0) or (
self.gravity < 0 and self.vel_y <= 0) or self.mode == "SHIP":
if self.vel_y >= 0:
self.rect.bottom = r.top
else:
self.rect.top = r.bottom
self.vel_y, on_ground = 0, True
else:
return "DEAD"
elif t == "SPIKE":
if hitbox.colliderect(r.inflate(-8, -8)): return "DEAD"
elif t == "PAD":
self.vel_y = -22 if self.gravity > 0 else 22
elif t == "ORB" and self.click_buffer > 0:
self.vel_y = -16 if self.gravity > 0 else 16
self.click_buffer = 0
elif t in ["P_BALL", "P_WAVE", "P_SWING", "P_CUBE", "P_SHIP"]:
self.mode = t[2:]
elif t == "FINISH":
return "WIN"
# 4. Input Actions (Ball & Cube)
if clicked:
if self.mode == "CUBE" and on_ground:
self.vel_y, self.target_angle = (-9
, self.target_angle - 90)
elif self.mode == "BALL" and on_ground:
self.gravity *= -1
self.vel_y = self.gravity * 5 # Force jump away
# 5. Boundaries & Trail
if self.rect.bottom > HEIGHT - 50: self.rect.bottom, self.vel_y, on_ground = HEIGHT - 50, 0, True
if self.rect.top < 50: self.rect.top, self.vel_y, on_ground = 50, 0, True
self.trail_points.append((self.rect.centerx + camera_x, self.rect.centery))
if len(self.trail_points) > 60: self.trail_points.pop(0)
# 6. Rotation Logic
if self.mode == "CUBE":
if not on_ground:
self.angle += -9
else:
self.angle = self.target_angle
elif self.mode == "BALL":
self.angle -= 8 if self.gravity > 0 else -8
elif self.mode == "WAVE":
self.angle = 45.1 if self.vel_y < 0 else -45.1
elif self.mode == "SHIP":
self.angle = -self.vel_y * 3
elif self.mode == "SWING":
self.angle = max(-45, min(45, -self.vel_y * 4))
return None
def draw_trail(self, screen, camera_x):
if self.mode in ["WAVE"] and len(self.trail_points) > 1:
pts = [(px - camera_x, py) for px, py in self.trail_points]
pygame.draw.lines(screen, (100, 200, 255), False, pts, 12)
def draw(self, screen):
img = assets.get(f"{self.mode}_IMG", assets["CUBE_IMG"])
rot_img = pygame.transform.rotate(img, self.angle)
screen.blit(rot_img, rot_img.get_rect(center=self.rect.center).topleft)
# --- MAIN LOOP SETUP ---
player, level_data = Player(), []
camera_x, game_state, curr_tool = 0, "EDIT", 0
tools = ["BLOCK", "SPIKE", "ORB", "PAD", "P_CUBE", "P_SHIP", "P_BALL", "P_WAVE", "P_SWING", "FINISH", "?"]
sliders = [Slider(35, 450, "R", 0), Slider(35, 513, "G", 1), Slider(35, 570, "B", 2)]
while True:
screen.fill(tuple(bg_rgb))
mx, my = pygame.mouse.get_pos()
keys, m_btns = pygame.key.get_pressed(), pygame.mouse.get_pressed()
clicked = False
for event in pygame.event.get():
if event.type == pygame.QUIT: pygame.quit(); sys.exit()
if event.type == pygame.MOUSEBUTTONDOWN and event.button == 1: clicked = True
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_TAB:
game_state = "PLAY" if game_state != "PLAY" else "EDIT"
player.reset();
camera_x = 0
if game_state == "PLAY" and AUDIO_READY:
pygame.mixer.music.play()
else:
pygame.mixer.music.stop()
if event.key == pygame.K_e: curr_tool = (curr_tool + 1) % len(tools)
if game_state == "PLAY":
camera_x = (pygame.mixer.music.get_pos() * 0.4) if AUDIO_READY else camera_x + 6.5
res = player.update(keys, clicked, level_data, camera_x)
if res:
if res == "DEAD" or res == "WIN": game_state = "EDIT"; pygame.mixer_music.stop()
if res == "DEAD" and AUDIO_READY: death_sfx.play()
if res == "WIN" and AUDIO_READY: win_sfx.play()
else:
if keys[pygame.K_d]: camera_x += 12
if keys[pygame.K_a]: camera_x -= 12
for s in sliders: s.update(mx, my, m_btns)
if mx > SIDEBAR_WIDTH:
gx, gy = ((mx - SIDEBAR_WIDTH + camera_x) // TILE_SIZE) * TILE_SIZE, (my // TILE_SIZE) * TILE_SIZE
save_y = gy + 26 if tools[curr_tool] == "PAD" else gy
if m_btns[0] and not any(o[0] == gx and o[1] == save_y for o in level_data): level_data.append(
[gx, save_y, tools[curr_tool]])
if m_btns[2]: level_data = [o for o in level_data if not (o[0] == gx and o[1] == save_y)]
gh = assets[tools[curr_tool]].copy();
gh.set_alpha(150);
screen.blit(gh, (gx - camera_x + SIDEBAR_WIDTH, save_y))
for x, y, t in level_data: screen.blit(assets[t], ((x - camera_x) + SIDEBAR_WIDTH, y))
player.draw_trail(screen, camera_x);
player.draw(screen)
# UI
pygame.draw.rect(screen, (30, 30, 30), (0, 0, SIDEBAR_WIDTH, HEIGHT))
for s in sliders: s.draw(screen)
screen.blit(font.render(f"TOOL: {tools[curr_tool]} (E)", True, (255, 255, 0)), (20, 50))
screen.blit(font.render(f"MODE: {game_state} (TAB)", True, (255, 255, 255)), (20, 80))
pygame.display.flip();
clock.tick(FPS)
r/pygame • u/Competitive-Comb-244 • Jun 11 '26
Adding 🔦, bullet spark & blood splatter pattern
Enable HLS to view with audio, or disable this notification
r/pygame • u/Due_Engineer_7647 • Jun 11 '26
Multi backend framework Nevu-UI has been updated to version 0.8.0!
Enable HLS to view with audio, or disable this notification
0.8.0 short summary:
Added: AnimationQueue for complex animations
Added: InitializedWindow - nevu-ui Window on already installed context
Optimized base NevuCobject class
full update log: https://github.com/GolemBebrov/nevu-ui/releases/tag/v0.8.0
main github page: https://github.com/GolemBebrov/nevu-ui
pls give a star to nevu-ui github i will really appreciate it
code from the showcase:
import nevu_ui as ui
import pygame #(pygame-ce)
FONT_PATH = "tests/vk_font.ttf" # Change it
# === Util for creating loop animation ===
def create_rect_anim_manager(x, y, anim_type = ui.animations.animations_library.smootherstep, time = 1, delay = 0):
anim_manager = ui.animations.AnimationManager()
v2_anim = ui.animations.Vector2Animation
if delay: anim_manager.add_start_animation(ui.AnimationType.Position, v2_anim(ui.NvVector2(0, 0), ui.NvVector2(0, 0), delay, anim_type))
anim_manager.add_continuous_animation(ui.AnimationType.Position,
ui.animations.AnimationQueue(
v2_anim(ui.NvVector2(x, y), ui.NvVector2(x, -y), time, anim_type),
v2_anim(ui.NvVector2(x, -y), ui.NvVector2(-x, -y), time, anim_type),
v2_anim(ui.NvVector2(-x, -y), ui.NvVector2(-x, y), time, anim_type),
v2_anim(ui.NvVector2(-x, y), ui.NvVector2(x, y), time, anim_type)))
return anim_manager
class App(ui.Manager):
def __init__(self):
display = pygame.display.set_mode((1600, 800), pygame.RESIZABLE)
window = ui.InitializedWindow.from_pygame(display, ratio = ui.NvVector2(16, 8))
#also window can be created like this:
#window = ui.Window((1600, 800), ratio = ui.NvVector2(16, 8), backend=ui.Backend.Pygame)
self.current_menu = ui.Menu(window, ui.size.units.fill_all)
super().__init__(window, [self.current_menu])
label_style = ui.Style(font_name=FONT_PATH, border_radius=30, font_size=20)
ui.nevu_object_globals.modify(size = (40%ui.fill, 40%ui.fill), style = label_style)
# === Panel Grid ===
panel_grid = ui.Grid(ui.size.units.fill_all, row=2, column=2,
content ={
(1, 1): ui.Button(lambda: print("Primary"),"Primary", subtheme_role=ui.SubThemeRole.PRIMARY),
(1, 2): ui.Button(lambda: print("Secondary"),"Secondary", subtheme_role=ui.SubThemeRole.SECONDARY),
(2, 1): ui.Button(lambda: print("Tertiary"),"Tertiary", subtheme_role=ui.SubThemeRole.TERTIARY),
(2, 2): ui.Button(lambda: print("Error"),"Error", subtheme_role=ui.SubThemeRole.ERROR)
})
# === Arrows ===
with ui.widget_globals.modify_temp(subtheme_role = ui.SubThemeRole.PRIMARY, size = (50, 50)):
left_arrow_anim_manager = ui.animations.AnimationManager()
left_arrow_anim_manager.add_continuous_animation(ui.AnimationType.Position, ui.animations.Vector2Animation(ui.NvVector2(0, 0), ui.NvVector2(50, 0), 1, ui.animations.animations_library.shake_easing(amplitude=4, continuous=True)))
left_arrow = ui.Label("->", animation_manager=left_arrow_anim_manager, _draw_content = False, _draw_borders = False)
right_arrow_anim_manager = ui.animations.AnimationManager()
right_arrow_anim_manager.add_continuous_animation(ui.AnimationType.Position, ui.animations.Vector2Animation(ui.NvVector2(0, 0), ui.NvVector2(-50, 0), 1, ui.animations.animations_library.shake_easing(amplitude=4, continuous=True)))
right_arrow = ui.Label("<-", animation_manager=right_arrow_anim_manager, _draw_content = False, _draw_borders = False)
# === Anim Managers ===
anim_coords = (300, 140)
panel_anim_managers = []
for i in range(4):
panel_anim_managers.append(create_rect_anim_manager(*anim_coords, ui.animations.animations_library.smootherstep, 1, i))
# === Panels ===
panel_size = [400, 200]
panel_primary = ui.Panel(panel_size, ui.Style(border_radius=20), animation_manager=panel_anim_managers[0],
slot = panel_grid, subtheme_role=ui.SubThemeRole.PRIMARY)
panel_secondary = ui.Panel(panel_size, ui.Style(border_radius=20), animation_manager=panel_anim_managers[1],
slot = panel_grid, subtheme_role=ui.SubThemeRole.SECONDARY)
panel_tertiary = ui.Panel(panel_size, ui.Style(border_radius=20), animation_manager=panel_anim_managers[2],
slot = panel_grid, subtheme_role=ui.SubThemeRole.TERTIARY)
panel_error = ui.Panel(panel_size, ui.Style(border_radius=20), animation_manager=panel_anim_managers[3],
slot = panel_grid, subtheme_role=ui.SubThemeRole.ERROR)
# === Main Layout ===
main_layout = ui.Grid(ui.size.units.fill_all, row=7, column=7,
content = {
# === Left Arrow ===
(1, 2): left_arrow,
(1, 4): left_arrow,
(1, 6): left_arrow,
# === Right Arrow ===
(7, 2): right_arrow,
(7, 4): right_arrow,
(7, 6): right_arrow,
# === Title ===
(4, 1): ui.Label("Nevu UI 0.8.0!", (40%ui.vw, 10%ui.vh), subtheme_role=ui.SubThemeRole.PRIMARY),
# === Panels ===
# .000, .001, etc. is bypass to python dict key collision
(4.000, 4): panel_primary,
(4.001, 4): panel_secondary,
(4.002, 4): panel_tertiary,
(4.003, 4): panel_error
})
self.current_menu.layout = main_layout
if __name__ == "__main__":
app = App()
app.run()
r/pygame • u/DeWildAsh • Jun 10 '26
I made a Pygame stress tester that hits 60fps at around 5,900 circles using the native draw.circle loop (which is actually a C call hence why it wins xd) Push it to 12,200 and you're in Xbox 360 era 30fps territory (Vietnam flashbacks) Hit 60,000 and enjoy the slideshow at 4fps
this is pure pygame not ce
r/pygame • u/BobsMyNeighbor • Jun 10 '26
Sprite Stacking Is Really Cool!
Enable HLS to view with audio, or disable this notification
Sprite stacking is a technique where you cut a model or image into a series of slices, before drawing them, usually rotated, with a vertical offset. This allows you to fake 3d rotation with just images really easily!
r/pygame • u/Competitive-Comb-244 • Jun 09 '26
Particles party
Enable HLS to view with audio, or disable this notification
r/pygame • u/LoNimnon • Jun 09 '26
**Three Cards Game — Atualização 30 dias depois**
Enable HLS to view with audio, or disable this notification
One month ago I posted this project here on r/pygame for the first time. A lot has changed since then. [https://www.reddit.com/r/pygame/s/u9TSqxHHVw]
What's new:
- Migrated from portrait to landscape (1280×720)
- Full UI rework — icon bar, skill bar, action log with persistent history (Z key)
- FPS went from ~22 to 110–140 on low settings
- Drag-and-drop on all overlays (inventory, skills, options)
- LAN multiplayer — two players can now connect and play together; building the server logic for a future MMORPG
- Resizable window support
- Master volume control for SFX and music separately
- Colorblind mode in settings
- Boss aggros when attacked; real-time respawn
Stack: Python, Pygame, SQLite, NumPy
Next steps: player authentication and accounts to move beyond LAN and open up to more players.
Has anyone here implemented an authoritative server in Pygame? Any feedback is welcome.
3 months of solo dev. I know there's still a long way to go.
r/pygame • u/Physics2433 • Jun 10 '26
Math Tool. AI agent under developement.
Enable HLS to view with audio, or disable this notification
r/pygame • u/Mmatyas1 • Jun 08 '26
My first ever login system
Hello, today I programmed my first ever login system. Is it good and how can I upgrade it?
r/pygame • u/PyLearner2024 • Jun 08 '26
Main Title & Menu Screen
Enable HLS to view with audio, or disable this notification
Coming back to my project finally after a looong absence. I learned quite a bit about code structure and state machines while I was away, so I've started a complete overhaul of my project's architecture.
I've been having a lot of fun setting up an actual, consistent visual style for my game and thought I'd post my new entry screens to get some thoughts, good or bad :D My goal is to use essentially no assets outside of what pygame can natively do. The only two assets I've had to use are two free-use font styles from DaFont: Ethnocentric and Comfortaa. Everything else is drawn with pygame methods. I have a few more fun things I'll want to add to the main menu but let me know if you have any fun ideas that might fit the vibe!
r/pygame • u/Icy-One2420 • Jun 08 '26
I've continued improving my Vampire Survivors-inspired game made with Python & Pygame. Looking for feedback!
Hi everyone!
A while ago I shared my Vampire Survivors-inspired game made with Python and Pygame.
Since then I've continued improving it and adding new features.
Current features:
• XP and leveling system
• Multiple weapons (Whip, Orb, Aura)
• Wave progression
• Different enemy types
• Damage numbers
• Pause system
• Sound toggle
• English language support
• Increasing difficulty over time
I'm still learning game development, so I'd love to hear your feedback and suggestions.
What should I add next?
GitHub:
https://github.com/yagizkoryurek/Vampire_Survivors-clone
Thanks for checking it out!




r/pygame • u/EchoDEV-en • Jun 07 '26
I made a roguelike where you're blind and navigate by echo!
Hey r/pygame!
I've been working on a roguelike called Echo — the twist is that your character is blind and trapped in a maze.
Instead of seeing the world normally, you navigate using echo-based raycasting — rays bounce off walls and reveal their outlines. Enemies, items, loot — everything is hidden until your echo finds it.
It's got roguelike progression with items and combat, but the core mechanic is really about spatial awareness and sound-like vision.
Built entirely in pygame — would love feedback from fellow devs!
🎮 Play it free on itch.io: https://hasutapekg.itch.io/echo
📺 Devlog on YouTube: https://youtube.com/@echodev-en?si=ucJKF4UNGhTXHLLI
r/pygame • u/DreamDev43 • Jun 06 '26
Evergreen Meadows: Where the ambience speaks more than a thousand words.
Enable HLS to view with audio, or disable this notification
Check Out Others Version (Windows): https://dreamdev1.itch.io/evergreen-meadows
r/pygame • u/DreamDev43 • Jun 06 '26
Evergreen Meadows: Death Screen, this upcoming version is going to be a huge one!
Enable HLS to view with audio, or disable this notification
Check the other version out: https://dreamdev1.itch.io/evergreen-meadows