Skeetendo

’Cause all games were better on the GBC

You are not logged in.

  • Index
  • → Help/Question
  • → [pokered] Creating overworld sprites larger than 2x2 tiles?

#1 2019-03-03 08:37:57

KeiTaRo
Member
Registered: 2015-12-05
Post 57/71
Website

[pokered] Creating overworld sprites larger than 2x2 tiles?

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)

Offline

#2 2019-03-08 00:53:25

KeiTaRo
Member
Registered: 2015-12-05
Post 63/71
Website

Re: [pokered] Creating overworld sprites larger than 2x2 tiles?

33p7too.png

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)

Offline

#3 2019-03-08 13:35:38

Miksy91
Member
Registered: 2010-10-16
Post 2,345/2,346

Re: [pokered] Creating overworld sprites larger than 2x2 tiles?

Nice work :thumbs_up

Offline

#4 2019-03-09 02:58:02

KeiTaRo
Member
Registered: 2015-12-05
Post 66/71
Website

Re: [pokered] Creating overworld sprites larger than 2x2 tiles?

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? :\

33l1m36.png

Last edited by KeiTaRo (2019-03-09 02:58:53)

Offline

#5 2019-03-23 04:50:00

IceGod64
Member
Registered: 2016-02-09
Post 14/22

Re: [pokered] Creating overworld sprites larger than 2x2 tiles?

Wow, that's pretty slick anyway. I'm sorry I can't offer much help.

I love those screenshots, something about the idea of playing Pokémon R/B/Y in full color just delights me.

Offline

#6 2019-03-31 18:25:43

Rangi
Member
Registered: 2016-05-09
Post 889/894

Re: [pokered] Creating overworld sprites larger than 2x2 tiles?

I have some understanding of the Gen 2 sprite/object system (here's some documentation), but none of Gen 1.

Can you simply break the large doll into four sprites?


Pokémon Polished Crystal (GitHub) — version 2.2.0 released
Pokémon Red★ and Blue★: Space World Edition (GitHub) — updated August 19!
Polished Map: pokecrystal+pokered map, tileset, and palette editor — version 4.1.0 released!

Offline

  • Index
  • → Help/Question
  • → [pokered] Creating overworld sprites larger than 2x2 tiles?

Board footer

Powered by FluxBB