Knowing I would need a render texture to draw on, in order to make a screen effect I simply started with the RayLib letterbox example. Which is a little ironic as I soon discovered that the approach I’m using doesn’t scale well, I’ve ended up limiting the windowed mode and render texture to quarter HD…
Category: 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….
Aiming at moving targets…
I ended up during my research finding quite a number of different articles on this problem, however in the main they boiled down to basically the same maths with variations. I have to be honest quadratic equations are a little beyond me, and unsurprisingly I wasn’t able to find a decent explanation of the (mathematical)…
Raylib, projecting 3D onto 2D handy for debugging
Manually projecting 3d coordinates onto the 2d screen can be useful as seen above to label objects (although you can do a similar thing with billboards), it can also be used to create a kind of 3d radar effect (think Elite) The maths behind this are fairly straight forward, a 4D vector (x,y,z,1) is multiplied…
Implementing a 3d GUI with raylib
While experimenting with the rather excellent Nuklear GUI, I remembered my experiments with “painting” on a 3d model using a 3d camera so decided to take things further…. First of all the model must be multi-textured, the best path for this is to use raylib’s GLTF loader. As the “screen” texture is replaced with a…
Animating sky with raylib
There are a number of ways to provide a sky scene with raylib, common solutions involve using either a sky dome, or a cubic map on a sky box. However when it comes to simple animating techniques (such as scrolling the texture) you’ll often see the texture moving in odd ways, typically if the clouds…
Shaders with raylib
While I’ve touched on “simple” lighting and the related fog shader, both of these are fairly complex to pick apart, so I’ve been meaning to do something to show how you can implement your own simple shader to do specific effects. Keeping things simple all the vert shader does is sends the frag shader the…
Creating a 64 bit executable with raylib on windows
When I discovered how easy it was to create a 64 bit executable in Linux for windows, I though great, this should help out a mate who is working with me on a project… poor guy is still struggling to escape from the windows eco system… Anyhow, I looked at a number of different projects…
Path finding on hex maps
Right from the get go, I’m going to point you at red blob games, specifically this article but have a look at the whole site as there are some great path finding articles too… In particular the various algorithms dealing with hex grids are comprehensive and easy to understand, Amit I salute you! If you’ve…
Raylib and Chipmunk2d
There are a number of options for 2d physics, and Chipmunk has been around for some time and is stable both in terms of reliability and its API, its written in C which is a bonus. Chipmunk has a number of useful utility functions to allow you to iterate through all of its various structures…