Author Topic: How to set a default game resolution?  (Read 2546 times)

Chase

  • Newbie
  • *
  • Posts: 3
    • View Profile
How to set a default game resolution?
« on: December 15, 2013, 03:34:13 am »
I just started working with Solarus and Lua. I understand most of it, but I am having trouble finding out how to reset the default screen size when I execute the quest. I want to adjust this because I am working with a 32x32 tileset and a 48x48 standard sprite size and the resolution is much to small to comfortably play.  :-\ 
I assume I must edit the quest.dat file but the changes I have made have not changed the resolution. Any feedback would be appreciated!

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1172
    • View Profile
Re: How to set a default game resolution?
« Reply #1 on: December 15, 2013, 04:35:18 am »
You can set the quest size in quest.dat to something like 640x480, see for example https://github.com/christopho/zsdx/blob/master/data/quest.dat.
However, for now, most of your sprite will have to stay with a size of 16x16. Most entities have a size of 16x16 hardcoded. This will change one day, but not soon.

In the meantime, what you can do is keep sprites of 16x16 but use a pixel filter that scales the resolution. Scale2x is available in the latest release (Solarus 1.1) but the next release (1.2) will provide more filters, including hq2x, hq3x and hq4x.

Chase

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: How to set a default game resolution?
« Reply #2 on: December 15, 2013, 08:08:03 pm »
Thanks for the help! But I am a bit confused to why you say the sprites must be confined to a 16x16 size? The default hero sprites are defined by their .dat file to a 24x32 frame. Is the hero an exception to this rule?

Christopho

  • Administrator
  • Hero Member
  • *****
  • Posts: 1172
    • View Profile
Re: How to set a default game resolution?
« Reply #3 on: December 15, 2013, 09:18:28 pm »
No, you are right, sorry, all sprites can have any size.
There are two notions of size: the size of an entity and the size of its sprite.

From the point of view of the obstacles of the map, the hero has a size of 16x16, no matter his sprites. You can make a sprite of 48x48, but then the behavior with walls will be weird: a large part of the sprite will overlap walls.
So for the hero, I think the sprite should not exceed 24x32.

Chase

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: How to set a default game resolution?
« Reply #4 on: December 15, 2013, 10:26:00 pm »
Oh, okay thanks! That makes a lot more sense now!