|
Senior Member
iPhone Dev SDK Supporter
Join Date: Jul 2008
Location: San Mateo, CA (San Fran)
Posts: 3,858
|
Quote:
Originally Posted by Noise
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!
|