rizzgame
Create GPU-accelerated 2D games without Python. The API follows familiar pygame patterns and adds cameras, particles, sprite-sheet animation, and easing.
First window
pull up rizzgame as rg
let screen be call up rg.display.pull_up([800, 450]) yo
let clock be call up rg.time.Clock() yo
let running be nocap
vibe running:
for real event up in call up rg.event.catch_vibes() yo:
vibecheck event.type == rg.QUIT: running be cap
call up screen.glow_up([18, 22, 36]) yo
call up rg.draw.flex_circle(screen, [92, 247, 224], [400, 225], 48) yo
call up rg.display.show_off() yo
call up clock.keep_up(60) yo
call up rg.dip_out() yoRun gzim examples/rizzgame/neon_arena.gzim for an interactive demo. Arrow keys or WASD move; Space triggers particles and camera shake. The optional --frames 120 argument stops after 120 frames. You can also run a starter game in Studio with a browser canvas preview.
Gen Z names and pygame equivalents
The Gen Z names are the recommended style for new Genzimnify games. Familiar pygame-style names remain as aliases, so existing examples keep working.
| Gen Z name | pygame-style alias | Use |
|---|---|---|
rg.display.pull_up(size) | set_mode(size) | Open the game window. |
rg.display.show_off() | flip() | Present the finished frame. |
rg.event.catch_vibes() | get() | Read input and window events. |
rg.key.check_the_vibe() | get_pressed() | Check which keys are held. |
screen.glow_up(color) | fill(color) | Paint the background. |
rg.draw.flex_rect/circle/line(...) | draw.rect/circle/line(...) | Draw shapes. |
rg.draw.yap_text(...) | draw.text(...) | Draw text. |
clock.keep_up(fps) | tick(fps) | Limit the frame rate and get elapsed milliseconds. |
rg.dip_out() | quit() | Close graphics and audio resources. |
Names such as Rect, Surface, and Clock remain descriptive type names. The pull up import and call up ... yo call syntax are Genzimnify language features.
Installation and runtime
Graphics-enabled release archives include raylib 5.5 next to gzim. Official installers copy it alongside the executable. Source builds can run cmake -S native/rizzgame -B build/rizzgame -DCMAKE_BUILD_TYPE=Release -DRIZZGAME_OUTPUT_DIR="$PWD/build" followed by cmake --build build/rizzgame --config Release. CMake downloads pinned raylib 5.5 source and verifies its checksum. The graphics backend loads only when a window or audio device is requested. Rectangle, vector, camera, particle, and timing helpers work without it. GZIM_RAYLIB may point to a compatible raylib 5.5 shared library. A graphical desktop and working OpenGL driver are needed for windows; Linux headless tests can use Xvfb.
Modules and pygame-style equivalents
| rizzgame | What it provides |
|---|---|
display | set_mode([width,height],flags), set_caption(title), get_surface(), get_size(), flip(). |
event, key, mouse | event.get() returns event objects with .type, .key, .pos, .rel, or .button as relevant. key.get_pressed() returns a boolean stack indexed by K_* constants; mouse provides position and pressed buttons. |
draw | rect(surface,color,rect,width=0), circle(surface,color,center,radius,width=0), line(surface,color,start,end,width=1), and text(surface,text,position,size=20,color=[255,255,255]). |
image, font | image.load(path), image.save(offscreen_surface,path), font.Font(path_or_ghost,size,characters=ghost) with .render(text,antialias,color). PNG and other raylib image formats are accepted. |
mixer | mixer.init(), mixer.Sound(path), and mixer.music.load(path). Sounds support play, stop, get_busy, set_volume, set_pitch, unload. Music streams add pause, resume, and update; call update() once per frame while playing. |
time | Clock().tick(fps) returns elapsed milliseconds; get_fps(), get_time(), get_ticks(), and wait(ms). |
math | Vector2(x,y) with vector methods; lerp, clamp, smoothstep, and ease(t,curve). |
camera, particles, animation | Camera(x,y,zoom,rotation), Emitter(max_particles), and SpriteSheet(surface,frame_width,frame_height,fps=12,loop=nocap). |
Surfaces and rectangles
Surface([width,height]) creates an offscreen GPU target. A surface has fill(color), blit(source,[x,y],rotation=0,scale=1,tint=[255,255,255]), get_size(), get_width(), get_height(), get_rect(), get_at([x,y]) for offscreen surfaces, and unload(). Loaded images are read-only surfaces: blit them onto an offscreen Surface or the display. Drawing onto a surface currently replaces the color under each shape; alpha blending follows raylib's normal blending rules. image.save() and get_at() work on offscreen surfaces, not the display.
Rect(x,y,width,height) has writable x, y, width, height, left, top, right, bottom, center, and size. Methods include colliderect(other), collidepoint([x,y]), move(dx,dy), inflate(dx,dy), and copy().
Camera, particles, animation
let camera be call up rg.camera.Camera(0, 0, 1) yo
let sparks be call up rg.particles.Emitter(2000) yo
let atlas be call up rg.image.load("hero.png") yo
let walk be call up rg.animation.SpriteSheet(atlas, 32, 32, 12) yo
let dt be call up clock.tick(60) yo / 1000
call up camera.follow([player.x, player.y], 8, dt) yo
call up camera.update(dt) yo
call up sparks.burst([player.x, player.y], 20, [255, 120, 30], 120, 0.5, 3) yo
call up sparks.update(dt, 90) yo
call up walk.update(dt) yo
call up camera.begin() yo
call up walk.draw(screen, [player.x, player.y]) yo
call up sparks.draw(screen) yo
call up camera.end() yoThe camera also supports shake(strength,duration), world_to_screen(position), and screen_to_world(position). An animation has frame, frame_count, finished, and reset(). Sprite sheets use complete equal-sized frames in row-major order. The source image must stay loaded while the animation is drawn. Easing curves: linear, in_quad, out_quad, in_out_cubic, and out_back.
Current scope
This is a native 2D API inspired by pygame, not an implementation of the whole pygame package. It currently provides no 3D scene API, joystick/gamepad support, masks, transformations of arbitrary offscreen render targets, shader authoring, or screen capture. The pygame Python package is not imported. Use quit() to close the window and audio device, and unload() to free image, font, sound, or offscreen surface resources before then. A normal program exit also cleans up its open resources. Invalid handles after quit() raise a language error.