Providing Resolution & Framerate (eg. Vsync 30FPS) Options

0 favourites
  • 3 posts
From the Asset Store
A template that lets your project to support any device, mobile or desktop, and be free of Pixel Art artefacts
  • A two-part question (or more of a feature request, really) related to providing performance-related graphics options to users.

    First part relates to fullscreen scaling. Right now C2 provides the option to use low or high quality scaling, but it would be nice to have more granularity in this regard. Basically what I'd like to do is control the rendering resolution for low quality mode, so that you could provide more options between Window Size and Screen Size. One way this could be achieved is if you could simply adjust the Window Size project property on the fly with events (EDIT: already possible with the System: Set canvas size action, my bad) - then you could combine it with the LQ fullscreen mode to achieve the desired effect (you could for example make an "Internal rendering resolution" slider in your options similar to what eg. DOOM 2016 offers). Although for ease of use it would be nice if C2 also provided an option "one level up" from layout scale to game scale, which would scale even layers set to scale rate 0. Considering that C2 already uses this kind of scaling for fullscreen mode to begin with, it would be nice to be able to adjust it on the fly with events as well. It would also make rolling your own aspect ratio and resolution handling through the "Fullscreen in browser - Crop" option easier as a bonus.

    Second part is about framerates. For mobile games and lower-end hardware it would be desirable to provide eg. a option to run the game at capped vsynced 30FPS (ie. running at "half" vsync for 60Hz displays). I managed to find this thread from last year on the subject, but reading through the Chrome issue nothing seems to have gotten done on the browser side yet. However, there is a potential workaround. C2 uses requestAnimationFrame internally, right? So for 30FPS, it could simply run its updates on every other rAF call to achieve constant 30FPS on 60Hz screens. I tested this out with a webapp of my own and it worked as expected. This kind of vsync division (a potential C2 project property could be just that - an integer for vsync division - 1 updates game on every rAF call, 2 updates on every other, etc) could also be useful for all those 120Hz/144Hz displays out there to allow for better control over game performance for the end-users.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I think the first part can be potentially achieve with the set canvas size action (which changes I think the window size property) combined with low quality fullscreen but I am not sure, will have to do some testing.

  • Oh hey, so it does. Managed to miss that in the system actions because I was searching for "window", but yeah, the description for that even says "Set the size of the canvas (also altering the 'Window size' project property)", so that should sort it out. Then there's just the matters of exposing game scale control to events as well as the vsync division for framerate capping. First one is something that you could technically work around with in events already (by manually controlling scaling for all layers through events), but the latter is something that would require changes to C2 runtime itself (ping Ashley).

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)