Exception handling is an integral part of the D programming language. Naturally LDC, aiming to be a complying compiler, needs to provide it. Here I describe how exactly user code, generated LLVM IR, the unwinding library and the LDC runtime interact to make it all work – at least on x86 Linux.
Continue Reading »
Exception handling in LDC using LLVM
Compilers for the D programming language: DMD, GDC and LDC
Currently, users of the D programming language can essentially choose between two mature compilers: DMD and GDC. I’ve started helping with the development of a third, LDC, and think the first public alpha version can’t be far off. In this post, I’ll give a short overview of the compilers available and say a few words about LDC.
Continue Reading »
Game In A Day: PyDogs
Creating computer games is usually envisioned as a long and intricate process, requiring years of work by dedicated teams of professionals. Even in the open source world game projects often end up unfinished and abandoned after months of work have gone into them. The Game-in-a-Day events people have reported on during the last years defy that paradigm: during these sessions the main goal is to get things done and to get them done quickly.
This refreshing change from usual development practice along with it being a challenge as well as a good time with friends have made Game-in-a-Day events appealing enough for whole communities (edit: link removed, unfortunately dead by now) to have formed around them. Last October I decided to mail all my friends and host one myself.
Continue Reading »
MATLAB file access
Quite a while ago I was looking at ways to interface between MATLAB and a C++ program for a job at university. In the end I wrote a C++ wrapper for the C API to access MAT files which turned out to be quite useful. Since it’s small and easy to use, I decided to release it.
Continue Reading »
dynamic soft shadows in 2D
This implementation of dynamic shadows with soft edges in 2D using OpenGL was part of a game concept I experimented with. In the end I decided not to go ahead with the game, but as the shadowing itself was pretty fun to do and as the concepts (and possibly the code) can easily be used for other games, I will detail my work here.
I had just finished implementing hard-edged shadows for rectangles when I found a GameDev.net article by Orangy Tang, where a technique for rendering soft shadow edges is described. The article is very thorough and I ended up using most of the ideas described there. Instead of starting from scratch, I will only explain what was done differently.
But first, here’s an animation of the result in action:
Continue Reading »