You are not logged in.
I'm essentially trying to add in sprites like the giant Snorlax and Onix "dolls" from G/S/C to Red, and I'm unsure what code actually handles compositing the overworld objects.
I'm aware that PrepareOAMData creates the appropriate OAM slots for each overworld object, essentially creating "quarters" of each person object. I also know that each of these quarters is considered a unique sprite by the Game Boy. In its current state, every object on the overworld is comprised of four of these "quarters" to create a whole 2x2 tile object, and the graphics are swapped out on the fly when walking, turning etc. This much I understand perfectly fine.
Problem is that the large Snorlax sprite in GSC definitely uses more than four tiles. It is in fact a 4x4 tile object, and I'm unsure of what code actually is telling the game how many tiles to use for each object. Could someone point me in the direction of which function I should be looking at changing to add in this special case?
(also I'm aware that there's some mirroring used for Snorlax and Lapras, that's fine, I'll deal with that later)
Last edited by KeiTaRo (2019-03-14 05:31:37)
heh, I got it working I guess. Hijacked the OAM loading routine based on picture ID and had it load a unique set of parameters. Collision is wonky (only collides with the top left 2x2 quadrant) and it unloads once the top half is off-screen, but it's a step in the right direction. Next step will be making heads or tails of how sprite collision works..
Last edited by KeiTaRo (2019-03-09 02:48:19)
Nice work :thumbs_up
Thanks! The collision issue is proving to be a bit more tricky than I anticipated. From what I'm able to tell, the game isn't so much checking to see if you're colliding with a sprite, so much as it's checking if a tile can or cannot be passed through. If the tile has a sprite occupying it, then it will treat the tile as unpassable and apply collision. (please correct me if I'm wrong!!)
Issue is that despite the OAM loading the sprite as a 4x4 tile sprite, the game still only recognizes it as a 2x2 object and as such, thinks it is only occupying the top left quadrant of tiles. I'm basically stumped on what to do with this issue, and looking at GSC's code hasn't been terribly helpful as it handles things quite a bit differently. This also leads to issues like text boxes not disabling the sprite due to, again, thinking it is only occupying one tile (see below) ... I'm really stumped as to how to trick the game in to recognizing a single object as occupying four tile spaces as opposed to just one. Anyone have experience with this? :\
Last edited by KeiTaRo (2019-03-09 02:58:53)