Golden Sun Hacking Community
December 12, 2018, 05:00:24 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News:
 
  Home   Forum   DC Wiki Help Search Calendar Downloads Login Register  
Pages: [1]   Go Down
  Print  
Author Topic: Object Collision: Height?  (Read 984 times)
0 Members and 1 Guest are viewing this topic.
Salanewt
His Sexiness
Mercury Clan

Oh yeah, baby!

Prodigy
*

Coins: 32
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4569

« on: January 17, 2017, 05:29:16 AM »

Hey! So, I have a long running goal where I want to make player effects more dynamic, and this includes allowing the player to push or Move objects diagonally. The problem with this is that Move pillars and other obstacles work in a way where manipulating them through the proper methods directly modifies the map collision data rather than having heights assigned to the objects. This effectively means that I can use Move to push a pillar diagonally but the sprite will only partially overlap with the collision, and looking at the actual code responsible for modifying a map's collision data didn't help.

However, I also noticed that the leaf platforms in Gaia Rock and the icebergs in E Tundaria seem to function differently. The platforms are not solid underneath, even when falling onto the lower level and trying to walk into them. I can also move freely between connected platforms, whereas movement is mostly restricted while they are moving (with exceptions where I can move very slightly should the game detect but be unable to execute a valid hop between platforms, or if I use the debug cheat for unrestricted movement while holding L). The icebergs seem to be similar minus the connecting part, as the one spot where a platform does connect with something else uses a script to make you walk all the way onto or off of the iceberg. I'm still researching these but am afraid of hitting a roadblock.

I was wondering if anyone had any insight on how these objects can have what seems to be object-based collision (unless they are actually map-based and are just hiding it really well). Additionally, I was wondering if this or some other method could be used to assign a height to something like a Move pillar while being able to stand on top of it without it being map-based and locked to a grid/whatever collision data is available. Ideally I can do it without having to rely on map initialization.

Thanks for reading!

« Last Edit: January 17, 2017, 05:41:20 AM by Lord Squirtle » Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 29
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2432

« Reply #1 on: January 17, 2017, 06:59:27 AM »

Umm... I dunno...


I did just look at the leaf platforms, though... and found something interesting...
The tilemap is using the hop flag for tiles you can hop from/to.... but that also includes tiles that are touching as well.... interesting, eh?
If you turn off the hop flags, though... you can't hop between the objects... but if the objects are directly next to each other, you can still continue on.

Quote
02010000 = Tilemap (Including graphics, event indexes, heightmap, etc.)(32-bit a tile)
 000007FF = Graphic tile
 00000800 = Unused? (MSB of graphic tile in GS1)
 00003000 = If stepped on, heightmap index of PC (/NPC?) will change. (0=Does nothing? 1-3 are heightmaps 0-2.)
 0000C000 = Priority? (Whether the graphic tile appears in front or not.) - TODO: See if this is 2-bit.
 00FF0000 = Event Connector? (For doors as well.) (FF=Wall, FE=Gap for hopping?)
 FF000000 = GS1: Height data; GS2: Special tilescript flags.
 01000000 = ? (Used where bridges are.)
 02000000 = ? (Seen used in Jupiter Lighthouse near Hover pads/slopes. No idea what it could be. EDIT: I think my research a long time ago is that this was connected with above flag for changing the collision layer index of object.)
 04000000 = Determines whether to use the first or second encounters index.
 08000000 = Hit/damage inducing.
 10000000 = ? (Not sure if used or not?)
 20000000 = Slope down.
 40000000 = Climbable (Ladder/Vine) (Use same value on tile above or below to activate.)
 80000000 = Hop. (Can hop from this tile.)


How are we going to hop without relying on tilemap?
« Last Edit: January 17, 2017, 07:08:59 AM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile
Salanewt
His Sexiness
Mercury Clan

Oh yeah, baby!

Prodigy
*

Coins: 32
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4569

« Reply #2 on: January 17, 2017, 07:13:03 AM »

You have a good point there. Although: It's also worth noting that there is a segment of code that can be modified/deleted in the hopping code, and doing so allows you to hop from the leaf platforms as they are moving (or from icebergs as they are moving, or pillars from any direction, etc.). I'll play around with that and see if it would be a viable solution but it may need something more.

Thanks for reminding me of that!


Edit: Removing the three instructions at #080D4F00 allows for what I mentioned, for reference. I still want to study the code further to see if more can be done for certain tilemap checks but for now this should work for testing.

Edit 2: Just wondering, would it be possible to mimic a tilemap tile that allows hopping through object/event scripting?
« Last Edit: January 17, 2017, 07:36:06 AM by Lord Squirtle » Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
Fox
Fox McCloud, the Hacking Doctor
Mercury Clan

Prodigy
*

Coins: 29
Offline Offline

I am: certainly not a Gallant!
Clan Position: Head Gallant
Posts: 2432

« Reply #3 on: January 17, 2017, 07:58:56 AM »

I was thinking about a separate Hop thing... (Assuming there was any logical reason why they even do Hop flags?) ... But yes, that works too...

---

Now that we're talking about objects... this jas led me to become very curious how all that data works (~020322EC... etc.)
For Felix... when you are on a moving platform, it sees that the last 32-bit number... is a pointing to the object you are on.

Object data
+00 = Movement Script pointer
+04 = Relative poisition in movement script
+06 = Direction facing
+08 = Current X
+0C = Current Z
+10 = Current Y
+14 = Z of floor
+18 = X dimension related?
+1C = Y dimension related?

+22 = Collision layer index

+38 = Destination X
+3C = Destination Z
+40 = Destination Y

+50 = Pointer... (I think it is sprite related stuff.)

+68 = Home X
+6A = Home Y

+7C = Pointer to object you're on top of?



---
So no height info?
« Last Edit: January 17, 2017, 08:01:25 AM by Fox » Logged

Golden Sun Docs: Broken Seal - The Lost Age - Dark Dawn | Mario Sports Docs: Mario Golf & Mario Tennis | Misc. Docs
Refer to Yoshi's Lighthouse for any M&L hacking needs...

Remember kids! Before you go on that interview, remember to wash your hands in teawater! *Coughs on hand* (Excuse me, I just coughed up a little teawater, so they're still clean!) You wouldn't want that hiring manager to be unimpressed.

May the force be with you!
Shoo! Why does it smell in here?
Maybe that's the wrong kind of force. *smirk*
View Profile
Salanewt
His Sexiness
Mercury Clan

Oh yeah, baby!

Prodigy
*

Coins: 32
Offline Offline

I am: A part of the organization of Cool Cats, but more of a dog person in reality.
Emblems: Have a nice day.
Posts: 4569

« Reply #4 on: January 17, 2017, 08:14:37 AM »

A separate hop would make more sense, lol.

That's also very interesting. It doesn't seem to be the same for stationary objects, but it looks like almost any moving object will have a pointer; just tested with a floating block in Jupiter Lighthouse. Makes me wonder if stuff at any of the Rocks will do it too...


Aw.
Logged

Oh yeah baby, £ me harder.

Fusion is just a cheap tactic to make weak Adepts stronger.

Yoshi's Lighthouse is a hacking website in progress. Why not check it out if you like Yoshi or the Mario & Luigi games?
View Profile WWW
Pages: [1]   Go Up
  Print  
 
Jump to:  

Cbox
December 09, 2018, 07:43:31 PM
Fox: A banana for you, a banana for me, let's all open a banana and enjoy!
December 08, 2018, 09:48:52 PM
Drake baku: ba... ba.... bana.... bana.... banana.... nanananananananana..... and now back to doing normal, kinda
December 07, 2018, 05:43:02 PM
Luna_blade: Hey I forgot the christmas theme
November 29, 2018, 09:01:09 AM
zman9000: ded
November 19, 2018, 11:05:28 AM
Drake baku: Good day to ya all
October 30, 2018, 09:45:58 PM
Atrius: There used to be where I got the battle sprites for Kraden, but that site doesn't exist any more.
October 26, 2018, 01:31:40 PM
Infitek: Do you know if there any custom Alex battle sprites available on the internet ?
October 26, 2018, 01:31:01 PM
Infitek: Hey everyone
October 13, 2018, 03:23:06 AM
Salanewt: Updated it to provide more info that I forgot to mention.
October 13, 2018, 03:16:48 AM
Salanewt: I'm still trying to iron out IQ 2 but I'm pretty sure it's entirely random targeting.
October 13, 2018, 03:16:29 AM
Salanewt: Oh yeah, I posted some more info about enemy IQ.
October 12, 2018, 09:51:27 PM
FoxThe HTML5 project is too small to count
October 12, 2018, 06:19:48 AM
Luna_blade: there is jjppof's html5 project...
October 12, 2018, 06:19:17 AM
Luna_blade: Though Momo rings a bell it seems I came here after you left
October 11, 2018, 12:49:41 AM
Fox: (If that makes sense.)
October 11, 2018, 12:48:33 AM
Fox: Yeah, I guess so.  More just saying that's a good place to get answers to GS related questions at the moment.
October 11, 2018, 12:42:28 AM
Crystal Sonata: I did before, but I guess I could try it again
October 11, 2018, 12:41:32 AM
Fox: Not much at the moment. This forum seems pretty quiet. Perhaps you'd be interested in joining the Discord for GSHC that seems to have more activity?
October 10, 2018, 11:16:53 PM
Crystal Sonata: Any projects going on? I need a distraction from the daily grind and I'm interested in hacking GS again.
October 10, 2018, 10:02:53 PM
Fox: Thanks, and good to see you too!

Affiliates
Temple of Kraden Golden Sunrise
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.092 seconds with 22 queries.