Resolution Changes the "Brush Size" in Room Edit?

Started by bulka_tarta, Sun 19/02/2017 17:47:14

Previous topic - Next topic

bulka_tarta

I changed the resolution from 320x180 to 480x270 and... Strange things started to happen.

I changed the Game Resolution in General Settings, and later I updated my background to be 480x270.
I would expect everything to work as normal, except that I would need to set up all the hotspots etc. all over again.

The problem is that somehow, the "brush" that you use to draw the hotspots has increased it's size to 2 pixels.
Usually, you can paint "pixel by pixel" but now the lines are thicker and I can't force it to draw over certain areas.

Is it some sort of bug? Or can you actually change the size of the brush? I'm not sure why it would change anyway.

Cassiebsg

Check in the General Settings what the "Use low-resolution co-ordinates in scipt" option is set to. It's probably set to true? Change it to false and see if it helps.
There are those who believe that life here began out there...

bulka_tarta

Unfortunately but that didn't do anything. The option was set to "false" and I tried turning it on/off but it doesn't do anything.

I realized that this thing happens only when both - the game resolution and the background are set to 480x270.
If the game resolution is 480x270, but the room background is.. let's say 320x200, the drawing function (on hotspots and walkable areas) works fine.
It also works fine if the background image is bigger, but the game resolution is smaller.

Cassiebsg

Okay, just tested it on my game and it does the same. 8-0
There are those who believe that life here began out there...

Crimson Wizard

#4
The room regions (as well as hotspots, and walkable areas) are painted on a separate 8-bit bitmap masks.
If I remember correctly, their size only matches room resolution when its "low-resolution", that is  - 320x240 or lower. For higher resolution, they are actually twice as smaller than the game size. Presumably this was done originally to save memory and for pathfinding speed in high resolution games.
Not sure if memory and speed still would be an issue, but it stayed like that since early days of AGS.

This means that for each game pixel, there is only 1/2 of hotspot/walkable area pixel, which results in the effect you describe.
Only walk-behinds mask is always 1:1.

EDIT: what I said actually refers to the automatically created masks. I would try creating a hotspot mask of a proper size in the paint program and then import it into AGS, and see whether they will stay pixel-precise. Hmm just tried that and it removes 1x1 pixel areas.




bulka_tarta

I'm currently just playing around with AGS, trying to see what I can do with it. I'm thinking of making something which would make some use of computer screen, so I need a slightly higher res to be able to display text and icons properly. I can't think of anything that would make this a huge problem, but I would like to have pixel-perfect hotspots.
If it's an AGS thing, I'm guessing it's not something that one could get by?

Crimson Wizard

Quote from: bulka_tarta on Sun 19/02/2017 19:54:16
If it's an AGS thing, I'm guessing it's not something that one could get by?

Unless someone implements a selectable room mask resolution as a game option in some future version of AGS, I do not see any workaround.

The thing is that in the past there was a big gap between low-res and hi-res game sizes: highest "lo-res" was 320x240 and lowest "hi-res" was 640x400. In 640x400 1-pixel never makes any difference for hotspots, unless you want to force players do pixel-hunting.
My imagination is not good enough to tell whether that may be a serious issue for 480x270 game though.

Cassiebsg

Like CW said, I doubt that it makes a difference for hotspots unless you are in for pixel hunting (since most people will instinctively click around what they think is the middle of the hotspot). Though, I can imagine it might be a noticeable (???) problem for walk-behinds, since you might have 1 pixel show up in the wrong side...
There are those who believe that life here began out there...

bulka_tarta

Thanks to Cassiebsg and Crimson Wizard for the help!

I think that for what I need this should be ok, although my "Pixel Perfection OCD" may prove to be a bigger problem!

I'm just glad it's not something I have messed up in my project, because I have a tendency to do so ;)

SMF spam blocked by CleanTalk