Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

For school my group and I are going to make a 2d turn based strategy game on android.
We are trying to make a simple version of Advanced Wars(screenshot1 Gameplay).
But we don't really know how to make the map and what the best way is to divide the map in tiles.
We found an example, that each tile is a canvas but that was only with 9 tiles.
Ideally, we would like to have a map that is bigger than the screen and you can move around it just like when an image is too big for the screen.
We only have 5 weeks, so we can't afford it to experiment a lot.

Kind regards,

Thijs

share|improve this question
1  
Might I suggest taking a look at mapeditor.org. This tool will help you create the map, and if you search around you will most likely find some sample code / tutorials demonstrating how to work with the files it generates. –  OriginalDaemon Feb 26 '13 at 16:06
5  
4  
Basically, you can find all the information you need about how to create a 2D map from questions that have already been asked on the site. –  Byte56 Feb 26 '13 at 17:28
    
Is there any reason we closed this? It at least asks about using tilemaps specifically on Android; which is probably at least somewhat benefical to some users. –  Vaughan Hilts Mar 1 '13 at 16:14
add comment

closed as not a real question by Byte56, Sean Middleditch, bummzack, Trevor Powell, Laurent Couvidou Mar 1 '13 at 10:16

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

You've noted down Android on your answer, so I'm going to centralize certain aspects of this answer according to that but it's universally applicable despite your platform.

First and foremost, what you see here and in Advance Wars is a process calling tile mapping. Segement of the maps are split into layered tiles, as shown here:

enter image description here

With this out of the way, there's a lot of tools you can find that will help you map out your game and apply different effects. A popular one with decent parsers available to you will be Tiled. With Tiled, you can create tilesets (chunked images you can use to compose a map), as shown here:

enter image description here

And then use those chunked up bits to create your world / battle zone maps. If you're curious how Advance Wars set there tileset up, I've included a reference image: enter image description here

Once you've layed our your maps, created tileset and set objects to define game behavior with objects in Tiled (they're just tiles with certain behaviours and properties - you can use these to define monsters, items and other stuff) and you can use tile properties to define terrain tags.

Once you've completed this, you can then import them into your game and start doing some processing on them to really make your game. If you use something LibGDX you will gain access to a camera component and Tiled map loader - which will allow you to have the panning effect you want along with the ability to load the maps from Tiled with realitively little effort.

Good luck - if you have any questions just leave a comment!

share|improve this answer
    
Thank you for your reaction, it has been very useful. After rereading my question I seem to forget that I meant how to implement(importing) it in android. Not per se making the map design. And I think we are not allowed to use something like Libgdx. Maybe the question had to be: How to make in android a raster playingfield where I can put images in and detect which raster the player pressed. I found a sample from a snake game that works with tiles. I'm now looking if the panning effect is possible and if it's the best way of doing it. –  Thijsj Feb 27 '13 at 14:15
add comment

there is an easier way to deal with the 'map', tiles based map were originally invented during the time where RAM and data storage were expensive and very little. if the map isn't too big, you can just make an image with any image editor and make it proportion to the grid size of your game. for the grid, you can just make a text file, and use csv (or any format you familiar with) to represent moveable slots and decorations.

let's say 0 is declaration, 1 is moveable slot.

http://i.stack.imgur.com/udncD.png

for the text file, it will look something like this

0,0,0,1

0,0,1,1

0,0,1,1

of cause this method has its down side, you cant reuse the assets as much as tiled based map and it will cost more resources to load the map. However it will save you a lot of time trying to produce nicely divided tiles!

share|improve this answer
    
You won't be able to attach meta-deta to tiles either which is a huge disadvantage for a tactics game. –  Vaughan Hilts Feb 26 '13 at 23:50
    
perhaps, you can use another file to define the meta-data. –  megablue Feb 26 '13 at 23:59
    
@VaughanHilts sure you can, make the numbers represent different types of tiles, and cross reference those numbers against a table of meta data dictating the properties of that tile type. If you want to have incredibly detailed meta data it would get a bit unweildly, but for a simple tactics game where you have at most 10 types of tiles that can affect combat, it would be easy enough, especially if you dont mind making a new meta-data file per map. –  Unicorno Marley Feb 27 '13 at 5:15
    
... Sure, if individual units aren't very.. custom like. –  Vaughan Hilts Feb 27 '13 at 5:19
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.