How to set a default game resolution?

Started by Chase, December 15, 2013, 03:34:13 AM

Previous topic - Next topic
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!

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.

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?

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.

Oh, okay thanks! That makes a lot more sense now!