Jump to content
  • Advertisement
Sign in to follow this  
FantasyVII

How to scale tile map to different resolutions?

This topic is 2300 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone,

I have a tile map that get loaded from a text file. it looks something like this.


1121111111111111111111111
1121111111111111111111111
1121111111111111111111111
1121222222221111111111111
1121211111121111111111111
1121211111121111111111111
1121211111121111111111111
1121211111121111111111111
1121211111121111111111111
1122211111121111111111111
1111111222221112222211111
1111111211111112111211133
1111111211111112111222223
1111111211111112111111133
1111111222222222111111111
1111111111111111111111111
1111111111111111111111111
1111111111111111111111111
1111111111111111111111111



every tile is 32 pixel and there is 25 tile horizontally and 19 tiles vertically. that makes a resolution of 800X600. (32px * 25) X (32px * 19)

So my question is what is the best way to support multiple resolution without sacrificing the quality of the game texture?

for example in my UI I have a menu that is 1920X1080. and when the user chooses a resolution of 800X600, the UI will scale down to 800X600. but if he chooses a resolution of 1920X1080, the UI will be rendered in its native resolution.

Do i have to create a map for every resolution ? because that is going to take a very long time and its not very good way of doing things.

Share this post


Link to post
Share on other sites
Advertisement
You could simply stretch map/tiles, but that'll pixelate it most likely (happens in some BYOND games).
Second possible solution is to increase map as resolution increases, meaning player would see farther away (happens in Diablo 2:LoD).
And third solution is not to allow changing resolution at all (Diablo 2).

Share this post


Link to post
Share on other sites
Just to be sure: you don't create a new map (changing your model): stretch your tiles instead (change visualization).

Scaling sprites is a common problem.
First, you might scale them on CPU with a scaler (as emulators do). Main problem is they often have limited scale options and sometimes the license is complete, utter bullshit.
A bicubic scaling could possibly be good enough. More involved approaches follow.

If there is a limited amount of detail to preserve, you might look at Green's distance fields. This would require a pass for each shape to render so it might not be the best solution. Moving towards a fully vector representation: resolution independent curves (GPU gems 3). There's also an updated technique for use with D3D11 but I cannot find the link right now.
Microsoft also has a thing that looks awesome. Never looked at it in detail.

You could also try some antialiasing scheme such as a limited form of the new TXAA (search the forums). I'm not even sure how it works, just telling.

It might be the case to author data at higher resolution and downscale it rather than vice-versa.

Share this post


Link to post
Share on other sites

You could simply stretch map/tiles, but that'll pixelate it most likely (happens in some BYOND games).
Second possible solution is to increase map as resolution increases, meaning player would see farther away (happens in Diablo 2:LoD).
And third solution is not to allow changing resolution at all (Diablo 2).


thx I'll just make the map at 1080P and if the user chooses a smaller resolution he will just have to scroll to see the rest of the map.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!