nsmryan / RustRoguelike

This Rust Roguelike is a Roguelike written in Rust.
17 stars 3 forks source link

Tile images are distorted slightly #480

Closed MicroChasm closed 2 years ago

MicroChasm commented 2 years ago

I feel like we might have mentioned this in the past at some point, but the tiles are distorted slightly, making them not appear correct in the game. It makes it difficult to control how the game looks. I think it has to do with the scaling, since the game is larger than the tileset.

nsmryan commented 2 years ago

Is there a particular difference I could use as an example to try different scaling levels? Something like on a trap or other static sprite would be easiest to test with.

MicroChasm commented 2 years ago

I can look through the sprites later today, but one option is to look at the floor tile. There should be a one-pixel-thick line separating all of the tiles on all sides, and currently you can only see it on some sides.

MicroChasm commented 2 years ago

Here is an example-- the trigger mechanism tile. The left shows the original tile, then in the middle is a correctly scaled version, and then on the right is the version in the game. I think it has to do with interpolating the size-- I get a similar result if I scale the tile up one extra pixel. Maybe it needs to be scaled in a multiple of 16, if it isn't already? Tilescaling

nsmryan commented 2 years ago

I pushed a commit that displays everything 16 times enlarged, which seems to work.

nsmryan commented 2 years ago

I was looking into making the map different dimensions, and I found that the tiles are not exactly equal sized anymore.

I think we should come up with a desired breakout for the screen- how much is UI and how much map, and come up with map dimensions, and then screen dimensions that match this.

nsmryan commented 2 years ago

I was looking into the layout of the screen, making the map different dimensions, and why the tiles are distorted, and I believe I have solved the underlying problem now. Remember to remove your game.save file when you pull the latest master though.

The textures where not being used completely, so the tiles drawn on them where not aligned perfectly. Things should look much better now.