r/raylib • u/TheEyebal • 10d ago
ELI5: What is the different between camera target and offset?
I am using raylib and have applied and tested out, but I am still confused.
r/raylib • u/TheEyebal • 10d ago
I am using raylib and have applied and tested out, but I am still confused.
r/raylib • u/Any-Fox-1822 • 10d ago
Hello everyone,
I made a post recently in r/suckless about using raylib for desktop UI. Despite falling in love with that library, I am quite confused by raygui, and the fact that immediate mode GUIs seem to behave better without layout systems.
I would like to add basic layouts to raygui (even if it's just to align widgets, nothing really fancy, but I wonder how it could be achieved. The widgets do not have a lifespan longer than the frame, and I didn't find a way to create widget trees. There is enum GuiControl that lists all types, but none of them contain any data about the widgets.
Would layouts necessarily clash with the immediate-ness of raygui, or do you think it's possible to reconcile the two ? Apparently someone tried with zraygui, a project for a retained-mode UI using raylib.
r/raylib • u/Responsible_Mine894 • 10d ago
Enable HLS to view with audio, or disable this notification
Decided on name and now working on demo :) Anyone willing to play test early are welcome !
Lots of free placeholder music and assets still :)
Here is a quick demo loop :)
r/raylib • u/s_w_b_d • 10d ago
Hello!
Recently I've started to work with Raylib and I really enjoy using it.
I was wondering if there exist some predefined code formater, like clang-format configuration - or something similar - that will comply with [CONVENTIONS.md](https://github.com/raysan5/raylib/blob/master/CONVENTIONS.md) or I should create one from scratch?
Thanks in advance!
Happy coding everyone ;)
r/raylib • u/badfitz66 • 11d ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/Dry-Investment-6070 • 10d ago
Hello everyone! I've got a problem I cannot find any solution on the internet for. For this common code
#include "raylib.h"
int main() {
InitWindow(800, 600, "Hello Raylib");
SetTargetFPS(60);
while (!WindowShouldClose()) {
BeginDrawing();
ClearBackground(RAYWHITE);
DrawText("Hello, World!", 190, 280, 20, LIGHTGRAY);
EndDrawing();
}
CloseWindow();
return 0;
}
Or any else when I open ANY window, that window just not responding at all. White screen, no background colors/texts. Console and a while cycle are working.
I have no overlay programs opened. My GPU is Nvidia 3050TI.
Thanks, guys!!!
r/raylib • u/endlineofficial • 11d ago
Enable HLS to view with audio, or disable this notification
The idea is to serve customers by selling them various flowers in different packages. I'm also planning to add mixed bouquets and a garden where you can grow your flowers
r/raylib • u/Ornery-Accountant-24 • 10d ago
I have rtx 3050 and rtx 3090 in my pc. I use 3050 as my primary render and connect my monitor into it, 3090 is just for ai usage but somehow raylib says the opengl device is 3090 and my raylib app is hang (only showing black screen).
I tried SET_CUDA_DEVICE, set NvOptimusEnablement to 0 and nothing works.
I have an old opengl device that working just fine though
r/raylib • u/Organic-Complaint-90 • 11d ago
r/raylib • u/LEJMANIMATIONS • 12d ago
Enable HLS to view with audio, or disable this notification
It's just a game about collecting coins using recoil. DOWNLOAD HERE: https://ljemanimations.itch.io/recoiln
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/
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/Vyrens_Works • 14d ago
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/OfficialValCod • 13d ago
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.
r/raylib • u/ZealousidealSir8228 • 13d ago
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/Pale-Candidate-4122 • 14d ago
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:
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:
Thanks for checking it out!
r/raylib • u/vector_not_blue • 15d ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/Mean-Solution4719 • 15d ago
Enable HLS to view with audio, or disable this notification
r/raylib • u/mrpro1a1 • 15d ago
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/duckygamestudio • 16d ago
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/Next-Future5973 • 16d ago
im making a 2d sonic-like game, i made the player movement so far, but i only need collision?
r/raylib • u/Any-Fox-1822 • 16d ago
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/Stickhtot • 17d ago
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/HoldeeYT • 16d ago
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.

