How do I allow the player to change resolutions?

0 favourites
  • 9 posts
From the Asset Store
Basic Rounded Vector Geometry Player Design with Glow for 3 player games
  • My game is high resolution (1600x900), how can I easily make it so that people with less powerful devices can change the settings to something less demanding or is there a way to automatically set it so it does that? Would the answer be in setting downscaling in the layout properties (I currently have it set on medium quality)? Also, is there a way to allow the user to turn webGL off? I find that with Chrome 38, turning webGL off greatly increases performance. One other question - is this performance gain because of a problem with the way Chrome is handling webGL or is it because it disables all effects in the game? Thanks in advance for any and all answers, Morgan.

  • How I handle the performances on different devices is a settings menu where the player can set the animations to On/Off, also the background scrolling sky can stopped. Also have the clear background turned off because I have a background covering. That was the biggest improvement that I have done. Amazing differences in the fps since turning that one setting to off.

    Also, play around with the "Compare two values" and have it compare the "fps" to a number, and if the number drops below your threshold that you set, have it then set the animation speeds, and such.

    Also, you can mimick a resolution change by setting the canvas size to another resolution by touching/clicking a sprite/button. See image that I am posting. by clicking/touching the sprite8 on my layout, it would set my resolution to 100x200[attachment=0:2ipmrcvy][/attachment:2ipmrcvy] I hope this helps!

  • When I change the canvas size like that, it cuts off most of my screen and many of my important assets. I want the same screen layout, just perhaps a different scale.

  • Aphrodite shared this on another thread but you can make it so the user can change resolutions by using the "set canvas size" combined with the "set layout scale" action. I think I'll do a short tutorial on how I did it.

  • WebGL cannot be turned off at runtime, as there is not legit way that you would want that option (webGL gives a better control of scirra on the rendering C2 does, is faster at rendering at the cost of a little JS overhead, if chrome has a problem with that, they will correct it as they have no interest at being slow with WebGL), you can turn off the effects with events, which would be nice to have inside an option menu as well as the target resolution setting.

    The set canvas size sets the Window size parameter, which alter the way the low quality setting reacts as well as the viewport, the set layout scale is here to zoom accordingly in the game to have the same viewport, however this is kind of hacky so I would recommand to be careful and replace it if there is an official way to change the target resolution of the low quality setting.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Aphrodite - thanks. I look forward to WebGL being fixed in chrome! Do you know if there are any major browsers (Safari, etc?) that don't use WebGL? I guess that chrome is just running canvas2d better at the moment.

  • Aphrodite - thanks. I look forward to WebGL being fixed in chrome! Do you know if there are any major browsers (Safari, etc?) that don't use WebGL? I guess that chrome is just running canvas2d better at the moment.

    Well, safari adopted it recently, and if webGL is not supported at all, it should fall back to canvas2D by itself (that is the way C2 does it at least)

    WebGL, in a non C2 context, permit low-level rendering, and also 3D (the Q3D plugin only works wit webGL because webGL is based on a 3D renderer AFAIK), so not supporting it would be a turn off for some users, thus browser makers should support it.

    Also chrome was I think the first to support webGL (webGL support was actually an anti C2 argument for some as "only chrome supports it anyway" at the time, even though the game falled back to canvas2d in other browsers, they felt like it would be a "optimised for chrome" engine, which as yojc an see, is not the case), and chrome was always good at it, so I would say it is something they have done that reduce its effectiveness, and I do not think they would like to keep it that way if that is the case.

  • Aphrodite - thanks for all of the info! An interesting thing that I've noticed - the two things that currently greatly boost my game's performance, #1 - turning off WebGL, #2 - cleaning the cached files from Chrome. The next time I play after I clean the cache, it won't have nearly as much lag. Do you know what this means? I sure don't...

  • For the cache, I sure don't know.

    But for WebGL, did you try turning off the webGL effects only (aka not webGL itself) before doing this comparison (and also testing in other browsers just for comparison sake)?

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