   Few beginner concept questions
  Hello everyone,I'm new to game programming, but have adequate C++ knowledge.I'm starting to develop an iPhone game using the AirplaySDK.This allows C++ programming in a windows environment for the iPhone.I have created a simple side scrolling shooter to familiarize myself with the SDK.So I learned concepts of collision detection, sprite animations, events, touch controls, and so on.My next attempt is a sort of defense game, where you have to protect your king.The game play will be similar to "Secret of Mana", sort of an action RPG.I have a couple of questions regarding some more basic concepts:1) EngineI have read that I should be creating the engine for the game, and then creating the game after. Although this seems like the better idea, I am the only one working on this game, is it really worth my time? If so can anyone point me in the direction of game engine concepts and design?2) MapsNot sure if this should be tile based. I don't want the character to move in squares (like Final Fantasy) but rather a fluid 360 degree motion (Secret of Mana). If they are tile based, how can I go about creating a map? Rather than using tiles for buildings and such, I would rather create the image in photoshop or something, and use it as a sprite maybe? 3) Timespan, changing rooms, surfacesThis is a tough concept for me to grasp.Lets say there is 2 rooms, 1 enemy is in 1 room, and I run to the other. At this point, the screen would change to the next room. Should I have this on another surface buffer and draw it depending on which room I'm in? Also, while I'm in the other room, I want that enemy to still continue walking toward the door I just walked through (this obviously wouldn't be shown), and appear in the room I'm in when he gets through the door.If anyone can shed some light on these concepts it'd be greatly appreciated.Thank you,Matt   
  Yes, it is worth your time. You can have all the brilliant levels and spells and everything planned out, but you can't do anything with them until you have a engine to plug them into.Tile based maps have nothing to do with movement- it has to do with how they are shown. Secret of Mana uses tiles for it's environments. Search 'Tileset' - you'll come to understand what the concept is.Limit your viewfield- have the game showing only one room, but have several rooms active. Depending on how complex and memory intensive your game is, you may be able to have entire dungeon floors running at the same time- which would be ideal, but hard on older computers.   ;  Write the game first...then the "engine" will fall out at the end.Plus you have a completed game.Then take that code, fix up any problems you had with it and write another game.Then repeat.Eventually you'll have a really good "engine" (codebase actually)...and you'll have completed games and NOT ENGINES :)HTH;  Thanks for the reply guys.Ya I guess I'll just go ahead and start coding the game as object oriented as possible, in the end I'll basically have the engine like you said. =)I already started coding a tile editor in C#, few hours and I'm almost done.Please tell me if this will work, and if I will run into any problems down the road.I use the .net datagridview to set any number of tiles I wish.Each tile is 32x32 in size.Each tile is created in photoshop as it's own 32x32 .png.All the tiles are put into a folder.The editor reads all the tiles in the folder and makes a tileset also made from a datagridview.When you place a tile, it also sets the tag property of the cell.When saving the map, it saves these tag ids to a text file, for the game to easily read it after.If anyone would like the code I'd be happy to share it.Another question I have.How will the map be displayed?Will I load the map to a buffer?Can I scroll through the buffer as a whole? Rather than moving every single tile when my character is moving?Basically I'm asking how I can change the viewable area of the map based on character movement.In my side scroller, I would simply change the x co-ordinate of the background when drawing it. Not sure how I can achieve this with tiles.Any help is greatly appreciated, Thank you =)   ;  It's probably more efficient to have all the tiles part of one large texture image or "texture atlas"...rather than individual 32x32 images. Just use the UV coordinates to select which 32x32 pixel region you want for your tile. Or does your editor create this from the 32x32 pixel .png files ?As for displaying the map...let's say you have a screen that (for example) is 1024 x 768 pixels.So that is 32 x 24 tiles (where each tile is 32x32 pixels).All you have to do is move that window around in X and Y and displaying the tiles that are visible. It's just like a side scroller, except you are now also moving in the Y axis and the map is larger.Does that make any sense ?;  Yup, makes sense. But with my side scroller the background was one image, so I would just change the coord of drawImg.For the tiles, do I draw each tile to a surface buffer? Then move the surface as a whole?I understand the concept, just not sure if that's the correct way to do it.Thanks again.   