Yeah, you are totally right. We should fix it so that misalignment doesn't get you stuck. The chances of that change actually breaking a game are so tiny, I regret any past opposition to the idea<br><br>On Monday, July 11, 2016, Ralph Versteegen <<a href="mailto:teeemcee@gmail.com">teeemcee@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think it's far better to implement this as a command instead of a<br>
script, because we might want to change how it's done in case we add<br>
features like pixel based movement. It seems a bit strange to add an<br>
argument putNPC, because that's for pixel based positioning, maybe it<br>
makes sense to add it to setnpcposition.<br>
<br>
Also, the fact that everything breaks horribly when things are<br>
misaligned is definitely an engine bug. Can't we fix it? I'm sick of<br>
treating ancient bugs as features. We can keep the current<br>
code/behaviour around (activated by a backcompat bitset), and try to<br>
fix things so that if an NPC/hero is misaligned collision detection<br>
still works, and it's automatically realigns when moving.<br>
<br>
On 9 July 2016 at 05:59, Adam Perry <<a href="javascript:;" onclick="_e(event, 'cvml', 'arperry@gmail.com')">arperry@gmail.com</a>> wrote:<br>
> It might even be the kind of thing you want at the engine level. The<br>
> original Legend of Zelda allowed semi-freeform movement, but you snapped to<br>
> the half-tile when you switched between moving horizontally and vertically.<br>
> The same thing could work here.<br>
<br>
We could follow something like that approach (realign both X and Y<br>
when doing a movement), but snapping to the nearest tile when you move<br>
would probably look quite bad especially if you're not using half<br>
tiles. But there's no need; just realign only in the direction of<br>
current movement.<br>
<br>
Aside from that, and thinking about implementing pixel-based movement,<br>
I guess the Legend of Zelda system (with full tiles instead of half<br>
tiles) has several benefits compared to fully free movement. It makes<br>
collisions and obstructions simple: each walkabout occupies/obstructs<br>
either 1 or 2 tiles (in the OHR only one tile at a time is obstructed,<br>
except for NPC activation which checks both tiles). And everything is<br>
basically just as aligned with the tile grid as tile-based movement,<br>
avoiding alignment problems when fitting through gaps. You can pack<br>
more moving NPCs into a given area (although fewer than the current "1<br>
tile obstruction" system). It could be done without snap-aligning,<br>
such as making a diagonal step when switching from horizontal to<br>
vertical movement.<br>
<br>
<br>
> On Fri, Jul 8, 2016 at 12:56 PM, James Paige <<a href="javascript:;" onclick="_e(event, 'cvml', 'Bob@hamsterrepublic.com')">Bob@hamsterrepublic.com</a>><br>
> wrote:<br>
>><br>
>> I was talking to RMZ about how to unstick NPCs that get stuck when their<br>
>> speed<br>
>> changes while moving. I know Pepsi has had to do a ton if this sort of<br>
>> thing too.<br>
>><br>
>> I came up with:<br>
>><br>
>> script, snap npc, arg, begin<br>
>>   # Kill current movement<br>
>>   walk NPC(arg, west, 0) # x axis<br>
>>   walk NPC(arg, north, 0) # y axis<br>
>>   # reset NPC to current tile<br>
>>   put NPC(arg, NPC x(arg), NPC y(arg))<br>
>> end<br>
>><br>
>> And I was thinking this is probably common enough that it should be done<br>
>> with standard commands.<br>
>><br>
>> Maybe a built-in "snap NPC" command? Or maybe an optional argument to "put<br>
>> NPC" that can kill current momentum?<br>
>><br>
>> Thoughts?<br>
>><br>
>> ---<br>
>> James<br>
>><br>
>> _______________________________________________<br>
>> Ohrrpgce mailing list<br>
>> <a href="javascript:;" onclick="_e(event, 'cvml', 'ohrrpgce@lists.motherhamster.org')">ohrrpgce@lists.motherhamster.org</a><br>
>> <a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> Ohrrpgce mailing list<br>
> <a href="javascript:;" onclick="_e(event, 'cvml', 'ohrrpgce@lists.motherhamster.org')">ohrrpgce@lists.motherhamster.org</a><br>
> <a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
><br>
_______________________________________________<br>
Ohrrpgce mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'ohrrpgce@lists.motherhamster.org')">ohrrpgce@lists.motherhamster.org</a><br>
<a href="http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org" target="_blank">http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org</a><br>
</blockquote>