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

Raylib strange character movement

In this code, I want the character to move across a maze like map. I drew the map using map array. I could finally make the character not move through the walls and stop behind walls. But the problem is sometimes the character stops in random place.…
0
votes
0 answers

Raylib too many DrawPixel calls causes most of them to not show up

When using the DrawPixel function if I use more than about 60000-80000 calls over half of the pixels stop showing up. I saw some post a long time ago that said there's a limit for draw calls but I can't find anything anymore. Here's the main bit of…
Irakli
  • 21
  • 5
0
votes
0 answers

Raylib loads the wrong texture

The program shows player texture for both the player and the hazard. Which is very strange, considering i have checked with debugger and createHazards creates hazards with the right texture(hazard texture). #include #include…
Hayk
  • 1
0
votes
1 answer

trouble drawing texture using DrawTexTurepro in Raylib c++ to centralise it

i tried drawing a texture but it didn't show anything: #include "raylib.h" #include "string" int main() { const int screenWidth = 800; const int screenHeight = 450; InitWindow(screenWidth, screenHeight, "Texture Location Example"); …
0
votes
0 answers

Raylib Library is not linking correctly in C++ project

When I compile with gcc -g -o main.exe -Wall -std=c++11 -I./include/ -L./lib main.cpp -o main.exe -lraylib I get these compiler errors C:\mingw-w64\bin/ld.exe: C:\Users\usr\AppData\Local\Temp\ccjms0zo.o: in function…
Alex
  • 1
  • 2
0
votes
2 answers

Is there a raylib function to hide the taskbar?

I've made some code that resizes the game window to fit the monitor upon running it, the only issue is that the taskbar is still visible. Most video games don't show that in full-screen. I have tried using raylib's built-in ToggleFullscreen()…
0
votes
0 answers

Illegal Exception 4, when compiling a C program (raylib + lua)

So, I have a program that will draw a window with some text and a background using raylib, and I'm trying to bind a C function to Lua, so that a user can change the title within a 'config.lua' script. The program compiles, but when I try to run, I…
Planebagel
  • 31
  • 3
0
votes
1 answer

Adding a folder to a project in Visual Studio

I added a folder called "MySamples" the the Examples project. However when I try and use the folder it says its not recognized. Ive tried cleaning/rebuiling the solution. I tried restarting VSstudio and reven restarting PC. How can I get Program.cs…
Ghoyos
  • 604
  • 2
  • 7
  • 18
0
votes
0 answers

First person camera, how to hold object in "hand"

I've been trying quite a some time to figure out, how to hold or show object in front of camera. I tried this code: Ray ray = GetMouseRay(GetMousePosition(), camera); DrawModel(model, Vector3Add(ray.position, ray.direction), 0.1f, WHITE); But that…
Zahon
  • 20
  • 4
0
votes
0 answers

Unable to launch two windows from two different threads

I am using RayLib and I have this code simply to create a window: void start_window(std::string windowName){ InitWindow(800, 450, windowName.c_str()); SetTargetFPS(60); rlFPCamera cam; cam.Setup(45,Vector3{ 1, 0, 0 }); …
Venelin
  • 2,905
  • 7
  • 53
  • 117
0
votes
0 answers

I Want to work with raylib using VS Code and C++, but when I try to Link the library it shows "undefined reference to function"

I downloaded a raylib repository and added it as a static library to my project folder, then I made a short test programm but when I tried to compile and link it, it showed "undefined reference to function". My Test Programm Main.cpp is: #include…
0
votes
1 answer

Simple Stretched Raylib Fullscreen Option?

The code for a simple Raylib program is listed below (based on the Raylib example shapes_logo_raylib). Running the program shows a version of the Raylib logo: a black square outline which fills about a third of the (800x450) window. It's not hard to…
user2023370
  • 10,488
  • 6
  • 50
  • 83
0
votes
0 answers

Raylib compile error "undefined reference to `__imp__wassert'"

So I downloaded raylib-4.2.0_win64_mingw-w64.zip and used some C VS Code template and changed somethings on the tasks.json tasks.json: { "version": "2.0.0", "tasks": [ { "label": "DEBUG-build", "command":…
Command17
  • 11
  • 1
0
votes
0 answers

Raylib unexpected numbers of collisions on elastic collision simulation

How can i fix ridicilous amounts of collision when i increase mass or speed? #include "raylib.h" #include #define screenWidth 800 #define screenHeight 450 Vector2 GetNewSpeeds(float mass1, float speed1, float mass2, float speed2) { …
Jagaro
  • 1
0
votes
0 answers

I am trying to compile my Raylib program using GCC and VCPKG on cmd but It does not recognise Raylib functions

I am compiling a simple screen demo for Raylib in c using gcc and VCPKG as packet manager. When I compile I get several errors suggesting that GCC does not detect the Raylib functions inside the code such as…
Saw
  • 115
  • 1
  • 16