Questions tagged [raylib]

A simple to use library for making videogames, distributed under the zLib license.

raylib is a simple and easy-to-use library to enjoy videogames programming.

raylib is highly inspired by Borland BGI graphics lib and by XNA framework and it's specially well suited for prototyping, tooling, graphical applications, embedded systems and education.

NOTE for ADVENTURERS: raylib is a programming library to enjoy videogames programming; no fancy interface, no visual helpers, no auto-debugging... just coding in the most pure spartan-programmers way.

Raylib.com

On Github

171 questions
0
votes
0 answers

Locking Keyboard Onto Raylib Window

I wanna lock keyboard only onto Window I Created using RayLib, this would be helpful If I created If checks for example Windows key, and the window key does something but doesn't tab out for example: int key = GetKeyPressed(); // Raylibs Get Key…
0
votes
1 answer

Issues with Rasterization

I have been working on a 3D software renderer in C recently, and I have managed to get some shapes and wireframes working. However I have now gotten to rasterization and I can't seem to get it working. I am currently trying to place 2 cubes into the…
0
votes
1 answer

Weird camera bug in Raylib

So I was working on adding a simple "floor" (basically code that keeps the camera from going below a certain level) and jumping when I encountered a bug that made my camera slowly look down, even though my code didn't have anything to do with…
justtab
  • 23
  • 4
0
votes
0 answers

Player only detects collision with only one object in Raylib C++

I am coding a small game in Raylib with C++ and I am working on a collision/hitbox system for the player and the other game objects. The code I have works with the player and one other object, but not with the other objects. If I remove the object…
0
votes
0 answers

How can I make my raylib library work on macOS?

ERROR MESSAGE AFTER TRYING TO COMPILEI've bought new M.2 Mac, im still kinda beginner in learning C++ and I wanted to try making games using raylib library. First it wanted me to compile using c++11 or later, which I've solved. but now I have…
Emixxik
  • 1
  • 1
0
votes
1 answer

ld cannot find a library that exists and is configured properly

I'm running Ubuntu 22.04.2 LTS and I've been trying to compile and manually install raylib, but when I compile with gcc and try to link against the library I get the following error: /usr/bin/ld: cannot find -lraylib: No such file or directory I've…
Danila
  • 3
  • 3
0
votes
1 answer

raylib error : Failed to initialize Graphic Device

I m trying to install raylib c library in my linux machine , but when I compile my file with this command : cc lol.c -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 i get this message ./a.out INFO: Initializing raylib 4.6-dev INFO: Supported raylib…
0
votes
1 answer

Making lines thiccker when using DrawRectangleLines() In raylib

I came across a problem that I cannot change line thickness when using DrawRectangleLines(), and it would be stupid to create a texture with just thicker lines, I tried to search through internet and docs and I couldn't find anything Or I am just…
0
votes
0 answers

Cannot set icon Image in Raylib using C++

I'm making a little game using raylib in C++. I am trying to set the window icon using SetWindowIcon(icon), but it doesn't actually set the icon: const int screenWidth = 1000; const int screenHeight = 800; InitWindow(screenWidth, screenHeight,…
0
votes
1 answer

"preLaunchTask 'build release' terminated with exit code 2" include path error in vscode when using raylib

I've been trying to setup raylib with visual studio code but my include paths seem to be messed up. whenever I try to run the program I get this error which from what I understand means that my include paths are all are not correctly set but I can't…
0
votes
0 answers

i32.load error while trying to run compiled to WebAssembly C++/Raylib game

I have compiled the C++/Raylib game to the web, but after trying to run it I have seen these errors in console: Uncaught RuntimeError: memory access out of bounds at game.wasm:0x47615 at game.wasm:0x375b4 at game.wasm:0x37440 at browserIterationFunc…
Roman Leshchuk
  • 192
  • 1
  • 7
0
votes
1 answer

Disable Raylib Iog messages

Is there a way to disable the output of Raylib? I'd like to not have this spammed in my terminal: INFO: Initializing raylib 3.7 INFO: DISPLAY: Device initialized successfully INFO: > Display size: 1920 x 1080 INFO: > Render size: 1024 x…
Oughie
  • 1
  • 1
0
votes
0 answers

Searching Working C/C++ DDS Image Library

Im searching a working DDS image loading library written in C/C++, so far I have tried: raylib, DevIL and dedicated DDS image libraries All of them don't work properly, the image looks completely scrambled. Gimp or other image editing software seems…
Michael
  • 177
  • 2
  • 15
0
votes
0 answers

Why doesn't the snake grow the first time it picks up an apple in my Raylib C snake game?

i am making a snake game in Raylib using C. I developed a function for handling collision for the snake and the apple (So that i could avoid 5 depth nesting which is quite unreadable). When the snake first picks up the apple, it does not grow, the…
George
  • 101
  • 8
0
votes
1 answer

Optimal Collision Detection

I've been trying to find an optimal way to detect collision for an application I've been developing lately, here's the problem in the simplest context: The mouse positions in which the left mouse button was pressed are saved to a pointer which then…
Di0n
  • 65
  • 4