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, 10:02 PM   #6 (permalink)
smasher
Senior Member
iPhone Dev SDK Supporter
 
smasher's Avatar
 
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
Default

Quote:
Originally Posted by Noise View Post
Thanks a lot for the info, Smasher.

So, basically, rather than starting with a big image, I need to start with a grid, right?

With that, I'd set up the map as a grid, with each square being it's own image? Kind of like a tile? With things like buildings, would I use one larger image, or would I need to split that image into several blocks for the grid?
I would suggest tiles. You might have a grid of UIImageViews that is 16 tiles wide and 16 tiles tall, but your map could be 100x100 tiles or bigger if you wanted. You only show the images for the visible area though.

Quote:
Is there a visual way of setting this all up, or would it all need to be done through programming? I'd prefer visual, just because I love seeing the artwork all fall into place, but if it's through coding only, that's fine as well.
I would start with having the map in code for now. You can switch to using a tile map editor (like tiled) later, once you get this working. It's possible to use Interface Builder, but I wouldn't recommend it. You can hardcode your map like this for now - a field of grass with a few trees:

int mapArray[8][8]={
{0,0,0,0,0,0,0,0},
{0,1,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,1,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,1,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
{0,0,0,0,0,0,0,0},
}

Quote:
What engine do you guys prefer? I was thinking for my game to just use image views, as it will be fairly simple. A basic map, with the player, and NPCs to interact with. Would that be enough to justify using OpenGL or Cocos2D? I'm planning on keeping it all 2D, with a similar view to a traditional Zelda game.
Is this your first game? I think UIImageViews would be fine. Cocos2D would give you better performance and some extra effects, but you'd have a little more to learn. OpenGL is much harder and you have to code all of the animation, etc. yourself. They are all just different ways of drawing; you still have to write the model yourself.
__________________

Free Games!
smasher is offline   Reply With Quote
 

» Advertisements
» Online Users: 854
25 members and 829 guests
AamirKhurshid, ADY, AndreaT, AragornSG, Creativ, Desert Diva, Donovan472, dreamer11, elhanche, Hercule, hermi7jami, higgey, ilmman, iph_s, jimbo, leahov, moriko, sialcasa, supasounds, TamsiE, Tanya Mir, TTStu, VikMyr, ziocleto
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,863
Threads: 89,223
Posts: 380,687
Top Poster: BrianSlick (7,129)
Welcome to our newest member, hermi7jami
Powered by vBadvanced CMPS v3.1.0

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