Hey guys, new to the forums here and pretty new to java, I just finished my first college course on java and am really wanting to expand my knowledge so i thought the best way of doing it was to create a 2d game!
First I’ll link you my code for my problem and then I’ll explain.
http://pastie.org/8996412
Anyways, heres my situation Currently I’m working on making a backround that is made up of 16x16 pixel tiles on line 16 you can see that my “backround” or “map” will be 16 tiles x 14 tiles.
On lines 11 and 12 I am importing png files to a seperate array called “texture”
What I am wanting to do is to set this up so when I type in a value in my 2d array than it will put whatever texture in that space on the “map”.
Example:
map[0][0]= 0; //this will put a dirt texture at 0,0
map[1][1]= 1; //this will put a grass texture at 1,1
I guess another way of explaining it would be that I am trying to load all the tiles I could possibly use in the texture array on line 9 and being able to “build” my map using those textures in my 2d array.