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

how to display an image from an array using raylib

I want to display a 28 x 28 grayscale image using raylib. I could not find documentation on how to do this from an array. Most examples show how to do this from a pre-formated image (png, jpeg, etc). I looked at the cheatsheet, but most of the…
Hackerman
  • 37
  • 7
1
vote
1 answer

Is there a raylib function for c that can get one value from a Vector3

I am trying to get the y value of a Vector3 (the camera), and i have looked at the documentation and haven't found a function to get a single value from the Vector3. I have tried using it like a list, but that obviously doesn't work. I have found…
justtab
  • 23
  • 4
1
vote
2 answers

How to mirror one axis in raylib?

Change in coordinate system I am creating a game using the raylib library in c++. By default, raylib's coordinate system (top) origin is at the top-left corner of the screen with the positive x-direction towards the right and the positive…
Will s
  • 11
  • 2
1
vote
1 answer

Rotating rectangle with collisions

So currently im making a game in raylib library in C I was expecting to rotate the rectangle but what really did happen the rectangle was being rotated using rectanglepro function but collision were'nt defined on it so it failed. I am using the…
1
vote
0 answers

How to disable the Debugging Console of Raylib, without disabling also the other outputs?

Sometimes I want to print the value of a variable (or something else) in the console with printf. The problem is that, when compiling the C-Programm with GCC and adding the flags "-Wl,--subsystem,windows", not only Raylib prints are disabled but…
Flori
  • 37
  • 2
1
vote
0 answers

Using a pointer to a hashmap

I'm working on a game engine. I have a loading class that loads every single texture, audio, and music file before the game starts up into a shared ptr that goes into a hashmap.Specific datatype: std::unordered_map
1
vote
1 answer

Program sees no assets because of incorrect executable context

I have a specific problem with compiling my program on a Mac. At this point everything is good with on a Windows. So I'm sure that the problem is not inside the code, it is a platform problem only. What I use: JetBrains CLion IDE C++…
Nick_Rimer
  • 191
  • 1
  • 9
1
vote
0 answers

WGL: OpenGL profile requested but WGL_ARB_create_context_profile is unavailable

I'm using C# in Visual Studio 2017, I'm trying to work with Raylib 3.0. This is my entire code: using Raylib_cs; namespace Raylib0 { static class Program { public static void Main() { Raylib.InitWindow(160, 90,…
Mel 2L
  • 11
  • 2
1
vote
1 answer

(C++) Variables in header warned as unused even though they definitely are

Not an emergency because the code still works, I'm mainly just curious. I'm using raylib to make an RPG. I wrote a function that changes the displayed rotational sprite depending on the last direction the player moved. If you're unfamiliar with…
WidePirate
  • 13
  • 3
1
vote
1 answer

Raylib 2D & Go - Do something when a collision ends

new to Raylib and trying to create a Super Mario clone using Go. I am using rl.CheckCollisionRecs to detect collision between the player and a pipe object, which is using the AABB collision method to detect if a player is hitting the X or Y axis…
1
vote
1 answer

glsl fractal shader for raylib not working correctly

https://github.com/bananaboy139/fractal/tree/OpenGL-shader https://github.com/bananaboy139/fractal/blob/OpenGL-shader/images/2.png?raw=true this is the original image I made with…
Bananaboy
  • 11
  • 2
1
vote
0 answers

Error while importing raylib python library

I am trying to install raylib on macOS M1. I tried pip3 install raylib and also brew install raylib, but both installed succesfully but when i import raylib it shows me this error: Traceback (most recent call last): File…
1
vote
0 answers

Segmentation fault using MeasureTextEx()

I ran into a problem while using Measuretext(). My goal is to ru #include int main() { Font font=GetFontDefault(); const char *text="Hello world!"; float fontSize=10.f; float spacing=10.f; Vector2 textSize; …
1
vote
1 answer

How to check if ball colides with edge of window in c++ with raylib

i am new to raylib and wanted to make a little 2d ball thing, and i don't know how to stop the sprite from going of the screen, it only works with 2 edges and not the others, would anybody please help? My C++ file: game.cpp: #include int…
1
vote
0 answers

go build fails with linker error when trying to compile a raylib project

I tried reinstalling llvm, go, clang, xcode but nothing. Googling it doesn't seem to bring anything up either. The code: package main import "github.com/gen2brain/raylib-go/raylib" func main() { rl.InitWindow(800, 450, "raylib [core] example -…
Dara
  • 11
  • 1
1
2
3
11 12