Open ivan-mogilko opened 10 months ago
So currently when a character is outside the room area and I want to slide the character in I first scale them to whatever is needed to match the scale of the first pixel they will match once their x,y position is the same as the scaling for what is set in the walkable area. After this change, does the set of default applies continuously to the character outside the walkable area, or only once and I can override by re-setting it?
After this change, does the set of default applies continuously to the character outside the walkable area, or only once and I can override by re-setting it?
What I'm proposing is a default that works for the whole room, so long as particular area don't have their own settings. The default room settings would be applied continuously of course, just like areas apply them.
In the above example, using room settings for this purpose may not be suitable at all times, as the room settings would apply to anything in that room that is not getting settings from walkable area, not just one character.
Of course this raises a concern about convenience of working with these settings, because right now if area has scaling 100, that would mean an explicit setting already. If the settings would be inherited from the parent (Room), and optionally overridden in areas, then there would have to be an explicit "enabling" property on each area. This is something I am not certain about.
Actually... maybe we should move to factor multiplication instead of override in ags4.
Similar to how audio volume is a multiplication of factors: system volume clip volume, or object volume animation volume The scaling could be: room scaling area scaling * character scaling.
Right now, if you want to give particular character a scaling in addition to the area scaling, you would have to make it manual, and calculate in script. With the system above it will be possible to apply one effect to another in chain.
Just to explain the issue of outside of room
Usually when moving a character from outside of the room inside the room, the character will be big (or just at different scaling) until the middle of the feet hit the first walkable area pixel inside the room. Ideally, would be nice if the last pixel at right and first pixel at left were assumed to be the same for things out of room borders. Right now, the solution is to pre-set the character scaling manually, and then move it into the room - it will only start to active scale after being scaled once manually once it hits the pixel of the walkable area in room borders.
Ideally, would be nice if the last pixel at right and first pixel at left were assumed to be the same for things out of room borders.
Oh, right, so imagine that walkable areas stretch infinitely behind the room borders.
Yes, this may be a good idea, but it's best to open a separate ticket for this.
imagine that walkable areas stretch infinitely behind the room borders.
I like this idea too. It's simple and fixes all common annoyances.
Does that also imply that the pathfinding is aware of and takes into account the bleed area? What happens if the shortest distance is through the bleed area?
Does that also imply that the pathfinding is aware of and takes into account the bleed area?
I did not think so, why do you think that may be necessary?
EDIT: I see, my wording was wrong. By "walkable areas stretching" I did not mean them literally stretching. I meant their scaling etc effects are applied there. Same could be done for regions with tints probably.
EDIT2: I don't know if this is the same method as @ericoporto had in mind, or he actually wanted to have that area walkable too.
No, not walkable, my worry is currently if one wants to make a character enter the room from outside of it, currently you set the scaling, and tween them in, and then make the character walk as soon as they are in a walkable area (0<x<Room.Width&&0<y<Room.Height), but if there's some "default" scaling and it's applied to characters that are not in any walkable area (outside), this won't work anymore.
Ermmm I am bit confused right now, I thought this was a feature suggestion about continuing area's effect beyond the room borders. Not sure anymore if I imagined this.
But regarding your concern:
EDIT: In regards to setting up scaling beyond the background edges. To make it clear, my idea about "perfect" solution is actually to have a "theoretically infinite" room where you may draw areas beyond room background. But such thing would require to make serious changes in editor and engine, and script api. So we could also have something simpler for starters.
This idea came to me when thinking about some setting that could be applied either globally for the whole game, or per room, or per walkable area.
AGS currently has certain properties applied to Regions and Walkable areas. I don't mention hotspots and walk-behinds, because hotspots are there only for interaction, and don't affect anything else, and walk-behinds are simply bg cut-outs. But Regions and Walkables affect Characters and Objects standing on them, with properties such as: light level, tint, scaling.
There may be situations when one would like to have whole room applying same effects to characters, or whole room except few places. If there are many areas, it may become a chore to assign identical settings everywhere. But things will become more complicated with continuous scaling property, for example, because if you have a lot of areas you would need to calculate bottom and top scaling levels correctly. And this becomes even more annoying if these areas have complex shapes.
So, what I'd like to propose for discussion is this idea:
This would refer to both in Editor and Script API properties.
Note: at first I've been thinking about using area 0 for this, but technically it's also a valid area, which may apply its settings when character stands on it. At least the walkable area 0 does (I don't remember about region 0).