Author Topic: Chrono Trigger Sprite Insertion -- Development of a Guide  (Read 18175 times)

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1756
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #30 on: November 13, 2008, 03:23:51 am »
A warning: I've tried to change a PC's sprite assembly size to 1. I don't know if I did it perfectly (I had a program convert the size 0 sprite assembly), but it glitched up when other PCs were in the party.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #31 on: November 13, 2008, 05:24:56 pm »
That's a bummer. Hope the game engine isn't hard-coded to read only Size 0 sprites correctly for the playables.

I'll try some Size 1 tests with Slash and see what happens.

_______

Vehek, were your glitches similar to what happens after 2:45 of this video, when Lucca joins? The sprites can apparently coexist, which is encouraging, but I'm pretty freaked out that the second character's sprite gets copied for some weird reason.

This test was a simple port of Slash's various data over Crono's, so it may have turned out better if I had coded the frames and animation by hand.

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #32 on: November 13, 2008, 06:11:18 pm »
It's a wild guess, but since it's extending the reach I guess it is of the sprites, maybe it's changing some areas of the 2nd PC's because it's also reading from the 1st?  I'm not sure.

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1756
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #33 on: November 13, 2008, 07:10:35 pm »
Vehek, were your glitches similar to what happens after 2:45 of this video, when Lucca joins?
Yes.
Right now, I guess that part of the copied-to-memory graphics overlap with the other PCs' graphics in memory/VRAM.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #34 on: November 13, 2008, 07:15:10 pm »
Damn, that's bad. Any way around this theoretically?

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #35 on: November 13, 2008, 07:40:08 pm »
Couldn't you move the graphics and SA of Slash or someone else to empty space?  Or would that still kill it.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #36 on: November 13, 2008, 08:15:31 pm »
I think it's a memory management issue, but I should try that out anyway. Interestingly, the problem corrects itself in battle. Do we know whether in-battle and out-of-battle memory management differ in any way?

Also, just wanted to report that in-game evidence once again supports our models of Size 1 sprite assembly. The following frame for Slash was hand-coded in a Hex Editor:


Argh, I'm still not up to snuff on palettes. Looks like my conclusion several posts ago was incorrect; the first palette position is the one that ends up being transparent in-game. But it seems like no matter what I do, I accidently point some pixels on my Slash bitmap to a transparent palette position. There aren't multiple transparencies in a single character's palette, are there?

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #37 on: November 13, 2008, 10:09:13 pm »
No there isn't.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #38 on: November 13, 2008, 11:37:56 pm »
justin, I shall have to come straight out and ask -- when you're creating a 12-color bitmap sprite for later insertion, what position in the image's palette (as viewed in your image editor) should you target for the image's background color? Do you need the first color specified in the palette to be the background color?

If there's a program that takes care of this automagically somehow, I'll just kick myself in the head for being such a doofus at palettes.

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1756
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #39 on: November 13, 2008, 11:43:08 pm »
What are you doing to import? For me, TileMolester seems to try and match-up the colors in the (png for me) file to the closest colors in the palette.

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #40 on: November 14, 2008, 12:03:39 am »
What Vehek said.  Tile Molester makes it a lot easier to work with.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #41 on: November 14, 2008, 12:08:57 am »
Hmm, I've been creating bitmaps in an image editor, importing the raw tiles via TileMolester, then using SNESpal to alter Crono's palette (with the whole division by 8 thing) and hoping like hell I'm specifying the colors correctly.  :mrgreen: I'll try a .png next time around and see if I have better luck. I'll get it eventually.

If it matters any, I should note that Slash's sprite (when specified to have a Size 1 assembly) "captures" the hand sprite that's on the menu screen. Say you check the party's status in the menu, then close out and go back to the game -- the tiles that make up the hand pointer sprite appear at the origin of Slash's sprite, just like Lucca gets re-copied and appears at the origin of his sprite when she's in the party in that video I posted.

I'm going to use VSNES to peek at the VRAM and see if there's any clues to be found.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #42 on: November 14, 2008, 01:03:42 am »
Ah, here's a tasty tidbit, but not sure if it tells us anything important. In the screen below, I thought Lucca's tiles were just overlapping Slash's:


We can isolate the sprites in VSNES to get a clearer look:


And VSNES also allows us to toggle individual tiles on and off. When the duplicate Lucca is erased, lo and behold, half of Slash - four tiles to be precise - are missing! They didn't seem to be loaded for some reason:


It's as if the game engine loaded up Lucca's tiles in place of Slash's tiles. Were the tiles vying for the same space in VRAM? I'm attaching two ZSNES save states, one with Slash by himself, and the second with Slash and Lucca in the party, in case they prove useful to others with more SNES VRAM experience than myself.

[attachment deleted by admin]

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1756
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #43 on: November 14, 2008, 04:09:41 am »
I'll try a .png next time around and see if I have better luck. I'll get it eventually.
I don't think it matters what file format you use. If you're going to keep on trying to import with TileMolester, remember this: Load your palette into tilemolester, then import the graphic.

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: Chrono Trigger Sprite Insertion -- Development of a Guide
« Reply #44 on: November 14, 2008, 09:06:16 am »
Load up a savestate in Tile Molester that has Slash's palette, add it to bookmarks.  Then it's simple and easy to load.  When you select it again, it may be wacked out colors, but just scroll through it, it'll have the correct palette.