How do I prevent image scaling?

Started by Zefk, September 22, 2016, 06:19:06 PM

Previous topic - Next topic

How do I prevent image scaling? I noticed this when doing a screenshot of the map area. As I can remember it was 640x480, but the map size was really half that size 320x240. I reduced the image size to 320x240, but the image scales up to match the original 640x480 and this affects the quality of the image.

I attached images below. It shows that the map is set to 320x240, but it really is 640x480.

Ah, so the zoom setting made it 640x480 in the editor. That part makes sense now, but everything still scales when the game is played and that affects the image quality. Is there a way to change the zoom settings just for the that is image?

For instance, the game scales to 640x480 when playtest occurs. My volume background menu was originally 640x480 to match the scale change, but my image (volume background image) scales to 960x700 on playtest. Is there a way to prevent the scaling of my image only for sol.surface.create("Volume_background.png")?

The base size of your quest screen can be set in your quest properties (File > Quest Properties > Quest size).

When running the game then, the rendering is scaled to fit the size of the window, but you have nothing special to do. You only work in quest size coordinates. There is no scaling when you create a surface from Lua. The scaling is only done to fit the window in the end.

It is possible to set the size of the window from Lua, I don't know if this is what you want.

September 22, 2016, 10:10:37 PM #4 Last Edit: September 22, 2016, 10:15:59 PM by Zefk
I figured it out.

I changed the window size:, 480)

After that I changed the minimum and maximum quest size to 640, 480.

The image turned out perfect, but a bit big. I guess either way having my image at 320x240 is best for the window size.

Without those settings the 640x480 image ends up like this.

Works fine when resized 320x240. (Lower quality)