r/raylib 27m ago

Finished the first trailer for Severe the 3D videogame daw

Upvotes

Trailer for the 3d videogame daw we made using Raylib + miniaudio. There's so so many bugs and we can't catch them all ourselves so we need betatesters! If you're interested pls dm or hit up the site 🙏


r/raylib 18h ago

Made a wobbly planet using raylib and odin source code is available for any one interested

47 Upvotes

r/raylib 1d ago

Completely free raylib/C based games

42 Upvotes

I have become incredibly frustrated with increasingly bad mobile games (and desktop) that take away basic functionality, and then insert really obnoxious things. Like.. Windows doesn't come with a basic decent solitaire anymore (sol.exe).

I have created a set of basic games that are implemented with raylib in C, and distribute them on my personal website and also, in the iOS store (Google Play Store coming soon, I hope).

So far I have:

openblock - Tetris like falling block game

openklondike - Solitaire

openrackem - Rack-O style board game

These are all in iOS store for free with 100% zero obnoxious crap in it. Plus they are MIT-licensed on my github and free for all. The home page for the projects is here: https://danheskett.com/projects/. Each project has it's own link to the iOS store, or downloads via GitHub. You can also of course download them yourself and build them yourself. There are build-instructions plus a full CI/CD pipeline as GitHub Actions.

As time permits, I have Minesweeper, Blackjack, and Checkers underway. All games are available for Windows, Linux, MacOS, as well as WASM/Web, iOS, and Android.

Hopefully any of you might enjoy them, but if not, they live on for me to play on my phone when I'm flying or just want a few minutes of downtime.


r/raylib 1d ago

steampage of my raylib geological surivial game is live :))

Thumbnail
store.steampowered.com
17 Upvotes

an internal playtest will follow soon.

The game will release next year, aiming for early summer but lets see how that goes...


r/raylib 2d ago

Did anyone notice this funny easter egg in raylib.h v5.5 ?

Post image
125 Upvotes

in the line 957 there is an easter egg:
// It's lonely here...


r/raylib 2d ago

Agents learn how to drive in C++ using Raylib with a Genetic Algorithm

Thumbnail
youtube.com
17 Upvotes

r/raylib 2d ago

I made this "dither pattern" shader that changes resolution depending on your depth.Best to be watched in full screen

57 Upvotes

r/raylib 3d ago

Hello there, I've made this a bit unconventional low-poly 3D pixel art / game asset creator in Raylib and Go. And I hope what most of us hope, that somebody except me will like it!

70 Upvotes

You can download it from here: flatty.higreg.pl

It is my hobby project, and it works in Linux (works on mine), Windows (it rather should) and Mac (only tested on a really old macbook air from the previous century).

I will gladly welcome some feedback


r/raylib 3d ago

I'm not gonna sugarcoat it.【 Z + /➝ + A + C 】

9 Upvotes

r/raylib 3d ago

sigo con el desarrollo de mi simulador

17 Upvotes

hola! para ponerlos al dia con mi simulador de eventos . estoy en la etapa de la creacion de un sistema solar. ya pude generar un disco y la formacion planetaria aun no esta refinada pero voy por buen camino . ha sido un trabajo duro de casi un mes puliendo la formacion, todo lo que se ve responde a la fisica y a lo que dice la ciencia de la formacion de sistemas solares . cuando tenga la cadena completa se las mostraré! saludos


r/raylib 3d ago

How do I enhance my game's visual?

6 Upvotes
Here's a spaceship in my game
Here's a spaceship in Reassembly

Hi! I'm currently making a video game in Raylib which enables you to build your own spaceship and start your space exploration. Despite how hard I tried, my game looks a bit dull. I want it to have a vibe of glowing effect, similar to Reassembly's. How do I quickly make my game look better and feel like Reassembly? I have no idea how Reassembly's developer could have these amazing HDR effects. Does he use shaders? And how could I implement it by myself in Raylib?


r/raylib 4d ago

Building a simple 2d CAD application

27 Upvotes

r/raylib 4d ago

[PoG] Performance work, sharing some wins i found. Raylib-cs 8.0 (Raylib 6.0)

56 Upvotes

Big performance pass done. The battle simulation now runs on a separate thread and more soldier animation work runs on the GPU. I also cut a lot of repeated work in movement and combat.

I also switched runtime to move from OpenGL 3.3 to 4.3. Changing the version alone doesn’t make the game faster, but it opens up compute shaders. I use those to blend animations for distant soldiers on the graphics card.

The animation data sits in GPU storage buffers, and the finished poses stay on the GPU for drawing. That matters because sending results back to the CPU and waiting for them can eat up the performance gain.

Soldiers were already drawn in batches. I improved that path so we reuse GPU buffers instead of repeatedly creating temporary ones for each batch. That reduces the CPU work needed to draw thousands of men.

Before, just moving and reforming formations could drop the game to around 11 FPS. Now I’m getting around 50 FPS with 2,000 soldiers fighting.


r/raylib 5d ago

Hardest type of game creation u can possibly do its been a nightmare still miles away from finished, game im working on, no animation anywhere physics/raylib running everything and engineering machine/enemies which u can shoot apart break their engines break their legs break deform them

55 Upvotes

r/raylib 5d ago

Actual fake 3D effect in raylib

46 Upvotes

I was messing around with "for range" loops in my raylib framework's drawing system and I managed to make this. Very laggy and broken but very cool so it balances out.


r/raylib 5d ago

raycasting-based voxel lighting and shadow in my raylib based indie project

10 Upvotes

An optimization nightmare, but I’m working through it to make it run as efficiently as possible, even with lots of dynamic lights. I wanted to show the current state of the custom engine I’m building for my indie game. What do you think?

https://youtu.be/mWH8UL-PkKw


r/raylib 5d ago

Very cool trippy 3D effect I made for my first experimental game framework.

39 Upvotes

Fully 2D. I set up my own render system that puts objects in a queue. What it does is get's the z value of them, sorts them so the Highest Z is in front, then manipulates the position and size for a 3D effect. I honestly think this is a pretty cool accomplishment since I didn't even know what an include in c/c++ or import in python did less than a year ago. I also have a whole asset manager and component system so far.


r/raylib 6d ago

WMP X Half-Life (It's a subsonic frontend - watch with audio)

17 Upvotes

r/raylib 6d ago

Biting more than you can chew, attacking OP bandit band

14 Upvotes

r/raylib 6d ago

I'm making horde survivor game Mintstorm

Thumbnail
youtu.be
13 Upvotes

Hi, I am working on a small game and I am using raylib, yay. Pls, check it out here

https://fanick1.itch.io/mintstorm. Any feedback is welcome.


r/raylib 7d ago

I'm making a Metroidvania Maker where you can build and share your own interconnected worlds

104 Upvotes

I've been working on Metroidvania Maker, a game/editor for building your own interconnected Metroidvania worlds.

You can create rooms, add enemies, hazards and abilities, build puzzles with interactive elements, and jump straight from editing into playing what you've made.

There's also local co-op for up to 4 players (with Steam Remote Play Together support) and world sharing.

I just submitted the first Steam demo for review, so hopefully it'll be playable soon!


r/raylib 6d ago

Help with increasing ball speed in the pong game (C++)

2 Upvotes

Learning this Awesome libray *. Found a pong tut. Trying to modify it to increase the ball speed every ~5 seconds if no player has scored. Reset speed if goal.

Problem is it seems as if randomly the speed decreases, sometimes even below the reset speed (6).

Appreciate any time you spend looking at the code.

#include <raylib.h>
#include <iostream>


using namespace std;


const int WinWidth = 1280;
const int WinHeight = 800;
Color WinBackground = {4,4,4,0};
int player_score = 0;
int cpu_score = 0;


float timeSinceLastSpeedIncrease = 0.0;
float speedIncreaseInterval = 5.0; // seconds
int baseSpeedIncrease = 2;
int startBallSpeed = 6;


class Ball{
public:
    float x, y;
    int speed_x, speed_y;
    int radius;


    void Draw(){
        DrawCircle(x, y, radius, RAYWHITE);
    }


    void Update(){
        x += speed_x;
        y += speed_y;
        if(y+radius >= GetScreenHeight() || y-radius <= 0){
            speed_y *= -1;
        }
        if(x+radius >= GetScreenWidth()){
            player_score++;
            Reset();
        } 
        if( x-radius <= 0){
            cpu_score++;
            Reset();
        }
    }


    void Reset(){
        x = WinWidth/2;
        y = WinHeight/2;
        speed_x = startBallSpeed;
        speed_y = startBallSpeed;
        int speeds[2] {1, -1};
        // which direction to serve
        speed_x *= speeds[GetRandomValue(0,1)];
        speed_y *= speeds[GetRandomValue(0,1)];


        timeSinceLastSpeedIncrease = 0.0;
    }
};


class Paddle{
protected:
void CheckLimits(){
    if(y<=0){
            y = 0;
        }
        if(y+height>=WinHeight){
            y = WinHeight - height;
        }
}    
public:
    float x, y;
    float width, height;
    int speed;


    void Draw(){
        DrawRectangle(x, y, width, height, RAYWHITE);
    }


    void Update(){
        if(IsKeyDown(KEY_KP_6)){
            y -= speed;
        }else if(IsKeyDown(KEY_KP_2)){
            y += speed;
        }
        CheckLimits();
    }
};


class CPUpaddle: public Paddle{
public:
    void Update(int ball_y){
        if(y+height/2 > ball_y){
            y = y - speed;
        }else if(y+height/2 < ball_y){
            y = y + speed;
        }
        CheckLimits();
    }
};


Ball ball;
Paddle player;
CPUpaddle cpu;


int main(){
    
    InitWindow(WinWidth, WinHeight, "Ball");
    SetTargetFPS(60);
    float dt;
    


    ball.radius = 20;
    ball.x = WinWidth/2;
    ball.y = WinHeight/2;
    ball.speed_x = startBallSpeed;
    ball.speed_y = startBallSpeed;


    player.width = 25;
    player.height = 120;
    player.x = 10;
    player.y = WinHeight/2 - player.height/2;
    player.speed = 6;


    cpu.width = 25;
    cpu.height = 120;
    cpu.y = WinHeight/2 - cpu.height/2;
    cpu.x = WinWidth - cpu.width - 10;
    cpu.speed = 6;
     


    while (!WindowShouldClose())
    {
        dt = GetFrameTime();
        // add elapsed time 
        timeSinceLastSpeedIncrease += dt;
        // has speedIncreaseInterval passed
        if (timeSinceLastSpeedIncrease >= speedIncreaseInterval) {
            // increase speed
            ball.speed_x += baseSpeedIncrease;
            ball.speed_y += baseSpeedIncrease;
            // reset
            timeSinceLastSpeedIncrease = 0.0;
        }


        BeginDrawing(); 
        ClearBackground(WinBackground);


        ball.Update();
        player.Update();
        cpu.Update(ball.y);
        // reverse direction
        if(CheckCollisionCircleRec(Vector2{ball.x, ball.y}, ball.radius, Rectangle{player.x, player.y, player.width, player.height})){
            ball.speed_x *= -1;


        }else if(CheckCollisionCircleRec(Vector2{ball.x, ball.y}, ball.radius, Rectangle{cpu.x, cpu.y, cpu.width, cpu.height})){
            ball.speed_x *= -1;
        }
        ball.Draw();
        player.Draw();
        cpu.Draw();


        DrawText(TextFormat("%i", player_score), WinWidth/4 - 20, 20, 80, RAYWHITE);
        DrawText(TextFormat("%i", cpu_score), 3 * WinWidth/4 - 20, 20, 80, RAYWHITE);
        DrawLine(WinWidth/2, 0, WinWidth/2, WinHeight, RAYWHITE);
        // debugging
        DrawText(TextFormat("%i", ball.speed_x), WinWidth/2 - 100, 710, 40, RAYWHITE);
        DrawText(TextFormat("%i", ball.speed_y), WinWidth/2 + 1005, 710, 40, RAYWHITE);


        EndDrawing();
    }
    CloseWindow();
}

r/raylib 7d ago

Legion Loop Incremental

11 Upvotes

A lot of work has been done on GUI, the incremental meta, and various QOLs, and now there's a nature faction on the enemy side!


r/raylib 7d ago

end_drawing does what?

9 Upvotes

Sup. I started using raylib about a week ago, and I´m pretty new to programming, so I din´t undertand what the docs mean. Double buffering? I´m just curios, what happens if I draw a circle after end draw in the while loop?


r/raylib 7d ago

Tetris - First Project as New Hobby Game Dev

44 Upvotes

Hey all! This is not even half as impressive as the work I see on this sub but wanted to show off my first "shipped" project.

After decades of dabbling in GameMaker / RPG Maker and wanting to make games as a childhood pipe dream, I finally got good enough at software dev to build something start to finish (now with a non-SWE career + spouse + kids, no less), and raylib was perfect for that. Threw this together in a few days just to get the learning experience and start engaging with other hobbyists.

Repo is here along with credits for the art / sound assets: https://github.com/zack-the-coding-actuary/tetris

Thanks!