Results 1 to 6 of 6
Thread: Tile Map
- 05-19-2012, 03:51 PM #1
Member
- Join Date
- May 2012
- Posts
- 6
- Rep Power
- 0
Tile Map
I am wondering how do I measure the screen, so I can match an array lets say I have this multidimensional array:
Where 0 is empty space and 1 is lets say wallsJava Code:int map[][] = {{0,0,0,0,1,0,0,0,0,0}, {0,0,0,0,1,0,1,1,1,0}, {0,1,1,1,1,0,1,0,1,0}, {0,0,0,0,1,0,1,0,1,0}, {0,1,1,0,1,0,1,0,1,0}, {0,0,1,0,1,0,1,0,1,0}, {0,0,1,0,0,0,1,0,1,0}, {0,0,1,1,1,1,1,0,1,0}, {0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0}};
How do I know how many rows and columns I need to have for a specific screen size?
Can I convert pixels to tile size/multidimensional array tile size?
-
- 05-19-2012, 06:25 PM #3
Member
- Join Date
- May 2012
- Posts
- 6
- Rep Power
- 0
Re: Tile Map
Aren't there some mathematical way? Like HEIGHT / Something * WIDTH / Something?? Or what?
-
Re: Tile Map
- 05-19-2012, 06:37 PM #5
Member
- Join Date
- May 2012
- Posts
- 6
- Rep Power
- 0
Re: Tile Map
Could you give an example? :)
- 05-19-2012, 08:09 PM #6
Similar Threads
-
Tile game! Help me increase the performance of Graphics2D.
By santa in forum Java 2DReplies: 11Last Post: 01-27-2012, 03:50 PM -
Help tile TimeScrambler game
By DrCooksAlot in forum New To JavaReplies: 8Last Post: 01-25-2012, 03:12 PM -
Simple Tile Game Question
By sgthale in forum Java AppletsReplies: 9Last Post: 06-17-2011, 11:20 AM -
Concept of Tile map via database
By GrInd3r in forum New To JavaReplies: 0Last Post: 12-08-2010, 05:18 PM -
I am having a compile tile error. please help.Exception in thread "main" java.lang.Ar
By nicholil in forum New To JavaReplies: 3Last Post: 11-06-2010, 12:33 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks