Kah Shiu Chong

A graduate in Physics, acquainted with Actionscript 2.0 as a introduction to programming and got hooked ever since. Currently serving as instructor in University College of Technology and Innovation, Malaysia.

- Website:kahshiu.wordpress.com/

- How to Detect When an Object Has Been Circled By a GestureYou're never too old for a game of Spot the Difference - I remember playing it as a kid, and I no...You're never too old for a game of Spot the Difference - I remember playing it as a kid, and I now find my wife still plays it occasionally! In this tutorial, we'll look at how to detect when a ring has been drawn around an object, with an algorithm that could be used with mouse, stylus, or touchscreen input.Read More…
- Collision Detection Using the Separating Axis TheoremThe Separating Axis Theorem is often used to check for collisions between two simple polygons, or...The Separating Axis Theorem is often used to check for collisions between two simple polygons, or between a polygon and a circle. As with all algorithms, it has its strengths and its weaknesses. In this tutorial, we'll go over the math behind the theorem, and show how it can be used in game development with some sample code and demos.Read More…
- The Math and ActionScript of Curves: Gradients and NormalsWe've tackled drawing curves, and finding their quadratic and cubic roots, as well as handy appli...We've tackled drawing curves, and finding their quadratic and cubic roots, as well as handy applications for using quadratic roots within games. Now, as promised, we'll look at applications for finding cubic roots, as well as curves' gradients and normals, like making objects bounce off curved surfaces. Let's go!Read More…
- The Math and ActionScript of Curves: RootsIn the first tutorial of this series, we took a look at drawing curves using equations and AS3. N...In the first tutorial of this series, we took a look at drawing curves using equations and AS3. Now, we're going to tackle solving those equations to find the roots of a curve - that is, the places where the curve crosses a given straight line. We can use this to predict collisions with curved surfaces, and to avoid "tunnelling" in Flash games.Read More…
- The Math and ActionScript of Curves: Drawing Quadratic and Cubic CurvesWe see lines used in a lot of scenarios. Curves are also used, although perhaps not as frequently...We see lines used in a lot of scenarios. Curves are also used, although perhaps not as frequently - but that doesn't undermine their importance! In this tutorial we shall take a closer look at curves, particularly the quadratic and cubic curve, along with some of their commonly used mathematical features.Read More…
- Pixel-Level Collision Detection Based on Pixel ColorsIn this tutorial, I'll follow the approach suggested by Richard Davey (Thanks, Richard!), and use...In this tutorial, I'll follow the approach suggested by Richard Davey (Thanks, Richard!), and used by him and others, in detecting collisions between bitmaps with a subtle modification. I'll also compare performance between various approaches of bitmap collision detection using Grant Skinner's PerformanceTest harness.Read More…
- Predicting Collision Points With Math in AS3In my previous tutorial about collision detection between a circle and a line, I covered projecti...In my previous tutorial about collision detection between a circle and a line, I covered projection on a line using the dot product of a vector. In this tutorial, we shall look at the perpendicular dot product and use it to predict the point of intersection for two lines.Read More…
- Starling Particle Effects for Stage3D Shooter GamesI'm sure Stage3D is not foreign to most readers; it's the new API that gives AS3 programmers acce...I'm sure Stage3D is not foreign to most readers; it's the new API that gives AS3 programmers access to the GPU. However, coding against opcodes in Stage3D may not be everyone's preferred choice, so it's fortunate that there's a shortcut: Starling, a library developed to encapsulate this low level programming to make it much easier. And along with Starling comes its particle effects extension. In this tutorial, we'll check out the particle systems of this framework, and see its applications applied to a shoot-'em-up game.Read More…
- Pixel-Level Collision Detection for Transformed GraphicsIn the previous tutorial, we went through the basics of pixel-level collision detection. In this ...In the previous tutorial, we went through the basics of pixel-level collision detection. In this tutorial, we shall explore the use of matrices in better defining the area of interest - very useful for graphics that have been rotated, translated, or skewed.Read More…
- Simple Harmonic Motion and Its Applications in Games - Tuts+ PremiumPremium members: here's this week's tutorial. Simple harmonic motion is a type of movement common...Premium members: here's this week's tutorial. Simple harmonic motion is a type of movement commonly used to describe pendulums and springs. In this tutorial, you'll learn the concepts behind this type of motion, and understand the many different ways you can apply this in your games: from an animated health warning, to the motion of attacking enemy ships.Read More…
- Understanding Affine Transformations With Matrix MathematicsInspired by Prof. Wildberger in his lecture series on linear algebra, I intend to implement his ...Inspired by Prof. Wildberger in his lecture series on linear algebra, I intend to implement his mathematical ideas with Flash. We shall not delve into the mathematical manipulation of matrices through linear algebra: just through vectors. This understanding, although diluting the elegance of linear algebra, is enough to launch us into some interesting possibilities of 2x2 matrix manipulation. In particular, we'll use it to apply various shearing, skewing, flipping, and scaling effects to images at runtime.Read More…
- Pixel-Level Collision DetectionUp until now, our collision detection methods have been mathematically based. Although this is h...Up until now, our collision detection methods have been mathematically based. Although this is helpful, there are cases where the mathematical approach is just not worth it, such as with an irregular, organic shape - the computations required are too complex and expensive to justify. Instead, we can check each individual pixel of the shapes. This is also an expensive approach, but it can at least be optimised.Read More…