# LIT (Lua Interpreted Triggers) – Starcraft: Brood War

Download LIT here In the past I frequented a website called StarEdit.net in order to learn how to make scenario files for the game Starcraft: Brood War (SCBW). The scenario files could be generated with an editor, and had a simple trigger system. A lot of fun can be had

# Memory Management

Any competent software engineer will have spent significant time working with low level memory management. Even though the operating system code is written for will often provide some kind of allocation and deallocation mechanism, application specific assumptions can be made to increase memory related performance. For example certain hardware doesn’t

# Distance Point to Line Segment

Understanding the dot product will enable one to come up with an algorithm to compute the distance between a point and line in two or three dimensions without much fuss. This is a math problem but discussion and focus is on writing a function to compute distance. Dot Product Intuition

# What is there to Hate about References?

I find most usage of references annoying cruft. Often the arguments I see or hear that are “pro-reference” make the same lame points that most of the internet makes: Pointers are dangerous Pointers are ambiguous and confusing NULL pointers lead to undefined behavior and crashes Just google “pointers and references”

# Cache Aware Components

Special thanks to Danny Frisbie for a nice discussion on the PODHandler implementation! Let me start off by saying that optimizations really only need to be applied to bottlenecks. In order to know where a bottleneck might occur (especially cache related ones) you’ll probably need some experience. The experience not need

# Sane Usage of Components and Entity Systems

With some discussion going in a previous article about how to actually implement some sort of component system for a game engine, without vague theory or dogma, a need for some higher level perspective was reached, and so this article arose. In general an aggregation model is often useful when

# Deriving OBB to OBB Intersection and Manifold Generation

The Oriented Bounding Box (OBB) is commonly used all over the place in terms of simulation and game logic. Although often times OBBs aren’t actually bounding anything, and really just represent an implicitly defined box. OBBs commonly come in 2D and 3D form, though there aren’t all that many resources

# Transposed Matrix Properties

Today I derived, geometrically, the following: $$(A * B)^{T} = C \\ C = B^{T} * A^{T} \label{eq1}$$ Listed on the wikipedia page without much a description (property number 3), this property hid from me for a good 24 hours and confused me. I had been working on creating

# GJK: Common Implementation Mistake

Thanks to some cool discussions with my friend Nathan Carlson I’ve learned a bit about GJK. There are two versions floating around in the computer science community, and one of them is much easier to implement than the other. I will assume readers have a basic understanding of the theory