Tuesday, February 28, 2012

Progress on the Drag and Drop Interface

Warning, mostly code design talk ahead.
I've been tinkering away at the Drag and Drop issue and I've designed a form of a solution. While I can't give any screen shots at the moment, I can at least explain the theory of the interface. The Drag and Drop system is split into 4 separate objects, a "Drag Manager", "Drag and Drop Object","Drag Target", "Drop Target". Drag and Drop Targets are properties of a "Drag and Drop Object" which is managed through the manager. The Target objects act as containers that can hold any graphic or button item  and behave as their own original type (such as a button), but also carry the dragging drop ability. The other important feature is to create cues for the player to understand the drag drop interface exists. When the player begins the drag the potential targets will stand out with a highlight. Once the drag is complete the highlights disappear.

If anyone has ever worked with flash, there is a native dragTarget feature for Movie Clip objects. However,  that pre-made solution isn't enough to deal with the craziness I require. When ever you use that feature, it glues an object to your mouse. I need to be able to take that object and make sure it is visible at the top most display layer, can access collisions from objects on other layers, and then become an entirely different object as soon as the player lets go.

I feel like I've gone a bit rambley with this explanation but it seems to be working so far. Tomorrow I should have something visible and work out the kinks.

No comments:

Post a Comment