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
4
votes
0 answers

Using raylib for a game project

I'm having a problem with drawing my game map in Raylib. As far as I'm seeing the site's examples, everything is correct... However, when I run it, it doesn't show anything about the game, just the screen in the color I put (RAYWHITE). I'm trying to…
Mateus
  • 64
  • 4
4
votes
2 answers

How to add Raylib to VS code?

I am a beginner at c++ and I would like to use raylib with vscode instead of using notpad++. does anybody know how to add raylib to vscode.
josephi
  • 81
  • 1
  • 1
  • 5
3
votes
1 answer

How to trace a path with pixels in Raylib?

I am making a double pendulum simulator in Raylib and before I get into the deep physics behind how it works I wanted to finish creating the graphics for it. So far I created a window, made a double pendulum, and can rotate the pendulums however I…
Cr3 D
  • 153
  • 6
3
votes
1 answer

How do I link and compile Raylib on windows?

I have installed the raylib migw from the official source. The installation directory is C:\raylib\raylib. I have written the sample program from the website as follows. #include "raylib.h" int main(void){ const int screenWidth = 800; const…
2
votes
1 answer

SetWindowIcon error: must be in R8G8B8A8 pixel format - raylib c++

So I am trying to make a window icon for the game and when I load the icon.png image, it says this: WARNING: GLFW: Window icon image must be in R8G8B8A8 pixel format and here is my icon: Finally, here is the code snippet: Image icon =…
FunFox
  • 37
  • 6
2
votes
1 answer

Rotating a square to point at a Vector2 gets completely messed up at 0 degrees

This is the code that rotates the boat to follow the line. A joint is just a Vector2 on the line. To the left is 0 degrees. And as you can see, when the boat is going from 0 to 360 or vice versa degrees, it glitches out. float LookAt(Vector2…
BullEKorV
  • 23
  • 2
2
votes
1 answer

Method DrawRectanglePro() not rendering rectangle

I have been trying to test out raylib and I am trying to render rectangles at an angle, but I am unsure as to why they will not render. The method DrawRectangle() does work, despite DrawRectanglePro() not working. #include #include…
DAG3223
  • 27
  • 5
2
votes
1 answer

What standard libraries do I need to link to use Raylib with Windows and Clang?

I am trying to compile some C++ code with Clang; I am using Raylib. In an attempt to get things working, I have the basic window demo. All my Raylib header files are in a folder called "include" and my libraries are in a folder called "lib". After…
2
votes
1 answer

Compiling raylib for html5/wasm

I'm trying to compile raylib for html5, but I can't seem to run make properly. Running make PLATFORM=PLATFORM_WEB -B in raylib/src returns this: emcc -c rcore.c -Wall -D_DEFAULT_SOURCE -Wno-missing-braces -Werror=pointer-arith -fno-strict-aliasing…
mmxjohnson
  • 45
  • 6
2
votes
1 answer

cant compile raylib for web

I have been trying to compile my raylib game to web (following this tutorial https://github.com/raysan5/raylib/wiki/Working-for-Web-(HTML5) ) and i got stuck on this part: Before compiling raylib, make sure all paths to emscripten (EMSDK_PATH) and…
josephi
  • 81
  • 1
  • 1
  • 5
2
votes
1 answer

a problem with the raylib installation on linux

im using Peppermint 10 an ubuntu based distro so i did the following commands here and everything went well until this (the input) cmake -DBUILD_SHARED_LIBS=ON .. (the output) -- Testing if -Werror=pointer-arith can be used -- compiles --…
2
votes
1 answer

Question about Raylib - How to rotate a player around an x Axis?

I have a question about Raylib. I managed to move my player using Key_Down. But now, I want to change the direction of my player by using Key_Up, Key_Down, Key_Right and Key_Left. I have understand that I need to move my player around an X axis. I…
2
votes
1 answer

Extract FIELD names of a struct and put them in a slice of strings

I want to be able to extract the FIELD names (not the values) of a struct as strings, put them in a slice of strings and then use the names to print in a menu in Raylib (a graphics library for Go) elsewhere in a program. That way if I change the…
nicholasimon
  • 75
  • 1
  • 7
2
votes
2 answers

How to make a simple menu with C++ and Raylib?

Im a novice programmer and im trying to use the Raylib library in C++. But i cant get a simple Startmenu to work. Ive been trying to call void functions, used a switch and a simple if statement... How do i make a simple menu in raylib using switch…
svensson94
  • 21
  • 1
  • 2
2
votes
2 answers

Why does this code cause Windows Defender to go crazy and identify this code as a trojan called Ludicrouz.j

I'm working on a desktop app using a library called Raylib, for those of you who don't know what Raylib is, it's an open-source rendering API that is used to make games. By default, Raylib doesn't let you resize or maximize as a window. To get…
AR0106
  • 43
  • 7
1
2 3
11 12