Golden Sun Hacking Community

Golden Sun Games => Golden Sun: The Lost Age => Topic started by: Plexa on January 17, 2017, 12:41:03 AM



Title: Collision Stuff
Post by: Plexa on January 17, 2017, 12:41:03 AM
https://clips.twitch.tv/tl_plexa/CourageousTigerHassanChop

https://www.twitch.tv/tl_plexa/v/115272846

Mostly this is just for curiosity. My theory for why this is happening is that this is the same as using a switch to interrupt movement and weird sliding happening (you might recall it from Lunpa Cave). Instead of the switch interrupting movement it is the sand rising cutscene and if you're in the right position and/or in the right part of your movement animation you will slide. If you happen to slide into a collision seam or something like that in the right pixel/subpixel then you can go through and clip like I did in the clips there.

If this is the case it might be possible to use elsewhere, but I'm not sure.


Title: Re: Collision Stuff
Post by: Atrius on January 17, 2017, 01:07:49 AM
Weird.  I'm not sure why it's letting you slide into the wall, but I do know for sure that movement in Golden Sun is calculated in 3 Dimensions so as soon as you're moved onto the wall tile you're pushed up on the Z-Axis (which visually overlaps the Y-Axis, I play with it some in this video (https://www.youtube.com/watch?v=TlJoGbLjNFo)) to the height of the wall.


Title: Re: Collision Stuff
Post by: Fox on January 17, 2017, 05:07:00 AM
Probably one of those "Change the collision tiles before we stop Felix from moving."./or/  "Get him moving again before fully updating them"?.. type of things. (e.g. Off by one errors.... ) Not sure, though....

I do know that if you do the code (As a cheat) 020322EC:0802F140 (make sure Felix's pointer @02030024 is 020322EC, though. Since it won't always be that.) , you could do further testing... (movement script pointer... and we want to not have it change to a "Do nothing" script... so we can still move during the sand rising cutscenes.) ... There are many different Movement types, though, so it won't always be the same pointer, in case you try to climb ladders and forget to disable this code, and stuff....


...
I haven't checked to see what happens with the collision tiles/etc. themselves, though. But it is possible that something of that nature could be messed with during the timed cutscenes that allows for the glitching??


Title: Re: Collision Stuff
Post by: Plexa on January 17, 2017, 08:03:01 AM
Weird.  I'm not sure why it's letting you slide into the wall, but I do know for sure that movement in Golden Sun is calculated in 3 Dimensions so as soon as you're moved onto the wall tile you're pushed up on the Z-Axis (which visually overlaps the Y-Axis, I play with it some in this video (https://www.youtube.com/watch?v=TlJoGbLjNFo)) to the height of the wall.
Yeah, I think its the same as this: https://www.twitch.tv/tl_plexa/v/50609265
Although in that instance the game decides to correct my position for some reason.

@Fox, I know collision is variable (which honestly is one of the most annoying things in this game since it prevents precise movement) but how exactly does it work?

For this instance the slide is the unusual behavior which I've only seen at Lemuria/Tolbi Fountain and with buttons e.g. like in the video above. I haven't seen a cutscene interrupt it until now. I'm going to play around with it a bit and see what else I can find.


Title: Re: Collision Stuff
Post by: Fox on January 17, 2017, 09:25:14 AM
@Lunpa Cave : I do not know yet... Why that happens... and I will have to do some thinking...

 I can get Isaac to be walking during the dialogue... the theory on that is the movement function decides the animation, and when you switch that to the Do Nothing function... there's nothing resetting/changing the animation... so it stays whatever it was. (Walking, running, etc.)  However, when it gets switched back to the movement function again, it stays updated.

As for the wall-clipping part... now that does sound like a bug. Unfortunately, I'm not sure what is going on there.
It does seem as you walk/run + interact, you can go a bit further then you could otherwise... (Even if you don't auto-get on top of wall.)
As it has been made obvious in your video. But you can also see it in my image....  I assume that is what you mean by "sliding"? (I guess that's basically what you said, but doesn't hurt to put things in my own words when I'm trying to think about it.)


Talking to NPCs seem to do the same (With setting PC script to do nothing.), but I don't get the walking animation... so I'm guessing it may be manually set there....? (I wonder if it sets anything else.... like a running speed to 0....? If assuming PC Movement function sets a number that gets evaluated by a global/used everywhere function....? .... Hmm... I will need to investigate. If this were the case, though... then anywhere where they forget to reset the value(s) could be exploited. - But again, this is a theory, and I'm not sure if it works that way yet.)


Title: Re: Collision Stuff
Post by: Plexa on January 17, 2017, 07:28:07 PM
I called it a slide because it's literally a slide :D https://clips.twitch.tv/tl_plexa/BeautifulFinchKappaWealth


Title: Re: Collision Stuff
Post by: Ark on January 22, 2017, 04:36:05 AM
This type of clipping happens in a lot of other games. What I think is happening is similar to how other games handle it: player character has a speed value that accelerates and decelerates, cutscene starts and input stops being calculated, collision event is disabled for some reason, and the deceleration from the cutscene starts allows the character to clip into a wall a couple pixels which then zips the character based on the game's natural push calculations. In theory this could be used in any cutscene that allows movement to initiate. As for the Lunpa Cave I think it occurs like that because you're doing it into the seam of the wall and the gate.

Would be nice to see if that is backed up by the data, though.