Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by rosko

Hi,
I want my Impact games to run on wide variety of devices with different screen sizes and resolutions. I'm very new to game development and probably I'm missing something but I find it really hard to do this. It seems there's not much information on this topic in the forum. To make it more clear: I don't want my game to be scaled up (impact buildin scaling is not an option). Also I want my games to run in full screen (even on TV's and high res displays).

So far I start using texture atlases (and texturepacker) to pack my entities textures and scale them DOWN. So far this looks good. Texturepacker is exporting texture atlases in different resolutions and corresponding JSON and I just need to load the correct files for given resolution.

The thing that bugs me now is levels. I don't know how to scale my level appropriately.
For example: I have a huge level that is not meant to be seen all by the player. And like to show just portion of this map. But I need user to be able to see the same portion of the screen on different resolutions (tv, phones, desktop..etc).

Can someone tell me if I'm moving in right direction with this scaling thing (for both entities and map) or this can me achived in some different way.

Kind regards,
Rosen

1 decade ago by Joncom

First of all, different displays have different aspect ratios. Some are 4:3, some 16:9, etc. What this means is that there is no possible way you can show exactly the same amount of game on every device. Not unless you want to stretch/compress what's on the screen. But that would just look funny, don't you agree?

If it was me, I'd probably make the height of the game be the "standard" which is constant across all devices. This means that widescreen TV's would show further out on both sides than an iPad would for example. Maybe this is acceptable for you, or maybe not.

Now, I know you said:
I don't want my game to be scaled up.
However, I'd like to ask you why not? Because not only is it convenient to have one set of images instead of several sizes for various devices, but this could also fix your issue about showing the right amount of level on-screen.

1 decade ago by rosko

Hi Joncom,

thanks for writing.

To be honest I forgot about the aspect ratio. Thanks for pointing this out.

About the scaling up. I have very polished models and scaling up will ruin them.

1 decade ago by giodif

You'll always have some variance with viewport vs. visible-portion-of-level. Trying to show the exact same view on a device that's about 500px x 320px and on a high rez monitor, both of which will likely be different aspect ratios, will either require scaling the art or multiple source files. Even then, you'll need some wiggle room on what is visible in the viewport.

For me, when the game loads, I have it detect the viewports width and height and then fit itself accordingly. Even so, my game isn't full screen monitors, because I'd have to scale it by a factor of 4 to keep the viewport small enough against the level size.

It's a sticky wicket, to be sure.

I think that you are moving in the right direction for your graphics. By providing high rez versions of art, you won't need to scale the game, but you'll likely need to give some ground on managing your viewport.

Perhaps, you could chose a specific aspect ratio and accept that you'll have some letterboxing for some of your monitors. Or maybe you only enforce a particular aspect ratio when the screen is above a certain size.

With mobile devices you probably won't have problems keeping your viewport tight enough.
Page 1 of 1
« first « previous next › last »