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
1
vote
1 answer

Raylib my Screen Collisions are not accurate

So I'm new to raylib and, basically, I'm trying to make a sandbox game and I am trying to make it so that when the player places a square or material when that material hits the edge of the screen it stops. Currently, my square when it falls it goes…
GreenDev
  • 13
  • 7
1
vote
1 answer

raylib compiler error: "Undefined symbols for architecture x86_64"

I am new to c and trying to run one of the raylib examples. But when compiling it gives me the these errors: Undefined symbols for architecture x86_64: "_BeginDrawing", referenced from: _main in Basic_window-642f03.o "_ClearBackground",…
1
vote
2 answers

Can i import 3D models into Raylib?

In The Ray lib Cheat sheet I cant see anyway of importing a 3D model. I have tried searching online but haven't found anything
TheBeeDev
  • 21
  • 2
1
vote
0 answers

Raylib drawing a SDF to a render texture

I'm trying to draw a circle SDF to a render texture, just a 64 radius circle SDF, centered at the mouse position. I've setup the code to render the contents of the render texture to the screen, which is 1366x768, same as the render texture size. I…
Tom Tetlaw
  • 83
  • 1
  • 10
  • 21
1
vote
1 answer

C++ Dangling pointer issue

I am using the Raylib GUI framework for a project that displays all the nodes within an iteration of the Collatz Conjecture. In my program, I have a class for a Node object that acts simply as a circle with a labelled number. The variable text in my…
1
vote
0 answers

How to setup Raylib for game development in C on macOS?

I am a complete beginner with programming in C and in order to motivate myself to spend more time programming in C, I would like to try game programming. Looked around and discovered Raylib which is a C/C++ game framework. However, the documentation…
ddabrahim
  • 99
  • 6
1
vote
1 answer

Trying to make a snake game in C and raylib. Undefined behaviour after adding eating apples

So, I'm trying to make a simple snake game in C with raylib, and after adding the ability to eat apples, basically everything breaks. The way I'm doing this, is there is an array of Vector2s that give the position of every square of the snake, which…
FyreWolf
  • 11
  • 1
  • 3
1
vote
1 answer

undefined reference to `__mingw_vsscanf'

I am currently listening to some videos from Udemy. This one is specifically has to do with using raylib to make a basic game. So before getting to that the course goes over making a popup window and here is the code that I used below. #include…
kiloswitch
  • 11
  • 3
1
vote
1 answer

Raylib cpp IsMouseButtonPressed causes infinite loop

I am using raylib 3.5.0 and here is my code: Vector2 startMousePos = GetMousePosition(); Vector2 endMousePos; bool mousePressed = false; while (1) { if (!IsMouseButtonPressed(MOUSE_LEFT_BUTTON)) { …
Rik Smits
  • 31
  • 7
1
vote
1 answer

Raylib C++ Shapes Spawn on click

I just started learning Raylib, and I'm trying to create something like the drawing example that they have on the website, but its not working for me. I want to click on R and spawn/draw objects on screen but the object disappears once I release the…
1
vote
0 answers

Why IsKeyDown always returns true?

I was working in a University C project (first sem), in which our group wanted to make a simple pong game, we decided to use raylib, as it seemed easy. But here is the problem, in the following code: void UpdatePad(Pad* pad) { int height =…
1
vote
1 answer

scrolling background image, can't hide seams, c++ raylib

I'm trying to get a scrolling background to work where the background image is smaller than the window of the program. For this reason, I created a for loop to move two groups of the same copied image. The weird thing is that the two groups of…
user1026169
  • 5,345
  • 5
  • 21
  • 35
1
vote
1 answer

How to make a HTML build from raylib

I am a beginner programmer and I was wondering how I would make an HTML build from raylib. I tried looking at the GitHub https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5) I couldn't understand it. would you be able to write a simple…
josephi
  • 81
  • 1
  • 1
  • 5
1
vote
2 answers

How to multiply two 32 bit colours in RGBA format

I am using the raylib and it uses the 32 bit RGBA colours. I searched in a cheatsheet, but I could not find any appropriate routine. What I want to do is multiply two colours as if they were vec4s in opengl (each channel ranging from 0 to 1). I…
Jakub Dóka
  • 2,477
  • 1
  • 7
  • 12
1
vote
1 answer

Object not moving according to mouse position when using shaders in raylib

I'm creating a few glowing particles in raylib using shaders and the particles are supposed to move along with the mouse but when compiling it gets stuck to the bottom left corner and the particles dont move. How it Looks The c++ code #include…
kr3ypt0n
  • 23
  • 1
  • 4
1 2
3
11 12