Monday, May 26, 2008

Get back to work, you slacker!

Alrighty, it's time to get back to it!

So I've got the "encounter areas" implemented and loading from the level file and I was thinking about how I was going to calculate whether the player is in one of the zones available to each room... and I came to the conclusion that calculating that on the fly using the encounter layer as a reference tool isn't really efficient. So in addition to the normal camera bounds calculation that I do on entering a room (to keep the camera inside the level at all times) I draw a little 'encounter tile layer' for the current room as well. So now checking to see if the player is in an encounter area (and which one it is) is a simple one line procedure!

Now I just gotta get the whole thing properly debugged... 'cause somewhere along the line I must've made a wee mistake since the whole thing doesn't do jack right now... so far for hard work I guess...

The theory is pretty sound still... just gotta work out the kinks :)

Anyway, I'll go back to weekend updates again from this point, so stay tuned!

No comments: