-1
\$\begingroup\$

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 (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.

\$\endgroup\$
4

2 Answers 2

6
\$\begingroup\$

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!

\$\endgroup\$
1
  • \$\begingroup\$ 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. \$\endgroup\$
    – Thijsj
    Commented Feb 27, 2013 at 14:15
0
\$\begingroup\$

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.

https://i.sstatic.net/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!

\$\endgroup\$
4
  • \$\begingroup\$ You won't be able to attach meta-deta to tiles either which is a huge disadvantage for a tactics game. \$\endgroup\$ Commented Feb 26, 2013 at 23:50
  • \$\begingroup\$ perhaps, you can use another file to define the meta-data. \$\endgroup\$
    – megablue
    Commented Feb 26, 2013 at 23:59
  • \$\begingroup\$ @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. \$\endgroup\$ Commented Feb 27, 2013 at 5:15
  • \$\begingroup\$ ... Sure, if individual units aren't very.. custom like. \$\endgroup\$ Commented Feb 27, 2013 at 5:19

Not the answer you're looking for? Browse other questions tagged .