0

I've been scouring the internet trying to find a way to fix my problem. I am creating a top-down rpg style game in JavaFX and have run into a bit of a snag. I'm trying to create a game area of 544 x 416 (area the you can see) but this is obviously pretty small so I've scaled the StackPane to 2.0. The game area is still 544 x 416 it's just larger on the screen.

The way my program is built, I have a StackPane called root that is attached to the Scene (and the Scene is attached to the Stage set at fullscreen), then I have another StackPane called frame attached to root. The StackPane size of frame is 544 x 416 and the StackPane root is scaled on the x and y axis 2.0 (which obviously scales frame). The StackPane frame is in the middle of the screen.

enter image description here

The issue comes when I actually try to load a map image. The edge pixels of each ImageView are blurred ever so lightly which creates a thin line whenever two images are placed on top of each other.

enter image description here

This image is not scaled at all and is exactly the way it should look.

enter image description here

This final image has been blurred by the scale factor and has a thin black line visible where the two images are. You can also see that the image has been blurred quite a bit. I am very good with Photoshop and know inherently that some pixel blurring will occur when making images larger BUT this issue did not occur with Swing.

I need to know if there is a better way to do this entirely OR how to get rid of the blurring. There is another topic here with a problem somewhat similar but it doesn't really address my particular problem. Any help on this matter would be greatly appreciated.

Community
  • 1
  • 1
Philip Vaughn
  • 606
  • 6
  • 20
  • Is there a reason that prevents you from using images that are twice the size, sou do not have to scale it? – hotzst Oct 11 '15 at 20:54
  • Yeah that's kind of a tough question. The game was originally designed for a program called RPG maker which has a 640x480 resolution and the gameplay area is 544 x 416. A lot of the graphics are already finished and designed for 32 bit graphics (meaning the game map is broke up into 32 x 32 pixel squares). With that small of graphics you have to scale it or it will be too small. – Philip Vaughn Oct 12 '15 at 00:56

0 Answers0