Saturday, January 31, 2015

Exploring A* in Unity!

So I was introduced to Shattered Pixel Dungeon last week, and interestingly, it's not as addictive as I thought it'd be. It's great to spend a few turns playing it before bed or whilst on the can.

Pathfinding isn't something new, and I've actually coded A* in C++ years ago... not sure if it's still on the blog somewhere. But I was like.. yeah, pathfinding rules! Let's code it up in Unity! Plus I've not had a chance to play with the new UI in 4.6, so this was good fun.

The distance parameter, H, changes the results quite dramatically. Originally, I used the Manhattan Distance (I was following this tutorial) and while you get a solution, it was quite meh. Changing it to simply the distance between the selected node and target provided a much improved result.

Friday, January 09, 2015

Weather!

The weather this week has been craaazy! The earlier part of this week saw temperatures in the high 30C, and it was nigh impossible to sleep at night. I only have a ceiling fan, and with the poor circulation, it takes a long while to cool down. Some night I could only sleep probably after 2-3am >.<

Last night though, the temperature dropped crazily, and this evening, I actually found I really missed my jacket as it had dropped to 16 degrees C! The next week is forecasted to have very nice temperature and wet at the same time.