Zebbi's Forum Posts

  • If I want to make text boxes for save slots with Sprite fonts, do I have to use an offscreen text box and show the input with spritefont? Can spritefont somehow handle a fake blinker for the displayed spritefont text box?

  • Looks neat, can spritefont be used instead of standard text?

  • Okay, I've got a window size of 640x480 (don't laugh) which scales the HUD layer up correctly to 1920x1080 with a figure of 1.333. So, how can I calculate the window size with scale outer mode for other aspect ratios?

  • So, if I'm running a monitor size of 1920x1080, what calculation would return a size of 1.333? Could I divide the window width by something? Just any sort of number I could use to get the layer to scale correctly on all aspect ratios!

  • >

    > (...) rather like tools like Dosbox and ScummVM allow, for instance (...)

    >

    ScummVM? Sorry to go off topic a bit but are you designing a point and click adventure game in CS2?

    I wish! Maybe c3 will add some good tools for this!

  • I know my post wont help a lot, but what I did was stick to Letterbox scale and just let the players handle black bars on sides.

    If nothing else works I would say go with this, especially if for desktop computers, as black bars are more fogiving there than on mobile.

    Yeah, I'm not working with mobile, which is why I have a switch to allow the player to change the scaling mode to whatever they please, rather like tools like Dosbox and ScummVM allow, for instance. I just need to be able to calculate the window width for the users screen to use as a size for the layer scale, to keep the HUD the full width of the window in "scale outer".

  • Updated the topic title to give a better idea of what I'm trying to do.

  • You might want to try the anchor behaviour on a layer with 0,0 paralax to keep things in place..

    I've got the anchor on the HUD to keep it in the right place, but the problem is it's not wide enough when the screen is scaled so I need to resize the layer when the scaling is on. I just need to calculate the correct width to scale it depending on the monitor size of the user. With a 1920x1080 resolution monitor, a figure of 1.333 works to get the width right, but it's too wide on a 4:3 display, so I need to calculate the right aspect for the scaling.

  • So, I guess the best question is how do I calculate the scale size based upon the current size of the window when using scale outer mode?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Look if this example works for you:

    https://drive.google.com/file/d/0B5FlDY ... sp=sharing

    Wow thanks, that's MUCH better! I added a slight pause so it's a little bit more stable, I'm not sure if this is the best way of doing this or if there's an even better way of waiting? https://www.dropbox.com/s/09yddeemksrmq ... .capx?dl=0

  • It's still a mess, I'm trying to use local storage to keep a record of the last set scale size, and it isn't loading properly at all on the start of the layout, the switcher isn't rock-solid and sometimes skips a scale size. Can anyone give me a nice sturdy example of how to cycle the fullscreen scale modes with a keypress AND restore the last used one on start of layout? I'm tearing my hair out here trying to figure out how to make this look good.

  • I did it with three copies of the sprite and the events, separated by a static colon sprite, then I just count like so:

  • When I change the screen mode to "scale outer", my HUD layer is too small, so I want to scale the layer when that mode is selected. Currently on my 1920x1080 res monitor, a figure of 1.333 works well, but if I try it on, say, an 800x600 screen, the HUD is too wide. Is there a way of getting a dynamic scale amount depending on the resolution of the players monitor when I select scale outer? I would have thought ViewportRight would have been useful, but I can't use that in a scale layer expression.

    hud capx: https://www.dropbox.com/s/g4curnknsl789 ... .capx?dl=0

    CAPX: https://www.dropbox.com/s/4kdl077zi0pro ... .capx?dl=0

  • I'm pretty sure you need to wait at least one tick before requesting fullscreen again to make sure fullscreen gets cancelled in time.

    Trying that by putting a wait 0.2 seconds between the cancel and the change variable, but it's still not always changing properly to the right scale mode, it seems to do one pass of all 5 scales okay, but on the second pass it stops doing certain ones properly.

    EDIT: Works now!

  • You have to cancel the fullscreen-mode before you switch to another scaling mode.

    Use Browser| Cancel fullscreen before you switch.

    Thanks, that's working now, but it's really hit and miss if it switches. I'm trying to cycle the scales like so:

    Is there a more robust way of doing this that forces a good, clean switch of scale?