Tuesday, June 23, 2015

Bought my First Unity3D Asset

A few days ago I bought my first asset. It is very good and I am very glad I did. I also got the benefit of buying it 50% off which is a nice Bonus!

I have a bunch/crowd/herd of Generic NPC rabbits that need to wander around my village from one POI(point of interest) to another. Stopping at each one for a time. I would also like them go around each to intimate there is size for these rabbits.

I had the POI system in the village all set up, but as my scene got more complicated I realized I needed to navigate around more and that created a dilemma for me. I could write my own A* algorithm I am sure (done it before after all), but there is more too it than that like avoiding each other etc. Well I should mention at this point that Unity does have a built in Navigation system. Only it is for the 3D and works in the X/Z planes and not the X/Y planes of the 2D system. Hmm, there are several work arounds I could do, but I simply did not want to do the work.

All I want is a simple Navigation system, that's all...

So I ended up on the asset store for some reason and lo and behold, there was a navigation 2D asset to buy. Here is the link:-
https://www.assetstore.unity3d.com/en/#!/content/14718

Poly|Nav is it's name by Gavalakis Vaggelis. Next up was to read some of the reviews and they looked good. Mentioned that it is simple to use, great! Now lets go check the forum to see if this is still being updated... This can be a sticking point for me as an asset that has been left to rust might not upgrade to 5.0 for example. However I was very pleased to see that there were current posts for questions and answers within the assets forum thread. Link here:-
http://forum.unity3d.com/threads/poly-nav-pathfinding-for-unity2d.224962/

This was great so I went to purchase it and it asked me if I wanted to download a 4.x version as it might not fully work on 5.0 Unity.. Dang, this could be a sticking point. So I posted into the assets thread, and I was shocked when 9 minutes later I had an answer saying it works fine. Woah! This guy is attentive. With that I felt so confident, as I could also see he was answering so many questions about this asset.

I bought it. Yup, it is now mine! I checked out his Demo which came with the asset then was wondering how to proceed. I imported the necessary bits into my game and then what? Hmmmm I wonder if there is a help or something.

Yes there was, in fact it is a PDF and is not very large. This PDF does have exactly what you need to get going, and then even become a super user. The asset is that easy to use... just what I needed. So I marked out the area that is navigable and then placed a few obstructions in the way.. This took me several minutes. Then to test my game I added the supplied test class (ClickToMove) to my rabbit. then I clicked around the screen and watched my rabbit glide along nicely. All good so far. I am now 10 minutes in. Yes, you read that correctly, 10 minutes in.

After 20 minutes total I had my generic rabbits wandering around the POIs I had set up. Fantastic. There a number of events you can subscribe too so you can control your game logic. Which is nice.

Finally I have expanded my NPC AIs now quite a bit, and they look pretty neat. In the end this asset saved me some good amount of time and for 15 bucks who can complain about that.

Good Luck in your asset buying :)
Da Voodoochief

No comments:

Post a Comment