My AssetStore Link

Unity Store Link - Click to see all the Song's work that has been put on Unity AssetStore

Friday, 30 September 2011

PathFinder (Update)

It's been a hectic week. Didn't quite manage to focus on the thing I really wanted to do. 

But anyhow I manged to make some break through. I have optimised the my A* algorithm to a very acceptable speed. A rough average estimation shows that at worse case, it's able to search through around 400 nodes at 1ms. A performance I'm quite happy with. Not quite the "blazing speed" compared to the top unity path-finding pacakge out there but it's certainly powerful enough to meet any requirement of real time game without slowing down the game play.

Beside that, I've also managed to get it working with terrain with varied height. As well as implement a faster and more light-weight auto node generatior. So here's a build for showcase purpose, or bragging right. :)

So I've been working on both path-finding and TDTK v1.2 lately since the next addition of TDTK is gonna need path-finding. So next thing to do would be getting this optimized algorithm running within the frame work of TDTK.

Tuesday, 20 September 2011

Annoucing TDTK v1.2 (WIP and Coming Soon)

So it's official, I'm working on the next update and improvement of the TDTK. There will be one an only one addition in the next update. But boy it's a biggie and it comes with one of my favourite element of a TD game. Well I don't know if there's one official term for it but I'll call it open-field gameplay/mode.

Yes one addition in the update doesn't sound a lot but this addition will allow a whole lot more possibility compare to version1.1. Which to be honest, is a bit more technical and is much less exciting.

The open-field gameplay, simply put, the creeps don't follow a fixed path on this one and the player is allowed to build on the active walkable area. In other words, other than build the right tower at the right place the player will also need to plan and build a maze. I guess the idea is shown pretty clear in the screenie above. The player builds a formation of towers in a enclosed field. The creeps will find a way to get across the field to get to the other end. In this case, travel in the path marked by dots from green to red. The placement of tower is still bound by a grid system obviously, as in previous implementation.

Yes this will required path-finding. I have put the grid-based A* path-finding I've done into work on this one. Worry not setting the grid and path-finding to work in this one will  require very minimal effort. If anything it is easier than setting up a fixed-path for the creep using waypoints.

But it's still very early in the development process. So regrettably I don't have too many things to show at this point. But it's in the pipeline and it will be available in the near future.

Friday, 16 September 2011


Right, following the lost of all RTS-X source code, I'm back to square one with anything everything I ever done with path-finding. Despite the fact that the one I have before was not very robust, or performance friendly, or flexible in different terrain.

Anyhow I have tried my hand at A* path-finding again. I plan to put it in TDTK for open field tower deployment mode. Figure I would need it in rebuilding RTS-X as well. Only this time I'll do it properly and make a complete path-finding project that would be useful in a variety of other future project I might have. Or at least that's the plan...

So this is what I manage so far:
  • auto grid-graph generator on the terrain.
  • height-consideration for connecting neighbouring node.
  • somewhat optimised standard A* path-finding algorithm.
  • post searching path-smoothing.

The performance for this one is not perfect but it's a big improvement from my last attempt some months ago. At least it works alright in this simple demo with 5 agents searching simultaneously without noticeable drop in the framerate. As seen in the image below.

Searched path (start from green dots to red dots) for five agents in blue color
The path seraching involves node with different height doesn't quite work yet, especially when the path smoothing comes in. But the path smoothing works just fine. So instead of going through all the nodes in a path like being shown in the image above which make the grid-based path very obvious, the agent only need to traverse through minimal number of path. Hence a more natural path. Just like the image below, a big improvement indeed!

Path smoothing which reslut in much fewer node to go through in each path.
So the next plan would be more optimization to cut down the processing time and get the height difference of the grid to work. I might look into navigation mesh implementation. Something that sound brilliant in theory! But to be honest I myself have been struggle to derive it's implementation from all the material I've look into. This will be interesting...

Monday, 5 September 2011

TDTK v1.1

Finally I feel v1.1 is polished enough to be released. So here's a list of the major updates:
  • added GUI-elements based UI
  • added new tower deployment scheme
  • added scene transition facility
  • revamp code logic flow to be more orgainised. Require less input from user when putting a scene together
  • revamp some of the script configurable parameters to make configuration more intuitive and less error-prone
  • optimizations and bug fixes
  • added comment on some ofthe script explaining the vital logic flow
  • added untested code block for touch input

With it a more comprehensive demo contain 4 playable levels. Please excuse the over the top sound effect, I have to make do with limited asset at my disposal. As well as the unpolished or possibly unbalanced gameplay. I believe a better level designer can surely do a better job than me, I've only spent minimal amount of time to set it up. But yes everything in the demo is included in the package.

As always it is now available n Unity AssetStore for $65 (similar to v1.0). Feel free to contact me to make a direct purchase at a discount price of $60.