Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: What is the maximum possible resolution?  (Read 2122 times)

0 Members and 1 Guest are viewing this topic.

Autocrator

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
What is the maximum possible resolution?
« on: October 05, 2013, 08:19:52 pm »
Hey there guys,

we're making an MMO-RTS game and we stumbled upon a problem, whenever we're trying to load inside our engine a sprite that is larger than (approximately) 7972x7972 (which is the terrain of our game) the game doesn't even start.

Is there a maximum allowance on how large the resolution can be? Because right now I have around 800 png files of 7972x7972 resolution that are the whole map of the game and you can load them (one by one) just fine... and I am just asking if it is possible to go even larger.

Thanks for your time
Autocrator

Stauricus

  • Sr. Member
  • ****
  • Posts: 369
    • View Profile
    • A Mafia Graphic Novel
    • Email
Re: What is the maximum possible resolution?
« Reply #1 on: October 05, 2013, 08:44:00 pm »
no, something is not right. firstly, why do you need 800 textures larger than 7972x7972? i've never seen anyone use a single texture larger than 2048x2048, and that's for main character from the newer 3D games.  also, it's better to use textures in a power of two (16x16, 32x32, 64x64, 128x128, 256x256, 512x512, 1024x1024, etc.)
if you really need all those textures, you'll probably have to break it down and load-unload them on the run.

does the game freezes? or does it return an error?
debug it, and search for where it stops: if it's loading the texture, if it's displaying the sprite, etc..
Visit my game site (and hopefully help funding it? )
Website | IndieDB

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: What is the maximum possible resolution?
« Reply #2 on: October 05, 2013, 08:48:06 pm »
Check sf::Texture::getMaximumSize (depends on each graphics card, so don't rely on the value you get on your PC).
Laurent Gomila - SFML developer

Autocrator

  • Newbie
  • *
  • Posts: 2
    • View Profile
    • Email
Re: What is the maximum possible resolution?
« Reply #3 on: October 05, 2013, 09:13:04 pm »
Thx for your time guys, so after the getMaximumSize, I get around 16k, I suppose it's both for width x height? right?

The game is 2D Isometric and the 800 pngs are the terrain in the background which will be set in a tile formation of 40x20, (it's the map of europe+asia) with transparency

The game doesn't freeze nor do I get any errors, it just doesn't load. In the debugging it stops when it is loading the texture!


Ixrec

  • Hero Member
  • *****
  • Posts: 1241
    • View Profile
    • Email
Re: What is the maximum possible resolution?
« Reply #4 on: October 05, 2013, 09:33:23 pm »
Yes, it's for both width and height.

FYI, the lowest max texture size people might still have these days is 512x512, so if you want maximum compatibility that's the size to cut things into (though you can always check the max size at runtime and do things differently).

Kojay

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: What is the maximum possible resolution?
« Reply #5 on: October 06, 2013, 01:47:56 am »
Assuming this is the issue, Thor library offers BigSprite and BigTexture classes.