Wednesday, 9 March 2011

Some Success

All has been quiet on the DragonfireSDK front for me recently, or so you might think looking at this blog.

If so, you may be right.

I've done a few bits. I've been breaking my game up into little pieces to make organisation a bit easier for myself. Although, it's made things a little bit difficult as I can't remember how it goes back together.

Let's say I've got my menu with 4 button objects, each of those buttons will have code to display it and code to execute when touched. Problem is, those code blocks need to be kept separate because the code executing after the touch will be code for a new page, which is a whole new element that needs breaking up into smaller chunks. Argh!

When I've finished the breaking down process I will post a blog showing how many different bits there are. I may be making this more difficult than it needs to be though. Only time will tell.

I've also been testing bits of code with varying degrees of success.

I have an object in my game that will move when the iPhone screen is touched and the finger is moved whilst touching the screen, your usual iPhone object really.

I have managed to get this working, my next challenge was to restrict the touch area to a line across the screen, a kind of invisible box, I have managed that also. Although if you drag your finger outside of the box the object still follows. I need my object constrained to the box and it also should only move across the screen on the X-axis.

More research needed. Hmmm...

No comments:

Post a Comment