Skip to main content

rubenwardy's blog

Posts

C++: Self-registering functions using macros for test libraries

Google’s C++ testing library has a nice syntax for registering tests, without needing to remember to add the tests to some central index. This article will show how to use macros to allow the creation of tests using only the following code:

Test(IntegerComparisonTest) {
    int a = 3;
    assert(a == 3);
}

Read more of "C++: Self-registering functions using macros for test libraries"

RimWorld: Create timelapse from Progress Renderer on Linux

Progress Renderer (Steam | GitHub) is a brilliant mod that takes a screenshot once a day, and dumps it into a folder.

The following bash script can be used to generate an mp4 timelapse of the screenshots. Simply specify a region to cut out of the screenshots, and some other parameters, and run the script in the working directory.

Read more of "RimWorld: Create timelapse from Progress Renderer on Linux"

Rubix: My Simple Kernel written in C for arm

During the second year of university, I created a kernel for the ARMv7 instruction set. I went above and beyond what was required on this project, achieving a clean design and features such as a blocked process queue, piping, kill, and a simple filesystem. This was my favourite coursework so far. I found it very interesting to learn about and implement the things that we take for granted as programmers.

I tried to stick to POSIX as much as possible, and stuck to the Linux method of having everything as either a file or process. Because pipes and standard in/out were both “files”, I was able to implement both popen and piping of the output of a process to another process.

Read more of "Rubix: My Simple Kernel written in C for arm"

The cover of "RVWP: Multiplayer Topdown Sandbox Game in C++"

RVWP: Multiplayer Topdown Sandbox Game in C++

For the last two years, I have been working on a very ambitious game. The game is a top-down sandbox with multiplayer support. I’m aiming towards a city-based game, where players can wander around a procedurally generated city. One of the main reasons I started creating this game is to learn about multiplayer networking at a low level - client-side prediction, server-side reconcilliation, cheat preventation, and reducing the visual effect of latency.

Read more of "RVWP: Multiplayer Topdown Sandbox Game in C++"

Mingw-w64 and CMake: unrecognised option -rdynamic on Ubuntu

I had an issue where CMake was failing on a compiler test with the following error:

error: unrecognized option '-rdynamic'

The problem was that CMake caches settings such as compiler flags in CMakeCache.txt, so you need to clear the cache when changing the platform. Do this by deleting CMakeFiles and CMakeCache.txt

Read more of "Mingw-w64 and CMake: unrecognised option -rdynamic on Ubuntu"

How to emit a single particle using SFML's Thor Particle System

Usecase: shells dropping in sync with firing, fake bullets, etc

You must use a particle emitter to create particles, however this doesn’t mean it’s impossible to create single particles on command. You can create a particle emitter which simply adds particles from a queue to the system

Read more of "How to emit a single particle using SFML's Thor Particle System"

Move private repos from Bitbucket to GitHub

Now that Github supports unlimited private repos in all plans, you might as well keep things all together (although definitely have backups elsewhere incase Github is DDOS’d again, dies or goes evil). Simply change “rubenwardy” to your username and “XXXX” to a personal access token with “repo” checked. Also make sure you have an SSH key for Github.

Read more of "Move private repos from Bitbucket to GitHub"