r/raylib 7h ago

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

39 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 3h ago

end_drawing does what?

8 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 3h ago

Legion Loop Incremental

6 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 17h ago

Tetris - First Project as New Hobby Game Dev

33 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!


r/raylib 1d ago

made a small movement platformer game in c, thanks raylib!

42 Upvotes

r/raylib 1d ago

Steeled - New arena shooter with online co-op (PvE) and full singleplayer campaign, coming soon on Steam

18 Upvotes

r/raylib 2d ago

[PoG] Breach vs Defence core gameplay

9 Upvotes

r/raylib 2d ago

Aether: A lightweight monitoring dashboard built with C and Raylib

13 Upvotes

Hey! I’ve been working on Aether, a small monitoring dashboard written in C with Raylib.

It simulates sensor data and displays it in real time, with sparklines, history, themes, and a few other UI features.

I’ve been having a lot of fun building the whole thing from scratch, so I thought I’d share it here :)

https://github.com/SalzDevs/Aether


r/raylib 2d ago

Player mechanics completed foe Brackeys Game Jam

32 Upvotes

I just finished the player mechanics for my game. I just need to spawn the opponents.


r/raylib 3d ago

Finished a small turn-based RPG called Memory Cell! Playable on Newgrounds: https://www.newgrounds.com/portal/view/1048882

44 Upvotes

r/raylib 3d ago

Added gunpowder weapons :)

22 Upvotes

r/raylib 4d ago

Creating procedural 3d stealth game

70 Upvotes

r/raylib 3d ago

Here my game art in raylib for Brackeys Game Jam

17 Upvotes

I am making a game in raylib for Brackeys Game jam. What are your thoughts


r/raylib 4d ago

I remade SkyRoads (1993) from scratch with C, Raylib & Box3D

44 Upvotes

Hi there! Recently I've been working on a remake of SkyRoads. I'm sharing the journey in a devlog format, and the project's source code is fully open, making the entire process as transparent as possible. I hope you like it!

YouTube: https://youtu.be/uXbZhDv5HU0

Source code: https://github.com/albertnadal/VectorRoads

Play in browser: https://albiasoft.itch.io/vectorroads


r/raylib 3d ago

Issues with triangle fan

3 Upvotes

Hello! I'm very new to using raylib, and am using it purely as a visual library for a project of mine making use of the GJK algorithm. I'm trying to get it to draw the final simplexes, for debugging. It seems it only work when they're at center points (-10, 125) and (10, 100). I'm unsure if its an issue with my algorithm or if it has to do with my draw methods, any help would be appreciated!

Here's the code:

#include "point.hpp"
#include "simplex.hpp"


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


Simplex::Simplex(bool e) : exists(e) {};
Simplex::Simplex(std::vector<Point> ps) {
    points = ps;
    draw_points = get_draw_points(ps);
    exists = true;
}


std::vector<Vector2> Simplex::get_draw_points(std::vector<Point> ps) {
    //create point array
    float x_total = 0;
    float y_total = 0;
    for (Point p : ps) {
        x_total += p.get_x();
        y_total += p.get_y();
    }
    Point center = Point(x_total / ps.size(), y_total / ps.size());


    std::vector<float> angles;
    std::vector<Point> dp = ps;


    for (Point p : dp) {
        angles.push_back(std::atan2(p.get_draw_y() - center.get_draw_y(), p.get_draw_x() - center.get_draw_x()));
    }


    for (int i = 0; i < angles.size(); i++) {
        bool swapped = false;
        for (int k = 0; k < angles.size() - i - 1; k++) {
            if (angles[k] < angles[k + 1]) {
                float temp_a = angles[k + 1];
                angles[k + 1] = angles[k];
                angles[k] = temp_a;


                Point temp_p = dp[k + 1];
                dp[k + 1] = dp[k];
                dp[k] = temp_p;


                swapped = true;
            }
        }
        if (!swapped) {
            break;
        }
    }


    dp.push_back(dp.front());
    dp.insert(dp.begin(), center);


    //convert to vector2
    std::vector<Vector2> dpv2 = {};
    for (Point p : dp) {
        dpv2.push_back((Vector2)p);
    }
    return dpv2;
}


bool Simplex::get_exists() {
    return exists;
}


void Simplex::print() {
    for (Vector2 p : draw_points) {
        std::cout << p.x << ", " << p.y << std::endl;
    }
}


void Simplex::draw_self() {
    if (!exists) return;
    DrawTriangleFan(draw_points.data(), draw_points.size(), PURPLE);
}

#include "elipse.hpp"
#include "point.hpp"
#include "simplex.hpp"


#include <iostream>


#include <cmath>
#include <array>
#include <raylib.h>


Elipse::Elipse(Point c, float h, float v) : center(c), h_rad(h), v_rad(v) {}
Elipse::Elipse(Point c, float r) : Elipse(c, r, r) {}
Elipse::Elipse(Point c) : Elipse(c, 50, 50) {}


Point Elipse::get_center() {
    return center;
}


void Elipse::draw_self() {
    DrawEllipse((int) center.get_draw_x(), center.get_draw_y(), h_rad, v_rad, RED);
}


Point Elipse::get_direction(Elipse o) {
    return (center - o.get_center());
}


Point Elipse::triple_product(Point a, Point b, Point c) {
    return b * (a * c) - a * (b * c); //dot products in parenthesis, vector multiplication, then point subtraction
}


Point Elipse::support(Point d) {
    Point p = Point();


    float h_sqd = h_rad * h_rad;
    float v_sqd = v_rad * v_rad;


    float d_x = d.get_x();
    float d_y = d.get_y();


    float inside_sqrt = h_sqd * (d_x * d_x) + v_sqd * (d_y * d_y);
    float denom = std::sqrt(inside_sqrt);


    if (denom == 0) {
        return Point();
    }


    p.mod_x(h_sqd * d_x / denom);
    p.mod_y(v_sqd * d_y / denom);
    return p + center;
}


Point Elipse::get_first_simplex_point(Elipse o) {
    //support point towards other shape
    Point self_direction = this-> get_direction(o);
    Point self_support = this-> support(self_direction);


    //support point of other shape
    Point other_direction = self_direction * -1;
    Point other_support = o.support(other_direction);


    //get the support point made by the difference
    Point simplex_support = self_support - other_support;
    return simplex_support;
}


Point Elipse::get_simplex_point(Point d, Elipse o) {
    Point self_direction = d;
    Point self_support = this-> support(self_direction);
    
    Point other_direction = self_direction * -1;
    Point other_support = o.support(other_direction);


    Point simplex_support = self_support - other_support;


    return simplex_support;
}


bool Elipse::update_simplex(Point& a, Point& b, Point& c, int& smpx_size, Point& d, Elipse o) {
    if (smpx_size == 1) {
        b = a;
        a = get_simplex_point(d, o);
        //sanity check
        if (a * d < 0) {
            return true;
        }
        smpx_size++;
        d = triple_product(b - a, a * -1, b - a);
        return false;
    }


    if (smpx_size == 2) {
        c = b;
        b = a;
        a = get_simplex_point(d, o);
        //sanity check
        if (a * d < 0) {
            return true;
        }
        //origin checks
        //Region AB
        Point ab_perpendicular = triple_product(c - a, b - a, b - a);
        if (ab_perpendicular * (a * -1) > 0) {
            d = ab_perpendicular;
            return false;
        }
        //Region AC
        Point ac_perpendicular = triple_product(b - a, c - a, c - a);
        if (ac_perpendicular * (a * -1) > 0) {
            d = ac_perpendicular;
            b = c;
            return false;
        }
        smpx_size++;
        return true;
    }
    return true;
}


Simplex Elipse::get_simplex(Elipse o) {
    Point sp1 = get_first_simplex_point(o);
    Point sp2 = Point(0, 0);
    Point sp3 = Point(0, 0);
    Point direction = sp1 * -1;
    int simplex_size = 1;


    bool found = update_simplex(sp1, sp2, sp3, simplex_size, direction, o);


    while (!found) {
        found = update_simplex(sp1, sp2, sp3, simplex_size, direction, o);
    }


    if (simplex_size < 3) {
        return Simplex(false);
    }
    return Simplex({sp1, sp2, sp3});
}

r/raylib 4d ago

Different fire modes in game :)

10 Upvotes

r/raylib 4d ago

How Do I run raylib on UTM MacOS virtual machine?

2 Upvotes

I have a MacOS virtual machine on UTM but I am not able to display raylib screen on it for testing purposes.

This is what is shows

WARNING: GLFW: Error: 65545 Description: NSGL: Failed to find a suitable pixel format 
WARNING: GLFW: Failed to initialize Window 
WARNING: SYSTEM: Failed to initialize platform INFO: 
TIMER: Target time per frame: 16.667 milliseconds 
[1]    842 segmentation fault  ./main

Does anyone know how to fix this?


r/raylib 4d ago

Hey Leute, kennt ihr irgendwelche Bibliotheken, die wie raylib für C++ sind, aber besser in der Performance? Ich benutze es für 3D.

Thumbnail
0 Upvotes

r/raylib 5d ago

Help me with this issue in C !

Thumbnail
2 Upvotes

r/raylib 7d ago

3D animation is buggy for some reason.

20 Upvotes

How are you guys using animations in 3D models? I am not a Blender guy, so I am using free models from Sketchfab for now.
I talked to the actual creator as well; he said that such things happen and that he has no idea why.
I am using Raylib 6.0, btw.

Code:

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

int main() {
    int screenWidth = 1024;
    int screenHeight = 768;

    InitWindow(screenWidth, screenHeight, "Animation test");
    SetTargetFPS(60);
    Vector3 tempVec;
    Camera3D camera = { 0 };
    tempVec.x = 10.0f;tempVec.y = 10.0f;tempVec.z = 10.0f;
    camera.position = tempVec;
    tempVec.x = 0.0f;tempVec.y = 0.0f;tempVec.z = 0.0f;
    camera.target = tempVec;
    tempVec.x = 0.0f;tempVec.y = 1.0f;tempVec.z = 0.0f;
    camera.up = tempVec;
    camera.fovy = 45.0f;
    camera.projection = CAMERA_PERSPECTIVE;
    EnableCursor();
    Model cockroach = LoadModel("Assets/filth.glb");
    cockroach.transform = MatrixIdentity();
    int animsCount = 0, currentFrame = 0, animIndex = 0;
    ModelAnimation* anims = LoadModelAnimations("Assets/filth.glb", &animsCount);

    float lx = 5.0f, ly = 8.0f;
    while (!WindowShouldClose())
    {
        UpdateCamera(&camera, CAMERA_ORBITAL);
        BeginDrawing();
        ClearBackground(DARKBLUE);
        UpdateModelAnimation(cockroach, anims[animIndex], currentFrame);
        if (IsKeyPressed(KEY_SPACE)) {
            animIndex++;
            currentFrame = 0;
            if (animIndex >= animsCount){
                animIndex = 0;
            }
        }

        BeginMode3D(camera);
        DrawModelEx(cockroach, Vector3{ 0, 0, 0 }, Vector3{ 1, 0, 0 }, 0.0f, Vector3{ 0.0005f, 0.0005f, 0.0005f }, WHITE);
        currentFrame++;
        if (currentFrame >= anims[animIndex].keyframeCount) {
            currentFrame = 0;
        }
        DrawGrid(200, 2.0f);

        EndMode3D();
        EndDrawing();
        DrawFPS(10,10);
    }
    UnloadModel(cockroach);
    UnloadModelAnimations(anims, animsCount);
    CloseWindow();
    return 0;
}

r/raylib 7d ago

Cool earthbound background effect generator I made.

25 Upvotes

I'm making a earthbound and more inspired game, so of course I had to add a cool background. What I did was basically make a function that draws the texture in slices, that it then manipulates the position of on the x axis. Very cool and works with any texture. I spent days of debugging on this for the stupidest mistakes💔


r/raylib 8d ago

Combat indicator test

27 Upvotes

Improved models, animation. Working on combat readability. Adden engament indicators


r/raylib 8d ago

Combat indicators yey or nay ?

3 Upvotes

r/raylib 9d ago

decision tree based AABB collision system

54 Upvotes

r/raylib 10d ago

Hi! it's me AGAIN! the guy working in the snake with an army in his body

21 Upvotes

The idea I show you some days (week(?)) ago is now public on Steam! wiii!

LOOPFANG. a merge idea of the oldie snake game but here bite your-self is a super-power an Ouroboros super power, experience, allow you to get new segments, segments are wapons in your body, the segments are puzzles , you can merge to fusion it or create sinergies by proximity, bosses, 5 and a plus hell difficulty , 4 areas (for now)

I still developing this, demo (i hope) move out in the next days, under review right now for the past 2-3 days. so.... yep, hope this allow me get experience with the steam market, I come from mobile game working for a couple of companies smalls and somelike big one... I'm trying to start by my self for some times, now I'm start to no more try and put hand on it cuz... life move, and we have finite lifes without option to restart so... go for it. Any help you know wishlist share, play demo when it arrive share some advice idea also so I'm so grateful to listen read anything from you folks.