Hey guys, i'm moving on to a 2d tiled game..I've been reading through some old tutorials and information pages..It seems tilemap has changed a bit, i'm trying to put everything together to come up with something. One question I have though..I have my tileset already put together, do I need to pack the texture?

I've already loaded the tileset into Tiled and made a small level. I'm still trying to decipher the information available, if anyone has any good 'current' tutorials it would be greatly appreciated.

I've got the camera working and showing my map, but everything looks zoomed in. I've gone through the wiki and can't seem to find how to keep the tiles at 16x16 instead of stretching or zooming them..I can zoom in and out, but that doesn't solve the stretching problem...

I'm trying to find a good TiledMap tutorial but haven't had much luck as it seems TiledMap has been changed...so I don't know what is correct and incorrect on the tutorials I can find..I'm not even sure HOW to begin drawing my character into the map or anything..Does anyone have any good tutorials for this or any good information? It would be greatly appreciated.

Yeah, I don't think i'm using that method correctly..But when I removed the /2, it screwed everything up. Now the map is very small.

This isn't the problem i'm having though. I've been looking over it a bit more and I think my problem has to do with clipping. I want the tiles and map to stay one size, even when it's resized. The tiles are stretched and are bigger than 16 pixels. I've played with the zooming a bit and got it to look right, but when I resize the window, they just stretch..

I´m not really sure I understand your problem, but the way you describe it is the way it´s supposed to behave. If you resize your window everything will scale to the new resolution.

One thing that is important to understand is that you´re actually not loading 16x16 pixels that you can plot to the screen: You´re loading a texture that is pasted on a rectangle. A rectangle doesn´t have "pixel size", just coordinates, and will clamp the image within these coordinates .This mean that when you resize the window, you also scale the rectangle (= sprite) to fit the new window resolution and since texture coordinates are relative to the rectangle you´ll also scale the texture. Hence, everything will stretch.

So if what you are experiencing are that the "stretch ratio" of the tile is equal to the new window size, this is expected. You may not like it but it is normal. If not, I think you need to clarify your problem.

Yeah, sorry, it's a bit hard to explain. Basically, I want it so if I were to make the window bigger it would show more of the map..Not stretch what is already on the map. I want everything to stay one size.

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