Hamaluik.com

Programming and art and math, oh my!

With modern hardware utilizing multiple cores, it can be highly advantageous to do as much parallel processing as possible. I think the most elegant way of doing this is to use thread pools which allocate tasks to a limited number of threads. Unfortunately, multi-threading support isn't fully implemented in Haxe—but it is on the neko and cpp targets, so I wrote a simple thread pool to take advantage of multi-threading on those platforms!

Read More

Continuing on from yesterday's post where I explored detecting discrete collisions using Minkowski differences, today I'm going to talk about detecting continuous collisions using Minkowski differences (again, focusing solely on axis-aligned bounding boxes). Continuous collision detection is essential in any game where you have fast-moving objects and/or low frame rates. It adds slightly more complexity to the discrete collision detection algorithm, but the advantages far outweigh the costs in this case!

Read More

Since I've started on an adventure to start creating my games with Haxe and OpenFL, I found myself in need of some collision detection. I don't really need anything as fancy or extensive as Nape, and although the HxCollision library is a pretty solid Separating Axis Theorem implementation, it doesn't deal with swept-collisions, which is a bit of an issue for games (without swept collisions, any lag spikes can easily cause objects to pass right through objects!).

With some simple requirements in mind, I started Googling, and came across a method of using Minkowski addition to detect collisions. It turns out this method is super fast and very easy to compute for axis-aligned bounding-boxes (AABBs), which is all I'm going to focus on for now. This point is also only going to focus on discrete detection (whether or not an AABB is penetrating another object, regardless of velocity). I'll do another post on using this method with swept collisions when I have that sorted out.

Read More

I recently discovered the Haxe language, which when combined with with OpenFL, can produce some pretty great things (for example, Papers, Please was developed with Haxe + OpenFL). I've also been reading about Unit Testing and Test Drive Development and how it can greatly improve not only the quality but also the efficiency of the code you write. This seemed like a perfect opportunity to learn some new things, so I've decided to start developing some games using TDD in Haxe!

Before I could do that, however, I had to figure out how to get MassiveUnit (munit) set up, which was a bit trickier than I was expecting. Hopefully this guide will help others who stumbled with the process!

Read More

I love LaTeX for typesetting all my documents. A lot of people don't understand why, but that's a discussion for another time. One thing I've always been hesitant to use LaTeX for is presentations - the main LaTeX package for making presentations is Beamer, and although it is extremely functional, I am firmly of the opinion that all the default themes are butt ugly and there are barely any other themes out there. Thankfully, Beamer themes are very easy to create from scratch!

Read More

Avidemux is a handy program for dealing with video files. It can even do batch operations easily enough — that is, if you can figure out how. The documentation for doing any sort of batch job is absolutely terrible. I have a few videos that have a few different audio tracks. Three, to be precise: Russian, English, and a third "unknown" one. Whenever I would play these, it would play them by default in Russian (I would have to manually change the audio track for each file), which is not helpful to me at all. I needed a way to batch change the default audio track (or even just strip the Russian out) for all the video files. Enter Avidemux.

Read More