Before I forget, here is how I’ve done the shadows for the new version of Shadowess. I realize that this blog post is not very detailed but rather should give you an idea of how shadow geometries can be generated. I may do a follow up with code in the future. My goal was to [...]
Continue Reading...
Previous post
As I was implementing the towers I needed them to aim and shoot on the anticipated position of an enemy, assuming they are moving linearly (no acceleration). This is because the bullets in my game are physics entities that won’t hit the enemy instantly but after some time as it travels towards the predicted interception [...]
Continue Reading...
Next post
Previous post
This Jul (Swedish for Christmas) I’m not only eating Julbord, Julfika, Julgröt and drinking Julöl (basically put ‘Jul’ before any word and there you go), I’m also doing some Julcoding. Some time ago I ported a c implementation of a Naiver-Stokes fluid simulation to AS3 and I thought I should share it. It’s all based [...]
Continue Reading...
Next post
Previous post
Randomness adds an extra flavor to games by injecting some unpredictability, something that can surprise the player. It also makes the game less mechanical and more organic. In the game prototype I posted earlier, bots always initialized their look directions to (1, 0). So every time a level starts all bots looks in this direction [...]
Continue Reading...
Next post
Previous post
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
For quite some time I have been thinking of adding some ray casting into the Spatial Hash. The Spatial Hash is used for broad phase culling, eliminating objects that can’t intersect with what we want to test. My former implementation only allowed tests against rectangles – when shooting a ray this might be very inefficient. [...]
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
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
During my summer holidays I spent some time to build a simple AS3 physics engine just to get a hang of how it works. Features Simultaneous motion – The Playchilla Physics Engine is simultaneous, meaning searches for the next collision and advances all entities to this point in time after which the collision is resolved. [...]
Continue Reading...
Next post
Previous post