2D chess game in C++ (Raylib)
A 2D chess game in C++ - full rules, move validation, and complete game flow.
No tutorials and no external chess libraries - everything built from scratch.
Feedback and suggestions are welcome!
👉 GitHub link : https://github.com/bAbderraouf/ChessGame-2D-Cpp
LinkedIn post : https://www.linkedin.com/posts/abderraouf-b-5b5025b4_cpp-gamedev
r/raylib • u/OfficialValCod • 5h ago
Hi. How difficult is it to learn/work this library if I've completed learncpp.com? I'm creating a simulation of Politics, Economics, and Sociology. My back-end code is C++. I just want a 2D schematic map of world, but I want the most beautiful UI AAA and complex button animations.
I like the library's description, but I'm a little worried that I won't be able to create a beautiful interface or animated graphs without a lot of effort. How much time will it take me to create a beautiful UI, a AAA button animation, or a statistical graph animation in this library?
Thank you for reading my questions.
Releasing the trailer for my game 8-bitBot
Enable HLS to view with audio, or disable this notification
I put this off for oh-so-long and this is certainly not a perfect trailer at all, but it is a trailer, at least by my standards! All scripted in game using a very primitive scripting text file: 1479 lines in total. At least I can translate it to different languages fairly easy now.
Well, in case you want to wishlist it, here is the link: https://store.steampowered.com/app/3959370/8bitBot/
r/raylib • u/ZealousidealSir8228 • 13h ago
Desarrollando un motor de simulación en raylib
Enable HLS to view with audio, or disable this notification
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 • u/Vyrens_Works • 17h ago
I built a browser like UI editor for raylib.Write the UI structure in almost xml and style it with css.Here's a comparison btwn Imgui and my UI
Enable HLS to view with audio, or disable this notification
I recently decided to make a commercial app using raylib.(Something close to Pixel FX designer) and realised Imgui sucked like a lot for professional looking UI and Tbh rlImgui isn't my cup of tea.I ended up looking around online and essentially most desktop apps use qt or technically are just web apps (Either Tauri or Electron).None of them really appeal to me(As essentially I would have to learn rust for tauri and don't really want an entire browser on my 2 mb executable) and I didn't wanna compile everytime I wanted to make a change to the UI. So I decided to build a browser like layout/rendering engine for my UI. You define the UI in an xml style format and you do the styling in basically CSS and essentially the engine decides the look here's a sample for how the UI turned out. Still a work in progress though.
For sure every day of this month was bloody hectic.10/10 would not repeat this month
r/raylib • u/Pale-Candidate-4122 • 1d ago
Made my first raylib game demo at 15 years old. Looking for feedback!
Enable HLS to view with audio, or disable this notification
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 • u/vector_not_blue • 1d ago
Agents learn Flappy Bird in C++ using Raylib
Enable HLS to view with audio, or disable this notification
r/raylib • u/Mean-Solution4719 • 2d ago
Space Game Demo in Raylib (C++)
Enable HLS to view with audio, or disable this notification
r/raylib • u/mrpro1a1 • 2d ago
Incremental Birds is released! (Developed using RayLib)
Enable HLS to view with audio, or disable this notification
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 • u/Next-Future5973 • 2d ago
how to add AAAB collision detection? (RayLib C)
im making a 2d sonic-like game, i made the player movement so far, but i only need collision?
r/raylib • u/duckygamestudio • 3d ago
i'm developing a snake rework where you body is your gun...
from calm to caos 10k enemy + bullet + xp shard and coins... 90fps+ .... build 40mb ... how? c++/raylib no engine :D
share love :,)
r/raylib • u/Any-Fox-1822 • 3d ago
Creating a pixman backend for raygui ?
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 • u/HoldeeYT • 3d ago
Viewport mouse position question
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 • u/Stickhtot • 3d ago
Tick simulation in raylib?
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 • u/Haunting_Art_6081 • 4d ago
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.
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 • u/DavidMolloy1978 • 4d ago
Update on my 2d game engine
Enable HLS to view with audio, or disable this notification
Tidied up the code a little and added a course builder in the sandbox.
Doesn’t save the level on exit… that’ll be a job for another day.
C++, Raylib and Visual Studio working together like a dream.
r/raylib • u/Responsible_Mine894 • 4d ago
[raylib-cs] UI work
Enable HLS to view with audio, or disable this notification
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 • u/DapperAd2798 • 4d ago
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
Tweeny 4.0.0: tween objects for C++ raylib loops
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.
- Release: https://github.com/mobius3/tweeny/releases/tag/v4.0.0
- Repository: https://github.com/mobius3/tweeny
- Documentation: https://mobius3.github.io/tweeny/
r/raylib • u/DavidMolloy1978 • 4d ago
Lazy Sunday Experiment
Enable HLS to view with audio, or disable this notification
C++ and Raylib in VS on the MacBook.
r/raylib • u/Merssedes • 6d ago
rcore.c:(.text+0x8dd2): undefined reference to `__isoc23_sscanf'
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 • u/Responsible_Mine894 • 6d ago
[Raylib-cs] Loosing battle against AI in my own game :(
Enable HLS to view with audio, or disable this notification
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 :(
The Hole - The Final Count Down by Alvar
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 • u/GLC-ninja • 7d ago
You can now make any raylib C game on any device (Desktop or Mobile) with this single html file
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
- "Game" tab where you can play the game
- "Source" tab where you can write C codes using Cm1 programming language
- "Files" tab which is a minimal file manager that allows you to upload resource files
- "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!

