Cumulative matrix rotation

There are a number of advantages to keeping your accumulated orientation in a matrix rather than as Euler angles, however there are some that will throw there hands in the air with horror! “but think of the drift” they will say, and right enough if you rotate back and forth by exactly the same time…

Published
Categorised as raylib

Complete Template for Raylib

While there are some basic code templates included with raylib and they are of good quality, they still need integrating into whatever IDE or development system you’re using, if you just want to quickly try something out this can be a needless repetitive task… For this I have a project template that is all ready…

Published
Categorised as raylib

Painting on a 3d Mesh with Raylib

Recently a new example textures_mouse_painting was added to raylib, and I thought “that’s neat scribbling on a texture…. hmm….” wouldn’t it be cool to paint on a 3d model instead, while looking at models_mesh_picking, thinking “nah this is going to be too complicated”, I noticed it was using Vector3Barycenter “oooh…..” I thought! I seem to…

Published
Categorised as raylib

raylib Fog

When writing the raylib example shaders_basic_lighting, it occurred to me that taking it a little further and adding fog would be fairly straight forward. Fog effects have a long tradition in video games, initially as a way to limit view distance without things suddenly popping into existence. However one thing with fog that shouldn’t be…

Published
Categorised as raylib

Creating a simple game (part 3)

The series starts here Last time we saw how a player could be handled by using a very simple state machine, this time we pick up the pace and make things more interesting (and complex!) by implementing some aliens… Lets start by looking at the different states an alien can be in. am_Enter = 0,…

Published
Categorised as raylib

Creating a simple game (part 2)

The series starts here Now we have a solid base for our game, lets start of fairly simply by adding our players ship… typedef enum playerMode { pm_Playing = 0, pm_Explode, pm_GameOver We are using a very simple state machine to control how we handle our player, in conjunction with a simple frame counter, to…

Published
Categorised as raylib