Dynamically Slicing Shapes
Just this morning I finished up a small open source project, along with a huge article at gamedev.tutsplus. The open source project is an implementation of Sutherland-Hodgman clipping which can be used...
View ArticleBuoyancy, Rigid Bodies and Water Surface
I’ve spent the last couple weeks researching eigenvalue decomposition and solving cubic polynomials in order to simulate a liquid surface and polyhedral buoyancy! I gave a lecture about this topic at...
View ArticleGJK: 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...
View ArticleDeriving 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...
View ArticleSane 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...
View ArticleProtected: Q/A Interview: John Edwards – thatgamecompany
This content is password protected. To view it please enter your password below: Password: Share
View ArticleNearly Geodesic Sphere – Mesh Creation
This post will let me store some useful code and possibly share it with others. I had originally found this wonderful explanation on stack overflow on how to generate triangles in a super simple manner...
View ArticleCircular Linked Lists and Branching
Since linked lists are such an essential topic I’ve taken some extra care to learn efficient ways of using them. The simplest kind of linked list to conceptualize is the singly linked list. There are...
View ArticleInteractive Cubic Bezier Splines
Cubic Bezier splines look rather beautiful. Splines in general look great and are super useful for all sorts of cool stuff. Creating splines usually involves defining some control points and moving...
View ArticleParsing C Style Expressions
Turns out that constructing a hand-written C-style parser has a few parts that were very difficult for me. The first thing was realizing that Backus Naur Form (BNF) largely sucks if you want to...
View ArticleFreelist Concept
A freelist is a way of retrieving some kind of resource in an efficient manner. Usually a freelist is used when a memory allocation is needed, but searching for a free block should be fast. Freelists...
View ArticleThe Concept of Polymorphism
For a while I thought of many computer science terms as useless hype. For example, as said by Jon Blow in one of his recent videos, some terms can be vague or hard to recollect. Buzzwords....
View ArticleA Star
Recently I’ve found a nice piece of pseudo code for implementing A Star after searching through a few lesser or incorrect pseudo code passages:clear open and closed let s be start node let e be end...
View ArticleCircular Orbits | Planetary Motion | NBody Simulation
I took a few hours yesterday to start on a simulation for a job application. Part of the simulation involves trying to figure out how to create stable nbody orbits, at least stable for some amount of...
View ArticleGood If Statements – Self Documenting Code
Here’s a quick trick for documenting those pesky if-statements, especially when littered with complicated mathematics. Here’s an example from Timothy Master’s “Pragmatic Neural Network Recipes in C++”...
View ArticlePreprocessed Strings for Asset IDs
Mick West posted up on his site a really good overview of some different methods for hashing string ids and gave good motivation for optimizing this area early on in a project. Please do review his...
View ArticleEssentials of Software Engineering – With a Game Programming Focus
I’ve been commissioned to write a big document about what I think it means, and what is necessary, to become a good software engineer! If anyone finds the document interesting please do email me (email...
View ArticleTexture Atlases
Texture atlases for 2D games is a great optimization for batching together tons of different sprites (especially quads) with a very few number of draw calls. Making them is a pain. For pixel art or...
View Article2D Collision Detection Library – tinyc2
Collision detection is pretty hard. Making 2D games is pretty fun. Wouldn’t it be nice to make a cool 2D game without fiddly around forever with collisions? With the single-file C header library tinyc2...
View ArticleGame Localization and UTF-8
After some research I have decided a pretty good way to localize your game is to store all text in text files, in UTF-8 format. UTF-8 is super widely used and 100% backwards compatible with ASCII. Also...
View Article