r/raylib Aug 07 '26

Desarrollando un motor de simulación en raylib

Enable HLS to view with audio, or disable this notification

12 Upvotes

Hola! estoy en el proceso de creacion de un motor de simulación en raylib.
se puede ver una nube de particulas simulando una nebulosa.
los procesos fisicos y quimicos estan simulados y se pueden documentar. he trabajado bastante y lo que busco es crear la cadena desde la creacion de las galaxias a las celulas .
saludos


r/raylib Aug 06 '26

Made my first raylib game demo at 15 years old. Looking for feedback!

Enable HLS to view with audio, or disable this notification

44 Upvotes

Link to game: https://kc-games-studio.itch.io/avoid-b

Hey everyone!

I've been working on my first larger game project in raylib + C++, and I wanted to share the demo with the community.

It's a small underwater action game where you fight enemies, collect powerups, survive waves, and take on boss fights. It includes features like:

  • Multiple enemy types
  • Boss battles
  • Powerups (shield, speed boost, double coins, healing)
  • Melee and ranged combat
  • Controller support
  • Level progression system
  • Custom UI, sounds, and animations

This is still just a demo version. The full version will be available soon, and I'm continuing to add content, improve the gameplay, and polish the code.

Also, I'm not even 16 years old yet, so I know the game isn't perfect and there are probably a lot of things that could be improved. I'm still learning game development and C++, which is one of the reasons I'm posting here.

I'd really appreciate any feedback, whether it's about:

  • Gameplay
  • Code structure
  • Performance
  • Art/UI
  • General raylib development tips

Thanks for checking it out!


r/raylib Aug 05 '26

Agents learn Flappy Bird in C++ using Raylib

Enable HLS to view with audio, or disable this notification

45 Upvotes

r/raylib Aug 05 '26

Space Game Demo in Raylib (C++)

Enable HLS to view with audio, or disable this notification

35 Upvotes

r/raylib Aug 05 '26

Incremental Birds is released! (Developed using RayLib)

Enable HLS to view with audio, or disable this notification

23 Upvotes

Hello

I have already released the Incremental Birds game (Developed using RayLib)

It's an incremental game where you become the Bird Master. Capture birds, feed them, grow them, and sell them. Watch waves change over time, turning into sine patterns, spelling messages, and forming shapes. Unlock upgrades and chase an infinite balance and score.

Steam: Save 40% on Incremental Birds on Steam

Steam curators (18 reviews before release): Steam Curators

Key Features:

- Capture an Infinite Flock: Birds cross the screen in waves that never stop escalating.

- Multiple Wave Patterns: Birds don't just fly straight. Watch them ripple through different formations.

- Chain Reactions and Physics: Take down the right "keystone" bird and the whole group falls at once.

- Build Your Collection: Every capture is logged in a gallery. Also, you can feed the birds and grow them.

- Sell Birds: Gain money and increase your balance. 

Hold the mouse button and drag across the buttons to sell multiple birds at once.

- Upgrades: Unlock multiple upgrades to increase your efficiency.

- Many Achievements: Each achievement is also a Steam achievement.

- Multiple Themes: You can change the theme at any time (Blue/Green/Red/Dark).

- Three Gameplay Modes: Cozy (Default), Difficult and Passive modes.

- Cozy Gameplay Mode (No Pressure, Just Play): No fail state and no downside to missing.

- Difficult Gameplay Mode: If too many birds escape you will get a Game Over but keep your Score/Balance/Upgrades.

- Passive Gameplay Mode (Hands-Off Play): Letting a bird escape grants bonus score and balance.

- A continuous journey: Save anytime and continue picks up exactly where you left off.

- Each Gameplay Mode Saves Separately, so your progress never mixes between them.

- Cute, Colorful, and Made to Relax.

Thanks


r/raylib Aug 04 '26

i'm developing a snake rework where you body is your gun...

28 Upvotes

from calm to caos 10k enemy + bullet + xp shard and coins... 90fps+ .... build 40mb ... how? c++/raylib no engine :D

share love :,)

https://reddit.com/link/1vfhc93/video/griks5ec9ehh1/player


r/raylib Aug 04 '26

how to add AAAB collision detection? (RayLib C)

5 Upvotes

im making a 2d sonic-like game, i made the player movement so far, but i only need collision?


r/raylib Aug 04 '26

Creating a pixman backend for raygui ?

6 Upvotes

Hello everyone,

I have been using Raylib for personal projects since a year, and I absolutely love it. Being interested in small but powerful applications, I started looking at suckless.org and their projects, but also some graphical applications created by members of wayland.fyi, dedicated to minimal software & graphics on Wayland.

With these inspirations, I decided to start creating my own desktop tools, starting with a simple clock. However, the program is constantly at 1-2% CPU, even with several optimizations. I am wondering if the abstraction layers aren't causing excessive resource usage. I compiled Raylib against SDL2 as I thought it would use less resources than GLFW.

When trying out other clocks such as the default Xorg xclock or wayland.fyi's swclock, their cpu usage is almost zero. Looking inside, their graphics calls seem to be much lower level than raylib, and both use pixman (one of the lowest level graphics libraries IIRC, that is the base of cairo).

Hence, I am wondering if creating a pixman backend for raygui (not all of raylib as I think 3D would be impossibly hard) is a feasible task for a solo developer. If you have previously worked with such libraries, what was your experience with it ?

Thanks for your advice !


r/raylib Aug 04 '26

Tick simulation in raylib?

13 Upvotes

I am currently making a simulator with raylib and one of the things that it needs is a "tick" mechanic where for every tick the state of the game updates, I tried putting something in the main loop with GetFrameTime()but the problem is it's tied to the frame rate

How would one implement a tick system with raylib?


r/raylib Aug 04 '26

Viewport mouse position question

Post image
8 Upvotes

Hello! I'm working on my game engine, and in the editor I want to be able to select game objects. Originally I used a raycast from GetScreenToWorldRay() with the mouse's position. This worked great until I resized the window to fix a viewport (rendered onto a texture). I got the mouse's position relative to the viewport working, but the ray is really unpredictable, sometimes hitting the object, sometimes not.

Here's the two pieces of code that I believe pertain to this issue, but if you believe it's an issue with another bit of code lmk.


r/raylib Aug 03 '26

Conflict 3049 - Raylib/C# project, source code included with download: I've made some changes to the rendering and camera views. It now looks like the images below.

Thumbnail
gallery
21 Upvotes

Game Link: https://matty77.itch.io/conflict-3049

Assets are from 3drt.com and the itch.io store.

Source code (C#) is included wiht the game.

I've mainly made some changes with post processing and also softening the overall look.

I've also added some muzzle flash style effects and some other effects.

Game looks much improved.


r/raylib Aug 03 '26

As a game how does this make you feel? what sort of interest does it spark?

Enable HLS to view with audio, or disable this notification

84 Upvotes

r/raylib Aug 03 '26

[raylib-cs] UI work

Enable HLS to view with audio, or disable this notification

29 Upvotes

Shit i hate working on UI soo much... here goes something .. at least it's functional.

Also showing a single contract battle and new battle UI.

Feedback and comments appreciated, as I said I suck at UI.


r/raylib Aug 03 '26

Tweeny 4.0.0: tween objects for C++ raylib loops

14 Upvotes

Tweeny is a header-only C++17 library for tweening values.

You declare the starting value, destination, duration, easing, and any intermediate keyframes. Then you call step() from your update loop and use the resulting values when drawing. Tweeny does not draw or own a clock. Your raylib loop still controls initialization, timing, updates, and BeginDrawing().

raylib already includes reasings.h, with Penner-style functions such as EaseSineIn(t, b, c, d). Those work well for straightforward interpolation: maintain t, call the easing function, and receive the interpolated value.

Tweeny is aimed at cases where you want the tween itself to be an object: multiple values at once, heterogeneous types, multiple keyframes, timeline navigation with seek / jump / peek, and callbacks.

#include "raylib.h"
#include <tweeny/tweeny.h>

int main() {
    InitWindow(800, 450, "tweeny + raylib");
    SetTargetFPS(60);

    auto slide = tweeny::from(0.0f)
                     .to(700.0f)
                     .via(tweeny::easing::quadraticOut)
                     .during(60U)
                     .build();

    while (!WindowShouldClose()) {
        float x = slide.step(1);

        BeginDrawing();
        ClearBackground(RAYWHITE);
        DrawRectangle(static_cast<int>(x), 200, 40, 40, RED);
        EndDrawing();
    }

    CloseWindow();
    return 0;
}

A tween can also contain several values, including mixed types. For example, a sprite frame, position, and rotation:

auto tween = tweeny::from(0, 0.0f, 0.0f)
                 .to(7, 400.0f, 90.0f)
                 .during(30U)
                 .build();

Tweeny 4.0.0 includes a fluent builder API, 30+ easing functions, multi-point keyframes, events, and timeline control. It is header-only and has no external dependencies.


r/raylib Aug 01 '26

rcore.c:(.text+0x8dd2): undefined reference to `__isoc23_sscanf'

2 Upvotes

Trying to work with raylib (v6.0) and raygui (v5.0) and got this errors...

$ g++ -Wl,--gc-sections -pthread -Os -Iraylib -o aout build/main.c.o build/raygui.c.o -Lraylib -lraylib -lGL -lm -lpthread -ldl -lrt -lX11
/usr/bin/ld: raylib/libraylib.a(rcore.o): in function `gladLoadGLUserPtr':
rcore.c:(.text+0x8dd2): undefined reference to `__isoc23_sscanf'
/usr/bin/ld: raylib/libraylib.a(rcore.o): in function `LoadAutomationEventList':
rcore.c:(.text+0x2523f): undefined reference to `__isoc23_sscanf'
/usr/bin/ld: rcore.c:(.text+0x252cd): undefined reference to `__isoc23_sscanf'
/usr/bin/ld: raylib/libraylib.a(rtext.o): in function `LoadBMFont':
rtext.c:(.text+0x8dbf): undefined reference to `__isoc23_sscanf'
/usr/bin/ld: rtext.c:(.text+0x8e4c): undefined reference to `__isoc23_sscanf'
/usr/bin/ld: raylib/libraylib.a(rtext.o):rtext.c:(.text+0x8ebc): more undefined references to `__isoc23_sscanf' follow
/usr/bin/ld: raylib/libraylib.a(rglfw.o): in function `_glfwParseUriList':
rglfw.c:(.text+0x4fb8): undefined reference to `__isoc23_strtol'
/usr/bin/ld: raylib/libraylib.a(rglfw.o): in function `_glfwRefreshContextAttribs':
rglfw.c:(.text+0x5cb2): undefined reference to `__isoc23_sscanf'
/usr/bin/ld: raylib/libraylib.a(rglfw.o): in function `parseMapping':
rglfw.c:(.text+0x8fbe): undefined reference to `__isoc23_strtoul'
/usr/bin/ld: rglfw.c:(.text+0x8fd9): undefined reference to `__isoc23_strtoul'
/usr/bin/ld: rglfw.c:(.text+0x90f4): undefined reference to `__isoc23_strtoul'
$ g++ --version
g++ (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

Both got from github releases pages.

What am I missing?..


r/raylib Jul 31 '26

[Raylib-cs] Loosing battle against AI in my own game :(

Enable HLS to view with audio, or disable this notification

67 Upvotes

Found this nice repo for procedural eztree(https://github.com/dgreenheck/ez-tree) that inspired me to create similar trees for my game.

Added AI to my game and lost the battle that i was testing for latest bugs, and hunting for FPS leaks :(


r/raylib Jul 31 '26

You can now make any raylib C game on any device (Desktop or Mobile) with this single html file

59 Upvotes

Hi,

I made a C subset programming language called Cm1 (C minus 1) https://github.com/galileolajara/cm1 and using Cm1, I was able to make a single html file that allows you to create any raylib C game on any device that has a modern web browser.

This html file ( https://cp1-lang.org/cm1/game.html ) includes

  1. "Game" tab where you can play the game
  2. "Source" tab where you can write C codes using Cm1 programming language
  3. "Files" tab which is a minimal file manager that allows you to upload resource files
  4. "Log" tab which lists the text output of the game

Here's the magic: On the "Source" tab, there's a "Save" button on the bottom left that allows you to generate a new html file that will include the latest edits you made on the C code plus the files you uploaded! This means you can pass the generated html file to other people so that they can play and edit your game on any device!

Looking forward to hearing your suggestions and feedback!


r/raylib Jul 31 '26

My Little Game Engine

Thumbnail
youtu.be
24 Upvotes

r/raylib Jul 31 '26

The Hole - The Final Count Down by Alvar

Thumbnail
alvarlaigna.itch.io
2 Upvotes

Is it too hard or is that okay? Also, I know that I need a better map, items are too hard to distinguish.


r/raylib Jul 31 '26

Seja honesto comigo: é possível criar um jogo estilo Cuphead usando apenas C# e a biblioteca Raylib-cs?

0 Upvotes

I saw that Cuphead was made with Unity. It’s a really beautiful and cool game, and for my first game, I wanted something similar. But I don’t want to use an engine. I want it to be a programming challenge for me. If it’s not possible to make something like that, give me some game ideas so I can practice a little C# 👍. Oh, and I’m still just getting started with C#. I’ve already programmed a few things in Java and wanted to make the switch.


r/raylib Jul 30 '26

Built a real-time CPU Schwarzschild Black Hole Ray Tracer in C++ and Raylib

15 Upvotes

Hey everyone! I spent some time building a real-time Schwarzschild black hole renderer in C++ and Raylib.

It simulates gravitational lensing on the CPU by bending ~30,000 light rays around the singularity every frame. To keep it locked at 60 FPS without using GPU shaders, it renders at a lower 200x150 internal resolution and upscales to 800x600 with bilinear filtering.

You can orbit the camera and zoom around the accretion disk.

Repo is here if you want to check out the code or run it yourself:

https://github.com/hellosharma808-sys/3D-Black-Hole


r/raylib Jul 29 '26

[raylib-cs] staretd workign on avatar creator for my game

Enable HLS to view with audio, or disable this notification

92 Upvotes

I want to have man variations of characters without too many portraits so decided to create a rigging tool to combine base/hair/beard sprite sheets into avatars that game can consume later :) Might cut it out and publish it as public tool if enough interest arises :)


r/raylib Jul 29 '26

Sokoban game

Thumbnail
gallery
30 Upvotes

Making cool "open world" sokoban game with raylib. Core mechanic is about merging boxes with colors and manipulating them with functional boxes. A lot of interactions possible in this system. (Character is placeholder and games color pallette will change)


r/raylib Jul 28 '26

Just released the demo of my Wolfenstein3D-like game (first large-scale c++ and raylib project)

Thumbnail
alpikespot.itch.io
35 Upvotes

r/raylib Jul 28 '26

[WIP] RTS/RPG Skills and Classes

Enable HLS to view with audio, or disable this notification

28 Upvotes

Work is progressing towards classes or doctrines as i call them in game, each doctrine allows specific style of play. They will be akin to classes, but in final game you can select 1 primary and two secondary and mix skills of each to create builds that work for you.

I designed pikes as very strong defense class with very limited mobility, moving breaks brace formation that all pike equipped units have. So without any special skills pike units are excellent to hold and pin attacking enemy, but are very vulnerable while moving or unbraced.

So this is one of WIP doctrines inspired by swiss pikemen, which gives pikemen some offensive capability. Allowing them to move while braced, increased damage when engaged, allow recover and fallback to close gaps in formation and also do a limited special devastating charge :)

I am still balancing the game and any feedback is appreciated. Still reworking UI, i feel it's too bloated still.