PhysFS and raylib

PhysFS is a great library to allow you to use various types of archives as if they were part of a common filesystem. You can even use it with archives embedded in your executable, to make a complete ready to run executable, you know how it is, there is always someone out there that fails…

Published
Categorised as raylib

Using libmpeg2 with RayLib

Alas there isn’t a simple PlayVideo function in RayLib (it’s far from a simple task). While I did find a simple single header mpg1 player, I couldn’t seem to get too much out of it… In the end I found the libmpeg2 library to work quite well. The code to accompany this post (below) started…

Published
Categorised as raylib

2D Spotlight shader with RayLib

My initial thought for this was just to use simple alpha blending, while this did work (with caveats) I wasn’t really satisfied with it, so I decided to look at implementing it with a shader… In the end this was much simpler than I expected – it almost wrote itself and nearly worked perfect first…

Published
Categorised as raylib

Sprite Sheets with RayLib

RayLib has a decent set of functions for rendering textures and as such it makes the task of rendering an animated sprite from a sprite sheet fairly straight forward, however people are at all sorts of levels so I think its still worth while going over one possible solution. As a quick side tip, there…

Published
Categorised as raylib

Using RayLib with an ECS

While it’s very common to have arrays or some kind of list of entities in a game, this isn’t the only way to organize your game data. In order to illuminate some of the techniques involved, I’ve knocked together a basic asteroids type game. It will be useful to refer to this code while you…

Published
Categorised as raylib

Aiming at 3d moving targets

Looking at the previous posts algorithm I realized that as it was time and vector dependent it should be very easy to get it working in 3d, and indeed it was very easy! you can grab the code for it here….

Published
Categorised as raylib