I wrote a raytracer and a rasteriser as part of my university course. The raytracer supported features such as indirect lighting, reflection, refraction, and a photon mapper capable of simulating the final positions of 60,000,000 photons in a few minutes (and quite a few GBs of RAM).824
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.536
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.806
Github pages is a very convenient way to host both personal websites, and project websites. Websites are linked to a git branch or repo, and update when pushed too. Github pages supports custom domains as well! Whilst Github Pages supports HTTPS for github.io websites, it does not support HTTPS when using a custom domain.375
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.txt55
It’s very hard to debug a crash when no stack traces are printed. It becomes a case of manually trying to find the error.
GET /foo/bar/ Doing something useful Error: Expected } near ;
ES6 promises doesn’t seem to offer the functionality to change this,
and bluebird has
on[Possibly]UnhandledRejection, which can only be
used if you don’t add a
.catch() case to the promise. There is no global
callback for a rejection unless it’s unhandled. To workaround this, we’re
going to need to override the method which runs the callbacks. This is a
little hacky, and relies on the library not changing - but it’s better than
First, if you haven’t already, install Bluebird.
Next, make a file somewhere (perhaps called bluebird.js) with this as its contents:
Alternatively you could just print reason.stack if it exists, however I prefer
a full crash whilst debugging. You could also make it possible for promises
to declare whether they should throw errors - similar to the
in Java - and print out the stack rather than crashing in that case.
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
The above allows you to use the push functions to emit particles. Here is an example of it in use:
Here is the cpp file:548
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.167
I use a dual monitor setup. For each monitor I have a panel, and each panel has a whisker menu. I found that the favourites section of each of these panels is not synchronised. To fix this, I wrote a simple script.
First, you have to decide which whisker config to keep.
The favourites menu is stored at the top of each file, like this:
Find the one you want to keep. From this point on,
whiskermenu-1.rc with the config you want to keep and
whiskermenu-9.rc with the one you want to ditch.
The script is as simple as this:
If you save that to /usr/local/bin/syncwhisker, then you can use “syncwhisker” in the terminal to keep your menus the same.162