Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - bloodline

Pages: [1]
1
Code Exchange / Re: My iPhone Game Tutorials for Beginners
« on: February 22, 2010, 02:52:32 AM »
I just want to add a quick update, it turns out the iPhone's entire event system is multithreaded!

I created a subclass of UIView, and overrode the touches moved method to increase or decrease an internal variable depending upon the direction of touch movement, the. I could then redraw the required image (dependant upon the variable) in the drawRect method, this allows the custom UIView to animate with touches and does not block the other classes which have their own animation code.

Any questions, feel free to ask.


@Gandolf, in Tut3... I'm thinking it would be "More Correct", though not easier, to subview the main menu and the game screen in the superview... this way, one could use IB to build the Menu... and might allow for some other cool stuff, not sure though, as this is all very new to me (I haven't really touched game development since the Amiga days).

I plan to hit OpenGL next, any tips on that would be welcome :)

2
Code Exchange / Re: My iPhone Game Tutorials for Beginners
« on: February 19, 2010, 05:16:13 AM »
Third question... Does the AppDelegate run in a separate thread? What can I use this class for?

3
Code Exchange / Re: My iPhone Game Tutorials for Beginners
« on: February 19, 2010, 05:11:44 AM »
Hi Gandolf,

I'm totally new to Obj-C and not really sure of the scope of instances... I want my game engine object to be able to send messages to my view obect and vice versa, but as I understand it I need to have a Controler object which has instances of both my view class and my game engine class... Then the controller need to mediate between the two... This is a new way of working for me and will require reworking my game code a great deal...

Second question, I have built custom UIObjects (buttons which are animated), but they need to be animated with respect to the touch input. (i.e. Touch movement cause the icon to change more White if the touch moves up, more black if moves down etc...).. How can I do this, giving realtime feedback, without blocking the main thread of execution (and other animations)?

4
Code Exchange / Re: My iPhone Game Tutorials for Beginners
« on: February 16, 2010, 01:12:56 PM »
Hey Gandolf!

I was having a terrible time trying to figure out where the callbacks were (the timer handler is a great help!) and where the CGContext was coming from! After reading through your source code, it all make sense now, so many thanks!

I realise now that it only makes sense for an object to be drawing in it's own context :)

Now I have to figure out a way to link my game model object to the view controller :))

I expect I'll have more questions later!

Pages: [1]