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

How to make 3D triangle with thickness in Raylib

I can make a 3D triangle in Raylib, but now I want that triangle to have thickness. How can this be accomplished with Raylib? Here is code in C# that shows only one triangle with no thickness: using System; using Raylib_cs; using…
0
votes
0 answers

Constant expression error in C raylib while making falling sand game

Hello so i am working on a simple falling sand game and i am getting the constant expression expected error im compiling with tcc using tcc -o fallingsand.exe fallingsand.c world.c C:\raylib\raylib\src\raylib.rc.data -Os -std=c99 -Wall -Iextenal…
koukah
  • 69
  • 1
  • 6
0
votes
0 answers

Why does this C code cause erratic movement?

I am making a game where the character speeds up in the direction of the mouse when it is press. Along the +x +y to -x -y axis it works, but along the +x -y to -x +y axis it behaves erratically and then crashes with a floating point exception, like…
ARI FISHER
  • 343
  • 1
  • 13
0
votes
1 answer

How to display data of char to DrawText() in raylib? I am stuck

I am making simple game of guessing a verse in the Bible. What makes me confuse is when using DrawText(). It says it should string, containing %s in the inside, but my data is char, so it uses %c, instead of %s. So, I try to use while loop. But it…
0
votes
0 answers

(.bss+0x0): multiple definition of `player';

I am creating a game in ray lib and have a player header file with a struct of player to keep things organised. I get this error saying that there is multiple definition of the struct 'player'. Error: /usr/bin/ld: main.o:(.bss+0x0): multiple…
Shahroz
  • 49
  • 9
0
votes
1 answer

Functions in header file undefined

Im trying to make a Tilemap system in C using Raylib. My problem is that I walways get this error when trying to use a function from my Tilemap header file: undefined reference to 'Tilemap_Init' For some reason the structs work fine, but the…
Clemens U
  • 3
  • 1
  • 4
0
votes
0 answers

How do I properly link and compile raylib?

I am writing in C++ and using MinGW to compile. I copied and pasted this code from here into my raylib.cpp. #include "raylib.h" int main(void) { // Initialization …
Larson
  • 27
  • 4
0
votes
1 answer

Installation apk file on Android device, ADB part missing and Error

I try to build simple_game from templates to Android and install it on an Android device. But I have a problem with installation to Android devices, especially with the ADB part. Simple_game I use the manual to build at: Build manual but I have a…
user11086972
-1
votes
2 answers

Arguments to raylib function have incorrect texture, not able to borrow a reference

use raylib::prelude::*; fn main() { let (mut rl, thread) = raylib::init().size(640, 480).title("Hello, World").build(); while !rl.window_should_close() { let mut d = rl.begin_drawing(&thread); d.load_texture(&d,…
BARNOWL
  • 3,326
  • 10
  • 44
  • 80
-1
votes
0 answers

displaying a shader in raylib not working

I was trying to display a shader in raylib, but I just got a black screen. I created a render texture, shader object, set some shader uniforms locations and variables for them: Shader shader = LoadShader(0, TextFormat("src/shader.frag", 330)); int…
Sirox0
  • 1
  • 1
-1
votes
0 answers

If the raylib camera is used, only one player (rectangle) is showed on the top left corner

I want to addsplitscreen to my game and so I tried to use Camera2D, but now only one character (the blue one (it should be the left one)) is showed with the top left corner in the middle of the screen. Also I used ToggleFullScreen, because without…
-1
votes
1 answer

Point Texture/Image in the direction of the cursor in raylib c++

I'm am programing a simple game and I need a character/sprite to face the cursor at all times, is this possible with raylib and c++? Do I need any other tools? I tried treating the image as a Vector2d
-1
votes
1 answer

Problem compiling raylib program in code blocks

I am adding the raylib library in code blocks but I don't know what is going on, because I get this error: -------------- Build: Debug in teste (compiler: GNU GCC Compiler)--------------- gcc.exe -LC:\Users\tiago\Documents\raylib -o…
-2
votes
0 answers

The preLaunchTask 'build debug' terminated with exit code 3221225477

I am making pong in c++ using raylib but when I debug it, it throws this error The preLaunchTask 'build debug' terminated with exit code 3221225477.How do I fix this. This is my workspace This is the code: #include…
-2
votes
2 answers

error: 'ballPosition' undeclared (first use in this function)

I'm getting this problem where I get this error message; error: 'ballPosition' undeclared (first use in this function) This is my code #include"raylib.h" int main() { const int screenWidth = 800; const int screenHeight = 450; …
1 2 3
11
12