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

View Single Post
Old 02-09-2010, 03:55 PM   #3 (permalink)
Noise
Registered Member
 
Join Date: Jul 2009
Posts: 566
Default

Quote:
Originally Posted by MiniRobinho View Post
Regarding the game world size, I've also wanted a bigger size than the actual screen size to layout everything. I think it can be done, however you can't do it through interface builder because that only allows editing within the iphone screen.

For collisions you can use CGIntersectsRect(character,building){DO SOMETHING} which will then do something when the two images "interesect" or touch essentially. And yes, if you have a background image, you'd need a separate image saved of just the building so that the game can detect where the building is.

For alternate views, you could have two views, and then using CGIntersectsRect(character,door){load second view containing building interior}

Hope that helps
It actually does help quite a bit!

I was thinking CGIntersectsRect, but wasn't sure.

As far as loading the second view, I would then just set it to place the player's UIImageView at the correct coordinates for the door entrance, right?

Would I use CGIntersectsRect as the barrier for the views as well? For example, the inside of a small building. If it doesn't take up the full screen, how would I prevent the player from simply walking right "over" the walls of the interior and onto the background?
Noise is offline   Reply With Quote
 

» Advertisements
» Online Users: 872
28 members and 844 guests
.Snipe, AamirKhurshid, ADY, aijo, AndreaT, anshuk1219, AragornSG, Creativ, Donovan472, dreamer11, elhanche, HalfFull, Hercule, higgey, ilmman, iph_s, leahov, moriko, nidie, sialcasa, Sunny46, supasounds, TamsiE, Tanya Mir, TTStu, VikMyr, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,862
Threads: 89,223
Posts: 380,685
Top Poster: BrianSlick (7,129)
Welcome to our newest member, higgey
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:42 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.