JavaFX Canvas resolution

163 Views Asked by At

I'm thinking of implementing a 2D game using Canvas from JavaFX and I'd like the user to be able to set the resolution. (It should be fullscreen all of the time) When I've tried Canvas it seems to just adapt to the native resolution of the screen it's displayed on, which is a problem for the performance. (I ran a particle system on my Macbook Pro on an external Full HD screen where it reached 60fps, but once I moved the window to the built-in retina screen it started lagging.)

Is there a good way to support multiple resolutions for games implemented with JavaFX Canvas? If not, are there any good alternatives? The reason I want to use JavaFX Canvas is because of the simplicity (not having to deal with low-level details).

0

There are 0 best solutions below