¿Why is my player character always standing on even coordinates? (SOLVED)

Started by Héctor Bometón, Tue 29/01/2019 23:55:31

Previous topic - Next topic

Héctor Bometón

So... I'm trying to make my character stand on some specific coordinates since I need him to be perfectly aligned with an animation that triggers when he reaches that spot.

I just make him walk to where he is suppoused to be, (block, anywhare) but I noticed he was always standing one pixel to the left or one pixel to the right. So I make him say where he is standing and I found out the problem is he is always "resting" on an even number coordinates.

So... If I say "player.Walk(847, 261, eBlock, eAnywhere);" he just ends up standing on 846, 260 (it's exactly the same with the y coordinate).

I can make him stand where I want by manually changing the player.x and player.y after the walk animation is completed, but this is a waste of time and energy and it should be standing on the spot, pixel perfect, why the he** not? What am I missing? AGS is better than this.  :-X

Btw, my game resolution is 384x216, I know it is "high resolution", but still... Do you know what is going on?

"Use low-resolution co-ordinates in script" in General Settings is set to False, btw.

Thank you!

Crimson Wizard

There is issue that the walkable areas in AGS for "hi-resolution" games are always exactly twice smaller than the game resolution. This logic is remains of old times when there were no free resolution choice but only 320x200, 640x400 and so forth. I was supposed to fix this long ago but keep forgetting.

I am currently preparing another update to 3.4.1. version and may look into adding an option to keep the area 1:1 to the General Settings.

Héctor Bometón

Quote from: Crimson Wizard on Wed 30/01/2019 09:24:51
There is issue that the walkable areas in AGS for "hi-resolution" games are always exactly twice smaller than the game resolution. This logic is remains of old times when there were no free resolution choice but only 320x200, 640x400 and so forth. I was supposed to fix this long ago but keep forgetting.

I am currently preparing another update to 3.4.1. version and may look into adding an option to keep the area 1:1 to the General Settings.

Thank you very much! That would make my work so much easier. <3

Crimson Wizard

I forgot to ask, you are using 3.4.1 right? Or 3.5.0 wip version?

Héctor Bometón


I'm using 3.4.1, July 2018.

Since you said walkable areas in AGS for "hi-resolution" games are always exactly twice smaller, I presume this is also why pixels "double" in size when I try to draw the walkable areas directly onto my room backgrounds instead of importing the areas, is that correct?

Would it make any difference if I try 3.5.0?

Thanks again.

Crimson Wizard

Quote from: Héctor Bometón on Wed 30/01/2019 09:55:56
Since you said walkable areas in AGS for "hi-resolution" games are always exactly twice smaller, I presume this is also why pixels "double" in size when I try to draw the walkable areas directly onto my room backgrounds instead of importing the areas, is that correct?

Yes this is correct. Walkable areas, and some other mask (except Walk Behind) have 1/2 resolution of game's.

Quote from: Héctor Bometón on Wed 30/01/2019 09:55:56
Would it make any difference if I try 3.5.0?

3.5.0 has the same behavior currently, but I can frankly tell that it will be simplier for me to implement this fix in 3.5.0's next update, if you can upgrade the game to 3.5.0.
Note that although 3.5.0 is in progress some people already use it in developing their games as far as I know. But one have to be careful and make a backup of game files before upgrading, just in case.

E: But I am not insisting on that.

Héctor Bometón


It's been a couple years of work already, but I'm willing to upgrade if this issues are fixed, of course! No problem with backups, I'm quite obsesive with that kind of precautions.

Looking forward to it! Thanks. :)

Matti


Cassiebsg

+2  (nod)
I keep forgetting about that and then wonder why I can't perfectly match the stuff...  (roll)
There are those who believe that life here began out there...

Crimson Wizard

For the reference, this was already changed in AGS 4 wip branch, but there's no actual release (and no milestone planned as far as I know). It's an experimental version of AGS which has lots of backwards compatibility (older functions and properties) stripped off. It has all room masks made in 1:1 resolution without other option. Other than that it more or less has all features from AGS 3.5.0. Alan v. Drake is using that branch to develop his game.
If this masks fix is so critical that you can't wait then you could ask him for the build, although frankly it may be less stable than 3.5.0 due lots of code torned out at once (and of course you will have to upgrade script if you're using any deprecated commands)

Crimson Wizard

I was reminded of this issue today. So for your information, this is fixed in AGS 3.5.0 - Alpha 12 (recently released) with addition of Mask Resolution switch:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=55829.msg636603547#msg636603547

(NOTE: version still need testing so make backup if you are going to open your game in that editor)

SMF spam blocked by CleanTalk