Unaccordingly to my plan I spent yesterday rewriting my shadow casting routines. What I need is a frustum, or flashlight type of light source. Before, I had solved this by first drawing a full circle onto which I drew masking triangles, carving out the frustum pie. This mask was very expensive to draw (imagine a […]
Continue Reading...
Next post
Previous post
Hexagons have always fascinated me, they appear everywhere, in architecture, computer games and more curiously; this rather symmetrical structure emerge in a lot of places naturally. Snow crystal: Bee hive: Civilization V: Google on hexagon and you shall be surprised of all its appearances. Anyway, I’ve never familiarized myself closer to those mystical shapes other […]
Continue Reading...
Next post
Previous post
Here is the source code for an AS3 vector 2d class I wrote (Vec2.as and Vec2Const.as), feel free to use it and link back if you like it. Here are some features: Implemented for most operations, add, sub, div, mul, scale, dot, normalize, cross, length, distance, rotation, spinor, lerp, slerp, reflection etc Separation of read […]
Continue Reading...
Next post
Previous post
When I wrote the Playchilla Physics Engine last summer I needed a broad phase algorithm to reduce the number of collisions to check. There are several ways to do this using spatial partitioning for example Grids, Spatial Hashing, Trees and Sweep and Prune. After reviewing them I decided to go with something called Spatial Hashing […]
Continue Reading...
Next post
Previous post
As3 is lacking a powerful const keyword, this post will show a few tricks to simulate const. Anyone who has worked with C++ has encountered the keyword ‘const’. This can be very confusing at first, but once you get a hang of it you will understand how powerful it’s, and have trouble living without it. […]
Continue Reading...
Next post
Previous post