Monday, February 25, 2013

Presentation Time

Last week was all over the place. Travel down and back kinda took it out of me, however the gala event was a lot of fun. Met a lot of people, old Champlain grads as well as some of the graduates from our own year which was a pleasant surprise.

Came back, buckled down and really started to think about my rendering issues at hand. The really nice transformation animations that i want to do (moving, scaling objects on the screen) is too expensive on mobile devices. I began to dig into how bitmap objects work and have integrated it successfully into my background manager. Which means more particles!

However it will not work for my transition stuff :(. So why is that? Well, with using bitmap data objects, instead of adding all of my movieclips (those things you see on screen, the buttons and what not) directly to the stage where they are rendered, they are instead pushed into a bitmap data object and then rendered as a single bit map on screen. This bitmap is then redrawn every frame.

This is pretty cost efficient. It takes the same amount of time to redraw the entire screen as it does with redrawing a portion of it. The problem though, is that when objects are drawn into the bitmap I lose all ability to communicate with them because the entire thing is one flat image, not individual parts. In this way i cant tell the difference between two different buttons the player could click on.

This leaves me with two choices:

1. Work around this issue by doing something fancy. i.e. check player mouse position, compare that to where the button should be within the bitmap being drawn, if they are the same then I know the player clicked on it.

or.

2. Simply cut out that the transformation kind of animation I was doing.

And right now, with basically four days to go and a desperate need to get a presentation working, I chose door number two.

No comments:

Post a Comment