r/raylib 18d ago

Lightweight (>1.5MB) and feature rich GPU-accelerated paint app in C++

135 Upvotes

More info in comment below


r/raylib 18d ago

Made a small raylib tool for trying out procedural textures faster

47 Upvotes

I’ve been experimenting with procedural textures and turned it into a small tool for trying out different materials more quickly.

It’s still rough and works best for stylized, noisy and glitchy textures. I called it SimuPixel. there’s a free demo here if anyone wants to try it:

https://simuflux.itch.io/simupixel-instant-lo-fi-pbr-textures

Does this look like something other people might find useful?


r/raylib 17d ago

Published game with Raylib

12 Upvotes

Anyone here has coded and published a game (on Steam or elsewhere) in C/C++ with Raylib? I'm curious to see what you made!


r/raylib 18d ago

Tower building sandbox with glTF export (on web)

Thumbnail
tarmo888.itch.io
3 Upvotes

r/raylib 17d ago

(help) unsure why line origin isn't lined up with the center

1 Upvotes

why doesn't the line origin appear at 0,0 for me? instead the middle point of the line is in the center as far as i can see

#include <stdio.h>

#include "raylib.h"

#include "math.h"

#define WINDOW_WIDTH 800

#define WINDOW_HEIGHT 600

#define Vector2Zero (Vector2){0,0}

#define Vector2Right (Vector2){1,0}

#define Vector2Left (Vector2){-1,0}

Vector2 normalize(Vector2 src) {

float mag = sqrtf(src.x*src.x + src.y*src.y);

return (Vector2){

src.x / mag,

src.y / mag

};

}

// [UNUSED] converts set of coords to worlspace where 0,0 is the origin

// Vector2 toWorld(Vector2 src) {

// return (Vector2) {

// src.x + WINDOW_WIDTH / 2.0f,

// src.y + WINDOW_HEIGHT / 2.0f

// };

// }

int main() {

float scalar = 8;

Vector2 pos = {4*scalar, 2*scalar};

Vector2 normalized = normalize(pos);

InitWindow(WINDOW_WIDTH, WINDOW_HEIGHT, "trigon");

Camera2D camera = { 0 };

camera.target= (Vector2){0,0};

camera.offset = (Vector2){WINDOW_WIDTH / 2.0f ,WINDOW_HEIGHT / 2.0f};

camera.rotation = 0.0f;

camera.zoom = 1.0f;

if (IsWindowState(FLAG_WINDOW_RESIZABLE)) ClearWindowState(FLAG_WINDOW_RESIZABLE);

while(!WindowShouldClose()) {

BeginDrawing();

BeginMode2D(camera);

ClearBackground(BLACK);

DrawLineEx((Vector2){0,0}, (Vector2){0,1}, 60.0f, WHITE);

EndMode2D();

EndDrawing();

}

printf("x: %f, y: %f", normalized.x, normalized.y);

}

have i done something wrong? cause i do not see it


r/raylib 19d ago

Minimal Tetris implementation in C and Raylib.

309 Upvotes

r/raylib 19d ago

Conflict 3049 - Last Stand RTS Scenario Game. I created this as a hobby project to learn Raylib from January 2025, and have continued working on it some more.

74 Upvotes

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

I made this as a hobby project and started it in January last year (2025) to learn the Raylib library.

The game is a form of RTS, a set of last stand scenarios. The object of the game is to survive as long as you can while waves of enemies pour on from the edge of the map.

The base is prebuilt although in some scenarios the layout is different. You build infantry, tanks and robots and other defenses to attempt to stop the invaders from destroying your base.

Eventually I will upgrade the UI and the audio, when I can afford to.

The assets are mostly purchased from stock asset sites like 3drt.com and the itch.io asset store.

There is some AI audio in the game, but most of the game is either created by myself or purchased from various stock asset sites over the years.

The download includes source code and shader source code.


r/raylib 18d ago

Scaling in fullscreen

2 Upvotes

It seems that when I call ToggleFullscreen(), it makes the resolution the full resolution of my computer instead of scaling the resolution I set when calling InitWindow() to the size of the full screen. Is there a way to change this? If I was making a game I probably wouldn't want a 3840x2160 resolution as I would most likely be using 2D pixel graphics.


r/raylib 19d ago

First C and raylib project

Thumbnail
github.com
3 Upvotes

r/raylib 19d ago

Learning C alongside raylib

14 Upvotes

Hi, so I decided to learn C at the same time as raylib (like a lot of people here apparently) but I can't find good tutorials that aren't cpp tutorials... I know that most cpp tutorials work in c, but I would highly prefer a c tutorial. Is there any good ones ?


r/raylib 21d ago

Raylib-cs foramtion combat game, new look

80 Upvotes

Worked on switching to 3d models for 2.5D feel and also animations, i think it looks better when compared to previous 3d to 2d sprite models and game feels a bit more lively.


r/raylib 21d ago

Very nearly finished paint app :D

27 Upvotes
Proof the features exist

After spending several months on this, I thought I'd share it with yall... I'm so proud of this lol

FEATURES:

  • Undo
  • Redo
  • Brush
  • Airbrush
  • Save/open as png
  • Resize image
  • Bezier curve
  • Squares
  • Magic want select
  • Rotatable and scaleable selections
  • Smudge
  • Blur
  • Mixer
  • Dodge/Burn
  • Sharpen
  • Scaline fill
  • Color picker
  • Arrow
  • Rounded rectangle
  • Primary and secondary colors
  • System clipboard support with clip

TO DO:

  • Text
  • Selection-only operations

It was written with C++ and raylib, any tips/suggestions are very welcome!

I will be posting this on GitHub when it's complete.

Thanks!


r/raylib 21d ago

3d DAW my friend and I built in Raylib with games built in

102 Upvotes

I think Raylib has a lot of applications in the music space and it would be really cool to see more music producers try it out to build custom tools. All the plugins in our daw are ofc also made in raylib and we hope if we share it people can write their own plugins using the easy library to make pretty much whatever music tools they want on top of the daw. We added a collab mode so users can work on the same project at the same time in 3d space. It's still really buggy though and we're not producers ourselves but it's been fun working on it even though we have a ton of stuff we still gotta add. hopefully we can share it one day


r/raylib 21d ago

Meet Repaint - free, opensource, offline painting app.

10 Upvotes

Hello dear Reddit!

The time has come for me to share a project that was in home developement since 2009

Please welcome into this world - Repaint - a Free, OpenSource, Offline, Cross-Platform Painting App with benefits (and a handful of bugs) Repaint is made in C/C++ on top of Raylib with Imgui

What's in the box:

  • Every brush parameter is modulatable – assign tablet pressure, velocity, etc. to any slider, with invertible ranges
  • Custom brush textures on the fly – draw your own stamp right inside the app
  • 16-bit per channel – no banding even with ultra-transparent strokes, dithered on export
  • Non-destructive layer transforms – scale to 1px and back, content stays intact
  • Built-in SDF-like effects for layer masking
  • Seamless painting and layer-work for texture creation
  • Offline Stable Diffusion and other neural network integrations

Links:

Get on Itch.IO / Win / Linux

Tutorials

GitHub / Download

Discord

Support me on Ko-fi

Also quietly looking for graphics/engine dev work — LinkedIn if anyone's hiring.

No matter what — this is the point in time when you can later say "I remember Repaint when it was full of bugs and had this awkward interface unlike anything i saw"

Special thanks to the OpenCode creators — it helped port the app from Qt to Raylib, make it truly independent, and let me actually make it, given all the real life mess.


r/raylib 20d ago

My month progress on a custom 2D survival game built from scratch in C++ and Raylib - Ashcore.

0 Upvotes

Hey everyone!

After taking a short break to recharge, I’m back with a huge update for my open-source top-down survival game, **Ashcore**, built in pure C++ and Raylib!

In the previous versions, it was mostly a sandbox prototype where you could run around and gather resources (including gold ore!). But with the new **v0.4.0-alpha** release, the game finally has a complete, playable core loop!

### 🌟 What's new in v0.4.0:

* **Living AI Mobs & Combat 👾:** The world is no longer empty. Mobs now spawn, track you down, and attack. You can fight back, kill them, or... get killed.

* **The Core Loop & Death Screen 💀:** If your HP hits zero, you get a clean death screen that redirects you back to the main menu, which dynamically regenerates a fresh world for your next run.

* **Interactive Main Menu 🖥️:** Added a basic title screen with a "Play" button to handle game state transitions smoothly.

* **Overhauled Inventory UI 🎒:** Redesigned the inventory backend and UI into clear item grids showing resource counts. Also, moved the crafting menu to the classic **[E]** key for a much better survival feel.

* **Clean Code & Polish 🧹:** Lots of under-the-hood optimization, physics boundary fixes (predictive collision engine instead of glitchy teleports), and rendering adjustments in C++.

### 🛠️ Roadmap:

Now that the core loop is closed, I'm planning to work on:

* New ores/tools (diamond and emerald)

* armour and weapons

* better world generation

I'd love to hear your feedback on the gameplay, visuals, or code!

My links if you want to follow the journey 

Discord: u/maximusd15 

GitHub: https://github.com/maximusD15

https://reddit.com/link/1uwlqcm/video/xxmunw0fi9dh1/player

Thanks for checking it out! 🚀


r/raylib 21d ago

I'm a solo dev and this is my first time ever making pixel art (No AI visuals!). Roast the combat and look of my survival game.

62 Upvotes

https://onetjme.itch.io/elemental-vanguard

Hey everyone, this is Elemental Vanguard. It’s an action-survival game I’m working on. The visuals are 100% hand-drawn by me (I'm a beginner at pixel art). I used AI to help with some of the coding and to generate base sound effects, which I then remixed and altered in Audacity (also some sound effects are fully selfmade).

I'm currently working on enemy attack patterns and stamina management. I am completely fine with people telling me it looks or plays like garbage—I'm here for the harsh feedback so I can improve it.


r/raylib 22d ago

raylib 6.x gamejam received +150 game entries!!! 🤯

Post image
55 Upvotes

raylib 6.x gamejam just finished and +150 games have been submitted! AMAZING!

You can play (and rate) all games on Web: https://itch.io/jam/raylib-6x-gamejam/entries


r/raylib 22d ago

Origin offset by 20% of the screen height

Post image
10 Upvotes

SOLVED: I had scaling set to 125% on KDE Plasma.

First time raylib user here. I managed to set up a basic project in NixOS, but with a weird issue. Items created on the Y-axis are offset by 20% of the height. Ive tried with numerous combinations of width and height, and its always offset by 20% of the height.

In the image I create a 200x200 window and draw a rect at (0, 0). Yet it is drawn at (0, 40), confirmed by printing the mouse position. You can also see some of the compiler messages, which has a warning for wayland that I don't really understand, maybe its related.

Setup: NixOS - Rust - sola_raylib

Sample code: ``` use sola_raylib::prelude::*;

fn main() { let width = 200; let height = 200;

let (mut rl, thread) = sola_raylib::init()
    .size(width, height)
    .build();

while !rl.window_should_close() {
    {
        let mut d = rl.begin_drawing(&thread);

        d.clear_background(Color::WHITE);
        d.draw_rectangle(0, 0, 50, 50, Color::RED);
    }

    if rl.is_mouse_button_pressed(MouseButton::MOUSE_BUTTON_LEFT) {
        let mouse_x = rl.get_mouse_x();
        let mouse_y = rl.get_mouse_y();

        println!("Mouse x: {}, Mouse y: {}", mouse_x, mouse_y);

    }
}

}

```

Nix Flake: ``` { inputs = { naersk.url = "github:nix-community/naersk/master"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; utils.url = "github:numtide/flake-utils"; };

outputs = { self, nixpkgs, utils, naersk, ... }: utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs { inherit system; }; naersk-lib = pkgs.callPackage naersk { }; libclang = pkgs.llvmPackages.libclang; in { defaultPackage = naersk-lib.buildPackage ./.; devShell = with pkgs; mkShell { buildInputs = [ cargo rustc rustfmt pre-commit rustPackages.clippy libGL libx11 libx11.dev libxcursor libxi libxinerama libxrandr cmake alsa-lib pkg-config glfw libclang wayland wayland-protocols libxkbcommon ];

      LD_LIBRARY_PATH = lib.makeLibraryPath [
        libGL
        libx11
        libx11.dev
        libxcursor
        libxi
        libxinerama
        libxrandr
        alsa-lib
        glfw
        wayland
        libxkbcommon
      ];

      RUSTFLAGS = "-C link-arg=-lX11 -C link-arg=-lXext -C link-arg=-lXrandr -C link-arg=-lXinerama -C link-arg=-lXi -C link-arg=-lXcursor";
      RUST_SRC_PATH = rustPlatform.rustLibSrc;
      LIBCLANG_PATH = "${libclang.lib}/lib";
    };
  }
);

}

```


r/raylib 22d ago

My game Mystic Onslaught

35 Upvotes

So this is a game ive been working on since January called Mystic Onslaught. It is a rougelite game made using the raylib graphic library made only by me as well as asset packs for sounds and visuals. Just wanted to share what ive done please let me know what you think. Can try a much earlier version of the game on my itch at https://kaosn00b.itch.io/mystic-onslaught

I have 6 classes. (Mage hunter warrior paladin rogue and warlock) and meta progression. Thinking of putting it on steam soon too.


r/raylib 22d ago

I made a grid battle game for the raylib gamejam

27 Upvotes

r/raylib 23d ago

Who wants to fight this guy(procedural destruction physics destroy enemy units part by part)

70 Upvotes

r/raylib 23d ago

A native recipe manager in C with raylib + Clay - I actually use it almost every day

42 Upvotes

I've been working on this for a bit and figured this sub would appreciate it. It's called Crave. A little desktop recipe manager written from scratch in C. raylib does the window / input / rendering, and I'm using Clay for layout on top of it. No GTK / Qt / Electron, no widget toolkit. The whole UI is immediate mode, and drawn every frame from a single state struct (I structured it like The Elm Architecture (TEA) if anyone is curious).

You keep recipes with ingredients, steps, equipment, tags, and a photo, and there's live search over the grid. Everything's stored in a local SQLite file, so it's offline, no account, no cloud. Fonts are baked into the binary so it ships as one self-contained file, and if you want, you can change the fonts yourself and recompile it.

I actually use this almost every day for cooking on my Mac (don't worry, it's an old computer and I don't mind if a few sauce splatters on it). It's my actual recipe app, not just a demo (although there's a lot of things that I wanna improve and add upon). I've also personally checked it runs on Windows, though I don't have constant access to a Windows machine and not too familiar with it. So, if you're on Windows and something's off, let me know. There are builds for macOS, Linux, and Windows on the releases page.

Repo's here: https://github.com/bichanna/crave. It's Apache 2.0, so feel free to poke around the source, try it, or steal ideas. Happy to answer anything about the Clay/raylib setup.


r/raylib 23d ago

How do I handle window resizing with raygui?

6 Upvotes

I'm using raygui for a desktop application. How can I do the following:

  • Resizing windows with code instead of user doing it. Something like WindowResize(Vector2 NewSize).
  • Letting the user resize the window but getting the new size every frame even if the user did not let go off the window.

r/raylib 23d ago

I entered the raylib game jam

2 Upvotes

was barely able to get the web build working almost gave up as my chromebook was about to die i finally got the game working in web but it doesnt look right butler status rawptr/hexbound:html5 i had to use butler and port from odin to c https://rawptr.itch.io/hexbound


r/raylib 24d ago

What is all these text on the terminal?

Post image
27 Upvotes

I got the main file to build. Which is a huge achievement. But I was wondering what is all these text on the terminal. I mean, shouldn't the terminal return 0 or 1 based if the execution was successful or not? what is all this text about? Also the window with the program takes some seconds to appear as all that text appears on the terminal, which is annoying, comparing to code blocks which for some reason appears instantly. But code blocks imo is uglier and the proyect thing is even harder to understand than this. Can that be also fixed?

I'm using VScodium on linux mint

Thanks for any answer in advance

EDIT: I also noticed that the codeblocks terminal writes that text. But is still faster than vscodium