Go Back   Java Programming Forums > Java Standard Edition Programming Help > Collections and Generics

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-02-2010, 10:45 PM
Junior Member
 

Join Date: Feb 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
chuckgod53 is on a distinguished road
Default tile map help

Hello! I am currently working a game in Java. The only thing is i do not know how to use or implement tile maps. If anyone knows how to or where to learn this please let me know thanks!!!



Reply With Quote Share this thread on Facebook
Sponsored Links
  #2 (permalink)  
Old 10-02-2010, 05:17 PM
helloworld922's Avatar
Super Moderator
 

Join Date: Jun 2009
Posts: 822
Thanks: 5
Thanked 181 Times in 166 Posts
helloworld922 will become famous soon enoughhelloworld922 will become famous soon enoughhelloworld922 will become famous soon enough
Default Re: tile map help

A tile map is an array of values that represents what's at that location. All you need to do is specify a 2D array and store a bunch of values that each represent a different type of tile. Ex:

0 = empty ground
1 = water
2 = rock

1 1 1 1 1 1 1 1 1 1
1 0 0 0 2 0 0 0 0 1
1 0 0 0 2 0 0 0 0 1
1 0 0 0 2 0 0 0 0 1
1 0 0 0 0 0 0 0 0 1
1 0 0 0 2 0 0 0 0 1
1 0 0 0 2 0 0 0 0 1
1 0 0 0 2 0 0 0 0 1
1 1 1 1 1 1 1 1 1 1

This will look like a wall of rocks with a hole you can get through.
__________________
ASCII a question .. Get an ANSI
Reply With Quote
Reply

Tags
game, map, sprites, tile, tilemap

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




100 most searched terms
Search Cloud
2 dimensional arraylist java 2d arraylist java actionlistener actionlistener in java actionlistener java actionlistener jbutton addactionlistener addactionlistener java avatar hardware id convert double to integer java double format java double to int java double to integer in java double to integer java eclipse shortcut keys eclipse tutorial for beginners exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.outofmemoryerror: java heap space format double java get mouse position java hardware id avatar java 2 dimensional arraylist java 2d arraylist java actionlistener java addactionlistener java button actionlistener java double format java double to int java double to integer java for beginner eclippse java format double java forum java forums java get mouse position java ipod touch java jbutton java list to map java mouse position java programming forum java programming forums java sendkeys java.lang.reflect.invocationtargetexception java.util.arraylist jbutton actionlistener jbutton java jtextarea font color programming forums string to int java two dimensional arraylist java writing apps for ipod touch

All times are GMT. The time now is 02:47 PM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.