# What is a game map?

**URL:** https://forum.kirupa.com/t/what-is-a-game-map/24772
**Category:** Uncategorized
**Created:** [July 4, 2003, 2:16pm UTC](https://forum.kirupa.com/t/what-is-a-game-map/24772 "2003-07-04T14:16:35Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![javadi82](https://avatars.discourse-cdn.com/v4/letter/j/3be4f8/32.png) [@javadi82](https://forum.kirupa.com/u/javadi82)
#### Post date: [July 4, 2003, 2:16pm UTC](https://forum.kirupa.com/t/what-is-a-game-map/24772/1 "2003-07-04T14:16:35Z")

</div>

sorry, if this question sounds silly, but anyway…

often in game development, i read that one has to consider drawing a map.from what i have searched and read over the internet i gather that a game map is an array where the player is expected to move.(the developer already controls where the player moves with an array?)

i know what arrays are but what is map doing in an array?

i have read [outsideofsociety.com](http://outsideofsociety.com) tutorials on this subject but i still don’t get the point- why does one really need a map? aarggh. what is a map? and why do i need it in my game?

URL’s to sites which explain why one needs a game map VERY CLEARLY to a newbie game developer will very much be appreciated.

susheel.j  
[http://myperception.tripod.com](http://myperception.tripod.com)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 4, 2003, 2:48pm UTC](https://forum.kirupa.com/t/what-is-a-game-map/24772/2 "2003-07-04T14:48:16Z")

</div>

there are several ways of using arrays to map a game, its all down to what the developer decides will work best for that game.

my experience of this is in a tile based platform game I (part) made. If you have a look in the development section of the games on my site (click my footer) you’ll see my platformer level editor. This is a tile based level editor, the best way of understanding how a tile based game works is to look at the my example. Basically the platforms in a level are all made up of tiles 15 by 15 pixels big and you place these tiles onto a grid to design the level. This is where the array map comes in…

rather than doing a hitTest for every single tile in the level which would take up an enormous amount of cpu time the position of each tile is mapped to a 2 dimensional array (so the first square of the grid would be array element (0, 0), 3 squares along and 1 square of the grid down would be array element (3, 1) etc.). Placing a tile on a square of the grid sets the corresponding array elemnt to true.

Then when it comes to doing collision detection for your character all you need do is work out which square of the grid he is currently in and check the value of the corresponding array element. Collision detection without the cpu intensive hitTest command.

Hope this helps 😛

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2003, 12:35pm UTC](https://forum.kirupa.com/t/what-is-a-game-map/24772/3 "2003-07-07T12:35:11Z")

</div>

But why do I need to map a game?

more specifically, why do i need maps in a games?

susheel.j

[http://myperception.tripod.com](http://myperception.tripod.com)

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 7, 2003, 12:57pm UTC](https://forum.kirupa.com/t/what-is-a-game-map/24772/4 "2003-07-07T12:57:18Z")

</div>

well, if you don’t have a game map, what are you going to play on? 😛

most games need some type of map.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 9, 2003, 12:21pm UTC](https://forum.kirupa.com/t/what-is-a-game-map/24772/5 "2003-07-09T12:21:14Z")

</div>

sorry, still could not understand why i need maps in a game.

you haven’t answered the questions i posted the second time and you try to answer my questions with some more questions!

anybody can help out there?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 9, 2003, 12:34pm UTC](https://forum.kirupa.com/t/what-is-a-game-map/24772/6 "2003-07-09T12:34:28Z")

</div>

ok, depending on the game, you’re gonna need some sort of environment to play on. that’s what maps are for. they provide players a place to roam about and do whatever.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 9, 2003, 12:57pm UTC](https://forum.kirupa.com/t/what-is-a-game-map/24772/7 "2003-07-09T12:57:54Z")

</div>

there’s an example of a game map in on the files in this thread

[http://www.kirupaforum.com/forums/showthread.php?threadid=15767&highlight=isometry](http://www.kirupaforum.com/forums/showthread.php?threadid=15767&highlight=isometry)

Basically, in a lot of games there would be spots that have some kind of an object on them and you can’t access that certain spot… or you might be using a path-finding algorithm for a tile-based world with different terrians… you would store data about tiles in an array (the map), and then use it when your character move or when you’re finding the path between two spots 🙂
