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…
Category: 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…
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…
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…
Aligning a model with a terrain (raylib)
There are a number of reasons you may not wish to use a physics engine, but instead, use very simple collisions as it may well be all you need. This leaves you in a position where you might need to align a model to a terrain, for example you might have a character or especially…
Creating a simple game (part 5) finishing up.
The series starts here Finally I implemented am_Dive so you can compare it with your own implementation, there are many ways you can take the source forward. There is no settings screen for example, master volume and key bindings are just some of the things you can implement there, as well as moving the fullscreen…
Creating a simple game (part 4)
You can see the start of the series here Okay things really start hotting up now as we introduce shooting… Lets look at the states, no wait this time there isn’t any, just a simple structure typedef struct shot { bool isAlien; Vector3 pos; } shot; Each shot has a position and a flag so…
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,…
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…
raylib a novices guide for creating a simple game
First off its important to have a clear goal in mind… But before we get carried away, you need some prerequisites, first of all you need raylib installed and you should verify you can compile the examples and that they work. You need to have at least some exposure to programming in C, you should…