Python has some nice tools to enable to load and save objects, in particular to a json file. and we have all our levels loaded. In this case its a grid of cells, each cell potentially holding 3 layers. The bottom layer is for walkable tiles and crate targets – this puzzle game has us…
Category: raylib
Python and raylib – closer look at 2D
Looking closer at raylib’s 2d capabilities let get some stuff set up A small “Enum” class allows us to create a simple state machine this will help up keep track of what is happening with our player character. cutting the “sprites” that I want out of an image, if fairly straight forward Notice that once…
Python and raylib – a 3d template
Last time we looked at a minimal example to provide a window displaying 2d text… Before more fully exploring raylib’s 2D capabilities, we’re going to have a quick look at a minimal 3d example! Lets just look at the new bits…. Using the ffi module we can create a camera structure, now you guessed it…
Python and raylib – great for beginners
When I was looking around for an environment to teach programming, I thought wouldn’t it be great if I could teach with raylib, however as much as I like C for all sorts of reasons, it can be a little daunting at first, especially if for example you’ve only coded with scratch before. Enter python…
A simple maze creation algorithm ( C99 and raylib )
There are a number of different ways you can create a maze, often each algorithm will produce a maze with specific properties. The main features of the algorithm I’m going to describe aside from the fact its simple, is that the maze is both open (any point can be reached from any other) and that…
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…
Looking again at compiling a Windows Raylib app
Its become clear to me that there is some considerable misunderstanding about using the Windows Subsystem for Linux (WSL) WSL is soely used for the compiler tools, you need only the command line tools. There are NO runtime dependencies on WSL – your application will work on systems that don’t have WSL installed. While trying…
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…
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…
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…