Category Archives: Programming

Game Math: Trigonometry Basics – Tangent, Triangles, And Cannonballs

本文之中文翻譯在此 Prerequisite Trignometry Basics – Sine & Cosine Overview In the previous tutorial, we have learned about two basic trigonometric functions: sine & cosine. This time, we are going to look at another basic trigonometric function: tangent. Together, these three … Continue reading

Posted in C#, Gamedev, Math, Programming, Unity | Leave a comment

Game Math: Trigonometry Basics – Sine & Cosine

本文之中文翻譯在此 Overview Trigonometry is a very essential building block to a huge portion of game math. That’s why I’ve chosen this topic for the first tutorial of my new Gamedev Tutorials series. Having a solid understanding of basic of trigonometry … Continue reading

Posted in Gamedev, Math, Programming | Tagged , , , , , | 9 Comments

Readable & Debuggable Multi-Condition Game Code

This post is part of my Game Programming Series. Over time, I have adopted several coding patterns for writing readable and debuggable multi-condition game code, which I systematically follow. By multi-condition code, I’m talking about code where certain final logic … Continue reading

Posted in Gamedev, Programming | 7 Comments

Game Math: Swing-Twist Interpolation (…Sterp?)

This post is part of my Game Math Series. Source files are on GitHub. Shortcut to sterp implementation. Shortcut to code used to generate animations in this post. An Alternative to Slerp Slerp, spherical linear interpolation, is an operation that … Continue reading

Posted in Gamedev, Math, Programming, Unity | 2 Comments

Unity Debug Draw Utility – Now with Shaded Styles

View post on imgur.com This post is part of my Game Programming Series. Complete source code for the debug draw utility and Unity scene for generating the demo animation above can be found on GitHub. Here is a shortcut to … Continue reading

Posted in C#, Gamedev, Programming, Shader, Unity | Leave a comment

Debug Draw with Cached Meshes & Vertex Shaders in Unity

This post is part of my Game Programming Series. Complete source code for the debug draw utility and Unity scene for generating the demo animation above can be found on GitHub. Here is a shortcut to the debug draw utility … Continue reading

Posted in C#, Gamedev, Programming, Shader, Unity | Leave a comment

Timeslicing Batched Algorithms in Games

This post is part of my Game Programming Series. The source files for generating the animations in this post are on GitHub. 本文之中文翻譯在此 (by Wayne Chen) Timeslicing is a very useful technique to improve the performance of batched algorithms (multiple … Continue reading

Posted in C/C++, Gamedev, Programming | Leave a comment

Game Math: Precise Control over Numeric Springing

This post is part of my Game Math Series. Source files are on GitHub Check out this post if you want to see more visual examples of numeric springing. Numeric springing is a very powerful tool for procedural animation. You … Continue reading

Posted in C/C++, Gamedev, Math | 9 Comments

Safe Scope-Based Instrumented Profiler

This post is part of my Game Programming Series. Let’s say we have an interface for an instrumented profiling library that looks like this: The argument you pass to BeginBlock is a custom block name for you to identify the … Continue reading

Posted in C/C++, Gamedev | 2 Comments

Scope-Based Resource Management (RAII)

This post is part of my Game Programming Series. It has been 4 months since I graduated from DigiPen and started working at Naughty Dog as a Game Programmer. Since then, I have been too lazy to write anything big … Continue reading

Posted in C/C++, Design Patterns, Gamedev | Leave a comment