Hey guys, first post here, and I got a question!I made a slick2d game, and used the TilED map editor, and the tiles I want unwalkable I made them a setting where "block = true", and I can make my game read that, well; heres my code.I have my sprite drawn in the middle of the screen, and he himself never moves. the map moves when he moves. (this might not be a good way of doing it, but I wanted it to be a scroller map, like you down get to the edge of the screen and have to load another map and it (eg, you got to the bottom of the first map, it loads the second map, and your sprite moves to the top because my map it bigger than the gameframe) right now my sprite is able to move around the whole map without re drawing a different map.so basically, i guys the maps float x, y is the coordinates will be the players coordinates(if that makes sense.)

The map doesn't it return positives. but when I move around the map, (right when i spawn im at float x = 0;) so if I move left my float x goes negative, and in fact (int)x is still negative, I mean IN-GAME, the tiles that are supposed to be blocked are in a negative x/y of the map, and you cant put a negative in a new boolean[][] array!

You need to put the player in the same coordinate system as your map so they have the same point of reference. Don´t spawn the player at zero, spawn the player at some coordinate on the map that´s... Not zero...

oops, wait, he is spawned in the center of the screen private float currentX = 304;private float currentY = 224;I just considder it 0, because he never moves.and the map is atprivate float x = 0, y = 0;so when the left arrow key is pressed, x which is the map goes to -1 per say, and the character never moves, but the map does.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org