Multi-Resolution Game Development With GameBuilder Studio Check it out!
NEW Version 0.9.7 has arrived! New Blazing Fast Particle Engine & More Game Actions. Check it out
Secret behind scaling
  • I noticed on the multi screen resolution sample

    I can resize the screen during the game and everything scale perfectly.

    However when I apply the same logic to my new build of game it doesn't work as smoothly, and my collision spatials no longer align with the objects that they've been place on.

    I'm using @1x,@2x

    What is the secret to keeping the collision spatials position and size accurate to the screen size.
  • 5 Comments sorted by
  • @Carlton Didn't the spatial scale with the assets? I thought it would just scale with them?
  • @Isak, my basic spatials scale with the asset, but none of my collision spatials scale with the asset unless I use one of the no scaling options under publish settings.
  • @Lavon Could we get som info about this? Don't the collision spatial scale ?
  • @Isak the collision shape doesn't need to expand/scale because the size of the object does not change with the "No Edge" multi-resolution setting. Just the resolution used to render the image changes behind the scenes. If you are manually scaling up your objects then you also need to scale up the collision shapes by setting the collisionShapeScale property on a collision spatial.
  • @Carlton when you say you are applying the same logic what do you mean? Are you trying to use 1x and 2x assets without turning on Multi-Resolution scaling in the Publish Settings? Manual scaling can not take advantage of 2x, and 3x runtime loading of assets because a lot of different setup logic goes into determining which size assets to load at runtime. If you are manually scaling your game then you have to use a downscale of large (2x or 3x) asset approach across devices and manually scale down your objects and any collision shapes.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion