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

How can I compile Raylib?

I'm new to C++ and libraries. Recently I've tried using Raylib. But I can't seem to fix the error below (I'm on a windows device): collect2.exe: error: ld returned 1 exit status PS C:\Users\idkbo\OneDrive\Masaüstü\NewScripts\clang\cpp\game> g++…
fsd
  • 1
  • 1
0
votes
0 answers

Call methods from classes from a vector of different classes

I'm using raylib to create some simple GUI elements, like Labels. Each class has a void draw() method. For each widget, draw() needs to be called in the window mainloop. This leads to numerous draw() calls. Instead of this, I'd like to define a…
Eoin
  • 1
0
votes
2 answers

Raylib c++ what is the type of colors?

So I am new to c++ and raylib and want to save a raylib color as a class attribute but I don't know how to. I tried using the auto keyword like this auto cellColor = WHITE; but then I get the following error error: non-static data member declared…
Ben
  • 3
  • 4
0
votes
0 answers

undefined reference errors in raylib

I'm trying to make a game with raylib. I included the library #include "raylib.h" and included its include and lib files in g++ g++ -o ./bin/execute -I ./include -L ./lib ./main.cpp but when i start using the raylib library, using an official…
aw1lt
  • 24
  • 1
  • 4
0
votes
0 answers

Ray4Laz (raylib bindings) and rendering to Lazarus TOpenGLControl component

I would like to be able to render using raylib with the Ray4Laz .dll bindings and outputting renders to a Lazarus TOpenGLControl, but it is giving an access violation error. I can't even load up a texture with the library and render that without it…
0
votes
0 answers

Thread Sorting and Rendering

I am trying to make one of the sorting algorithm visualisations with rectangles in raylib. In my while (!WindowShouldClose()) loop, I am not sure how to thread the sorting algorithm. Here is how it looks: std::vector rand_arr; for (int…
0
votes
1 answer

Build Errors with Raylib

So I was trying to build raylib from scratch so I can use it in vs code and followed the instruction on how to build it according to the wiki, but gives me multiple errors, I have Mingw Installed, I downloaded the raylib project from both the…
Jacket
  • 33
  • 3
0
votes
0 answers

Need to find previous position of rectangle in raylib(c++)

I am trying to make a tron style game and I need a help finding the previous position of a rectangle(my player) and drawing over it another reactangle(the light trail).The code i wrote dose something like that but dose not work how i want it to. Te…
0
votes
1 answer

c# raylib collision, could not convert

I'm trying to get my collision detection to work. I'm new to programming and am just testing some stuff out. The problem I'm getting is when I'm putting in the two different rectangles that are supposed to detect collisions with each other. I've…
Darre
  • 21
  • 2
0
votes
1 answer

How to upload program .exe with raylib.h library so user could use it without downloading raylib directly?

How to upload program .exe with raylib.h library so user could use it without downloading raylib directly? I made a game using raylib.h now I want to send a game to my friend so he could play but he can't open it if I just send .exe file(he don't…
0
votes
1 answer

Double-Pendulum Equation Bug

I have been making a double-pendulum simulator in C++ using Raylib and I have finished everything other than correctly implementing the equations. When doing so, however, no matter what I try, I can't seem to figure out why my implementation of the…
Cr3 D
  • 153
  • 6
0
votes
1 answer

How to update the screen/re-draw screen in Raylib?

As a way to learn C++ I wanted to make a double pendulum simulation using a graphics framework so I chose Raylib because its the only framework I need. So far I have been able to draw a double pendulum and I am able to modify the angle so that…
Cr3 D
  • 153
  • 6
0
votes
0 answers

I add Struct Pointer inside the vector and Struct Value has been changed

I'm using raylib to make a little game. and here is the problem. Struct Icon has Loc Struct that has two integer value. When i put the Struct, Icon as a Pointer into Icons vector. value has been changed. here is the capture of debuging. and here…
Roharui
  • 100
  • 7
0
votes
1 answer

DrawTextEx doesn't display unicode characters

I'm trying to display a string, which contains Cyrillic characters using raylib. So I load a font with codepoints like so: int codepoints[512] = { 0 }; for (int i = 0; i < 95; i++) codepoints[i] = 32 + i; for (int i = 0; i < 255; i++) codepoints[96…
Dmitriy
  • 1,852
  • 4
  • 15
  • 33
0
votes
1 answer

Gitpod with C++ and Raylib

I like to use Gitpod and use for almost all of my projects. I start learning Raylib and would like to use Gitpod to in those projects. I already tried using this template (VS Code based):…
Flavio Silva
  • 95
  • 1
  • 8