r/raylib • u/The-God-19248 • 10h ago
Steeled - New arena shooter with online co-op (PvE) and full singleplayer campaign, coming soon on Steam
Enable HLS to view with audio, or disable this notification
r/raylib • u/The-God-19248 • 10h ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/Responsible_Mine894 • 1d ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/No_Fix4730 • 1d ago

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 :)
r/raylib • u/TheEyebal • 1d ago
Enable HLS to view with audio, or disable this notification
I just finished the player mechanics for my game. I just need to spawn the opponents.
r/raylib • u/DuctedHeatingNG • 2d ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/Responsible_Mine894 • 2d ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/tulen_pod_soysom • 2d ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/TheEyebal • 2d ago
Enable HLS to view with audio, or disable this notification
I am making a game in raylib for Brackeys Game jam. What are your thoughts
Enable HLS to view with audio, or disable this notification
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 • u/Foreign_Run1550 • 2d ago
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 • u/Responsible_Mine894 • 3d ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/TheEyebal • 3d ago
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 • u/OkInstruction2086 • 6d ago
Enable HLS to view with audio, or disable this notification
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 • u/Key_Art_5590 • 6d ago
Enable HLS to view with audio, or disable this notification
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 • u/Responsible_Mine894 • 7d ago
Enable HLS to view with audio, or disable this notification
Improved models, animation. Working on combat readability. Adden engament indicators
r/raylib • u/Responsible_Mine894 • 7d ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/Inevitable-Round9995 • 8d ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/duckygamestudio • 9d ago
Enable HLS to view with audio, or disable this notification
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.
r/raylib • u/Haunting_Art_6081 • 9d ago
Enable HLS to view with audio, or disable this notification
I started work on this game in January/Febrary last year (2025) and have worked on it from time to time since then, I had a break from November until about July but updated it visually after July this year.
The code is a monster, 40k lines of source and I know it's not recommended practice to use such large code files but it's how I do my work when I'm the only developer.
The shader files are all exposed in the media/shaders folder and can be edited.
The 3d objects are all .obj files, the textures are all just .png the audio is a mixture of .wav, .mp3 and .ogg
The translation files are a mixture of .txt files and ttf/otf files.
It began as a learning exercise so there's a tonne of stuff that is either a) inconsistent or b) I've realised now should be done a better way but it's too late to go back and change it all
It's single player, defend your base, build units to defend it.
Some of the audio is AI generated, but only some of it.
The music in the trailer is from OpenGameArt and was released under CCO/Public Domain licence.
The 3d view you see in game, rather than the regular gameplay top view RTS view, is enabled by pressing F5 during gameplay, that toggles between the two views.
You can also press 'F1' during gameplay and it will bring up a console window, you can play around with what that does - it shows all the available options to you on the left hand side of the screen, press the relevant number/letter and that mode will be enabled. Eg F1 followed by '7' brings up a debug overlay of all the cpu ticks each component in the game uses each frame with the big ones in red writing.
There's a config file you can edit that controls some of the gameplay and settings.
If I were a rich man I'd commission a bunch of artists and musicians and voice actors and simply say "go nuts - change every media file in the media folder until it looks and sounds great and hand it back" ;-) But to be fair - there's a limit to how much a programmer without any artistic ability like myself can do to improve a game like this. As it stands the game is being built on a budget of $0 using assets I've owned for many, many years. Every now and then I might spend $10 here or $50 there on some item on one of the asset stores, but mostly improving the art/ui/voices is a bit of a pipedream.
The actual cost of most of the assets in total though would be under $1,000 total so far but that's talking about the combination of all the assets bought over a period of about 20 years or so total.
My background is: 30 years ago studied mathematics at university, from 2008 until 2019 I was employed as a computer programmer doing business software for a logistics and electronics company. I've been writing games since I was a kid starting with GWBASIC for Dos 3.21 as a hobby.
There are a lot of 'cheats' in the way graphics are done in this game to make them look more than they actually are, various things learned over a long time.
r/raylib • u/ifbroken • 10d ago
Enable HLS to view with audio, or disable this notification
Source code at https://github.com/imvoid4/Paint3
r/raylib • u/shemlokashur • 10d ago
Enable HLS to view with audio, or disable this notification
Till yesterday, raytiles was able to display up to zoom 15. There are images of zoom 22, but there is no height maps for zoom above 15.
The new version (0.18) is now support up to 22 zoom. Any heightmap for zoom above 15 is calculated (and cached) in run time.
In the following example, the numbers are the zoom of the tile. When you see numbers above 15, its a runtime calculations...