Sunday, 17 May 2009

Sandy Game Development 2

As mentioned in a previous blog, Sandy 3D makes use of Actionscript. This was good for me as I’m use to Actionscript 2. Despite that though due to Wiiflash only using Actionscript 3, I had to use AS3 as well to program Sandy 3D with.  Though I’m not use to AS3 and it is quite a change to AS2 there are a lot of similarities so it wasn’t too much of a change however one crucial distinction is that with AS3 you always have to add event listeners for any event as events are all integrated into the same event handling architecture.  This means as long as the event listener is added all events from that event class will respond there eliminating the need for callback functions, making the coding shorter and more reusable.

Sandy 3D itself has its own classes, packages and functions. However I was having an issue with the collision detection. Sandy 3D does not have a particular system for collisions and suggest you incorporate an external physic engine called WOW. However after trying to use WOW I couldn’t seem to get it working with my models I therefore had to develop a make shift collision for the game which basically works on the distance between the airplane and the walls and the space in between the gaps of the walls. See diagram below for more details.


Diagram explans how the collision works in the game

No comments:

Post a Comment