2.5D sprite scale

0 favourites
  • 5 posts
From the Asset Store
Minimal Sprite Font with Stroke for Pixel Art games.
  • I'm working on an adventure game where I want the character to scale to simulate a Z direction. I think this is doable with the screen Y coordinates, but since I plan to release it on different devices the resolution (and coordinates) will vary. Is there some way to replace the coordinates with an percentage?

    Illustration:

    <img src="http://shadow-embryo.com/wp-content/uploads/2_5D_scaling.png" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why not work in a fixed resolution (a work resolution so to say) and let the engine-side scaling do the rest?

    rock on,

    Michael

  • Whenever you want to turn a Y value (in pixels) into a percentage, you need to divide that value by the WindowHeight (maximum Y value) and then multiply by 100 (this gives a value between 0, 100 that represents percentage). Now if you want to work in percentages and then translate that into a Y value, just do the same thing going the other way. Percentage divided by 100 (this becomes a decimal between 0, 1) now multiply that by your WindowHeight, and you'll get your correct Y value (in pixels). Hope this helps/is useful for you :)

  • Grave But won't this result in poor performance on mobile devices?

    brent_hamel Thanks! This sounds like the thing I was looking for:)

  • dhondon When I think about it a little more you will have to do some scaling anyway, else you will not get to any fullscreen other than the resolution you designed. For example you do a 1024x768 project size for an ipad2, you will have to use scaling (either up or downscale) to get a fullscreen display when switching to devices that have a different native screen resolution (on an ipad3 it would be an upscale by 2).

    If you decide to work on a project that supports ipad3 (2048x1536 resolution) you will most certainly get to a point where you have to reduce texture sizes and scale up your images.The ipad3 performs pretty poor with it's highres screen and high definition images eat up a lot of memory. For the sake of performance you should keep your working resolution as low as possible :)

    rock on,

    Michael

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