question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Preserve scene ratio

See original GitHub issue

Hi Almas, basically, I want to make my game resizable, so I set manualResizeEnabled to true. The built-in scale mechanism works well, except for the fact that I want to preserve the original ratio. I opted to create rectangles on both left and right of the scene so that the window could be resized as much as wanted, so that the actual game resolution would be the same. Honestly, I don’t know how to do this in FXGL since width/scale properties aren’t modified in contentRoot and I don’t know where to set listeners.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:26 (15 by maintainers)

github_iconTop GitHub Comments

1reaction
AlmasBcommented, Jun 9, 2019

No, I’m afraid. Only 11+ is being developed. As FXGL 11 has a completely new architecture, it is not sensible to develop both, especially considering it is superior to FXGL 8 arch. Eventually, there might be a backport of the 11 codebase to 8 but no plans at the moment.

1reaction
AlmasBcommented, Jun 9, 2019

To get the latest build (once it completes), you can use this:

<dependencies>
    <dependency>
        <groupId>com.github.almasb</groupId>
        <artifactId>fxgl</artifactId>
        <version>dev-SNAPSHOT</version>
    </dependency>
</dependencies>

<repositories>
    <repository>
        <id>oss.sonatype.org-snapshot</id>
        <url>http://oss.sonatype.org/content/repositories/snapshots</url>
    </repository>
</repositories>
Read more comments on GitHub >

github_iconTop Results From Across the Web

Image resizing with preserve ratio to full scene - Stack Overflow
I'm currently writing a program where I want to have a background image, which resizes with a preserved ratio, when the scene is...
Read more >
How to set the aspect ratio of the scene to 1:1 and keep it in all ...
Hi. We are creating a scene which is designed to a 1:1 aspect ratio. This ratio should always be maintained, no matter in...
Read more >
Guide to Aspect Ratios: 8 Film and TV Aspect Ratios - 2022
Letterboxing and pillarboxing are methods of preserving a film's aspect ratio even when it is presented on a screen with a different ratio....
Read more >
Thread: QGraphicsView keep aspect ratio of items when scaled
Re: QGraphicsView keep aspect ratio of items when scaled​​ In either case, this means that your scene is locked to use in a...
Read more >
Changing Aspect Ratio In Premiere Pro - YouTube
Changing Aspect Ratio In Premiere Pro - Working with Multiple SizesIn this video we explore the Cinematic Black Bars video in more details ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found