School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,119 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,956 people online right now. Registration is fast and FREE... Join Now!




MultiLayered Tile Map

 

MultiLayered Tile Map

japanir

13 Oct, 2009 - 06:19 AM
Post #1

D.I.C Regular
Group Icon

Joined: 20 Aug, 2009
Posts: 366



Thanked: 83 times
Dream Kudos: 150
My Contributions
Hi all
I am working on a 2d RPG game in java.
my game objects are stored inside HashMap<String, objectType>
so my tiles for example are store inside Hashmap<String, Tile>
The String is a unique code for each tile. whenever i want to use certain tile for example: "GR"
CODE

TileDatabase.get("GR");

now, my tilemap should contain 2 layers of tiles.
first layer is the background: grass,rocks,water.
second layer is trees, table, etc.

my problem is how to create that TileMap object.
what i tried is creating a database for 1 layer tilemap.
then when creating the double layer tilemap, i took as parameters two 1 layer tile map objects from the tile map databse and constructed a new map out of them.
but it seems a mess. even when i try to explain it is a mess.
so my question is which parameters i should assign to my map and how, considering the way my data is stored.
I really dont ask for code, but for ideas and what's behind it.

thanks!

User is online!Profile CardPM
+Quote Post


bobjob

RE: MultiLayered Tile Map

13 Oct, 2009 - 10:44 AM
Post #2

D.I.C Head
**

Joined: 29 Mar, 2008
Posts: 115



Thanked: 8 times
My Contributions
Java based tilemap editor complete with source, and multiple layers:

http://juddman.googlepages.com/
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 01:39PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month