bryantmakesprog Posted June 8, 2018 Share Posted June 8, 2018 Very excited to announce that my first phaser project is nearing completion. As I'm ironing the last couple kinks out, I'm stuck with one issue which requires further assistance. My tilemap has lines between the tiles! Now, I know this is a render artifact that occurs occasionally with pixel art, but I don't know how to compensate for it. I ran into a similar issue with Unity a while back, but I can't recall how I went about fixing it. Any thoughts? Link to comment Share on other sites More sharing options...
Antriel Posted June 8, 2018 Share Posted June 8, 2018 This issue will appear always with whatever tiling you use if you render it on the GPU and scale things around. It's just how GPUs work. To fix it, you need to extrude your tiles in the texture atlas. That is, repeat the border pixels of every tile. Texture Packer can do that, or do it yourself in your assets pipeline. It's called pixel bleeding and what happens is that due to how GPUs work, pixels beyond the tile are sampled from the texture atlas, resulting in artefacts like this. Link to comment Share on other sites More sharing options...
bryantmakesprog Posted June 8, 2018 Author Share Posted June 8, 2018 I can give it a whirl. I am unfamiliar with Texture Packer or extruding though. So my current tilesheet represents 16px tiles. I would end up with a tilesheet of 18px tiles? Would I need to account for this in the code or is this just an adjustment to the image file? Of note, I just remembered the unity solution was to switch bilinear to linear. Not sure what that means (nor did I at the time), but it remedied the issue. Link to comment Share on other sites More sharing options...
rich Posted June 8, 2018 Share Posted June 8, 2018 Here, this will help: http://phaser.io/news/2018/05/webgl-tile-extruder Link to comment Share on other sites More sharing options...
bryantmakesprog Posted June 8, 2018 Author Share Posted June 8, 2018 Thanks guys, I believe I can make this work Oddball question too while I have you a captive audience: Currently the camera is set to follow the player. I actually want to nudget it just a tad below the player so the entire scene shifts up a couple pixels. Thoughts on how best to accomplish this? Link to comment Share on other sites More sharing options...
bryantmakesprog Posted June 8, 2018 Author Share Posted June 8, 2018 5 hours ago, rich said: Here, this will help: http://phaser.io/news/2018/05/webgl-tile-extruder Rich, the tool you recommended seems to continually spit out ": No such file or directory", even when running `tile-extruder --help`. Thoughts? Normally I wouldn't ask that sort of question here, but I thought your referencing the tool may have indicated you have some inside knowledge. Link to comment Share on other sites More sharing options...
aylictal Posted June 8, 2018 Share Posted June 8, 2018 @bryantmakesprog on terminal: npm install --global tile-extruder tile-extruder --help returns me this on my windows machine in a bash shell: Link to comment Share on other sites More sharing options...
bryantmakesprog Posted June 11, 2018 Author Share Posted June 11, 2018 On 6/8/2018 at 4:31 PM, bryantmakesprog said: Thanks guys, I believe I can make this work Oddball question too while I have you a captive audience: Currently the camera is set to follow the player. I actually want to nudget it just a tad below the player so the entire scene shifts up a couple pixels. Thoughts on how best to accomplish this? Anyone have thoughts on this? (That worked Aylictal; issue was on my Ubuntu distribution. Running it on Windows went fine.) Link to comment Share on other sites More sharing options...
prob Posted June 11, 2018 Share Posted June 11, 2018 this.cameras.main.followOffset.set(x, y), for both your initial setup/create and your update loop inputs: https://photonstorm.github.io/phaser3-docs/Phaser.Cameras.Scene2D.Camera.html#followOffset Link to comment Share on other sites More sharing options...
Edease Posted August 1, 2018 Share Posted August 1, 2018 This tools doesn't do it for me, it messes up (switches) the tileorder Link to comment Share on other sites More sharing options...
Recommended Posts