Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 03-17-2010, 01:24 PM   #1 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 242
Default MainGameLoop CGRects question

Is it ok to have multiple CGRects in the main game loop? like so:



- (void)mainGameLoop {

while(CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.002, TRUE) == kCFRunLoopRunHandledSource);


CGPoint newLocation = CGPointMake(...);

myShipImage.center = newLocation;

CGPoint newLocationB = CGPointMake(...);

ShootImage.center = newLocationB;

}
m_kaminsky@yahoo.com is offline   Reply With Quote
Old 03-17-2010, 04:27 PM   #2 (permalink)
Pro. Game Developer
iPhone Dev SDK Supporter
 
Join Date: Feb 2009
Location: żLa Islas Hermosas?
Posts: 2,178
Default

Sure, why wouldn't it be OK?
__________________
~~ Word Flurry ~~ App Store / Website / Facebook
Kalimba is offline   Reply With Quote
Old 03-17-2010, 09:29 PM   #3 (permalink)
Registered Member
 
Join Date: May 2009
Posts: 242
Default

Quote:
Originally Posted by Kalimba View Post
Sure, why wouldn't it be OK?
I'm getting weird behavior when I have more than one moving objects.

I was thinking it was a static method issue...

or maybe Is there are rule about aloc/threading in this situation? or maybe something about the timer which allows multiple independent objects..?

Assuming I'm just dealing with a bug,
So I can just add more elements to this method, like the first 2?

Example, I want to add a scrolling background image which moves based on the other objects...that sort of thing..
m_kaminsky@yahoo.com is offline   Reply With Quote
Reply

Bookmarks

Tags
cgpoint

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 285
19 members and 266 guests
ADY, Alsahir, Dani77, Desert Diva, Duncan C, F_Bryant, Grinarn, HemiMG, Herbie, jansan, linkmx, M@realobjects, macquitzon216, prchn4christ, Robiwan, smethorst, spiderguy84, twerner
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,882
Threads: 89,228
Posts: 380,761
Top Poster: BrianSlick (7,129)
Welcome to our newest member, jansan
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:41 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0