Author Topic: I'm having some trouble with sprite editing. (Now sprite assembly)  (Read 6713 times)

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1776
  • Nu-chan
    • View Profile
    • Hi trig!
I'm working with Ozzie's sprite, and I have the graphics and palette available. The problem is I can't figure out how to work with the jumbled tiles it gives me.

What am I missing?
« Last Edit: February 08, 2008, 08:03:50 pm by Mauron »

Geiger

  • Guru of Life Emeritus
  • Chronopolitan (+300)
  • *
  • Posts: 315
    • View Profile
    • Geiger's Crypt
Re: I'm having some trouble with sprite editing.
« Reply #1 on: February 06, 2008, 04:44:48 pm »
Probably nothing.  Sprites are not typically stored as seen in game, but rather in all their component parts.

For example.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1776
  • Nu-chan
    • View Profile
    • Hi trig!
Re: I'm having some trouble with sprite editing.
« Reply #2 on: February 06, 2008, 04:53:28 pm »
Same idea, different enemy.

Is there an easy way to work with them in a way I can picture?

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #3 on: February 06, 2008, 05:17:19 pm »
There may be some logic to the way sprites are stored in Trigger (Geiger and Chickenlump would know more than I); it looks like that Nu can be pieced together row by row just about. Seiken Densetsu III tile storage is an absolute nightmare compared to this!

Mauron, a reference may be of some help with Ozzie:
http://www.chronocompendium.com/Term/Image:Ozzie_Sprites.gif.html

Also, could you post a 1:1 (normal zoom; should appear like the reference I linked to above) ratio screencap of the Ozzie tiles you have? It may be a quick job to assemble them and throw a grid over the assembled sprites so you can keep track of the tiles while you edit.
« Last Edit: February 06, 2008, 05:21:30 pm by FaustWolf »

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1776
  • Nu-chan
    • View Profile
    • Hi trig!
Re: I'm having some trouble with sprite editing.
« Reply #4 on: February 06, 2008, 05:47:46 pm »


That's the layout I've been given by default, and the closest thing to a sensible version of it.

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #5 on: February 06, 2008, 06:43:37 pm »
Alrighty, I believe the subtiles for Ozzie's sprite sheet are stored like so:


This grid will help you keep track of how all the subtiles are arranged in each frame as you assemble, so you can be sure to snap them back into the right places once you're finished editing. For example, it appears that one of Ozzie's frames is composed of subtiles 100, 101 to its right; 110 and 111 below those, etc. See the image attached to this post for what should be a very effective reference for the assembly. The game probably mirrors the first rectangle of subtiles (range 0x100 ~ 0x131) to make a complete sprite, so keep symmetry in mind as well.

I believe Ozzie's sprites are compressed in the ROM, correct? Keep in mind that if your edits create a net positive change in the post-compressed file size, pointers will have to be altered, and life will suck. To what extent do you plan to edit the sprite?

As far as tips for how to keep the post-compressed size as low as possible, that would depend very much on the compression method. Geiger, are these RLE compressed?

RLE = Run Length Encoding. That means if you've got a row of 100 pixels that are black, the ROM can store that as one black pixel and an instruction to make the next 99 pixels the same. So every time you interrupt a string of identical pixels, you're upping the post-compressed file size. I *think* that's how RLE works, at least.

[attachment deleted by admin]
« Last Edit: February 06, 2008, 06:53:13 pm by FaustWolf »

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1776
  • Nu-chan
    • View Profile
    • Hi trig!
Re: I'm having some trouble with sprite editing.
« Reply #6 on: February 06, 2008, 07:31:35 pm »

I believe Ozzie's sprites are compressed in the ROM, correct? Keep in mind that if your edits create a net positive change in the post-compressed file size, pointers will have to be altered, and life will suck. To what extent do you plan to edit the sprite?

Yeah, they're compressed.

For now I'm just playing around with this, so as long as I can interact with Ozzie, I'm good. Chances are I will screw up the pointers.

How does the game handle animations? Does it reference a series of sprites or something?

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #7 on: February 06, 2008, 07:35:14 pm »
I imagine so. I think everything necessary for Ozzie's animations is stored in the graphics packet you've decompressed, so the game would alternately call various combinations of subtiles from this graphics packet as needed. It works very differently for animations in environment tilesets from what I gather, but you should be looking at Ozzie's entire sprite sheet with all animations included.

Vehek

  • Errare Explorer (+1500)
  • *
  • Posts: 1761
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #8 on: February 06, 2008, 07:46:57 pm »
The only thing I really know about sprite animations is some very old information Chickenlump once posted at ACMLM.
Quote
It goes something like this

00 01 02 03 04 FF


00 - first frame of walking animation
01 - second frame of walking animation
02 - third frame of walking animation
etc
Terminated by FF, so between every FF is an animation sequence, from running to
unsheathing a sword.
So, if you wanted to change Crono's win animation to show Crono Laughing instead, it would be all too easy (I've done it)
The bytes used are sprite assembly bytes.

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #9 on: February 06, 2008, 08:09:14 pm »
Quote
How does the game handle animations? Does it reference a series of sprites or something?
- Like Vehek posted.  Each sprite frame is in a number 00 = regular stance and what not.  Each sprite frame has Sprite Assembly which is used to call each tiny grid chunk into an X/Y position. 

Don't think the grid is hard to understand.  It's split in half on the first 3 things of him, that's because they're mirrored.  Sprite assembly calls the sprites on the right side and mirrors them, thus takin less room for sprites.  It's rather simple once you start messing with them.  Smart idea to start with something small instead of diving into the PC's first.

Mauron

  • Guru of Reason Emeritus
  • Errare Explorer (+1500)
  • *
  • Posts: 1776
  • Nu-chan
    • View Profile
    • Hi trig!
Re: I'm having some trouble with sprite editing.
« Reply #10 on: February 06, 2008, 08:42:23 pm »
I had a feeling I'd need that sprite assembly stuff soon.

The grid is making sense to me, but I'm not clear on the rest of it. Where does the frame list go? How does it determine which number is assigned to the appropriate sprite assembly?

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #11 on: February 06, 2008, 08:57:29 pm »
The grid I threw over the graphics packet is for manual assembling purposes only, and probably doesn't refer to the actual values assigned to the subtiles within the ROM...unless we're incredibly fortunate. Just wanted to throw that out there in case you're going so in depth that you'll need subtile labels.

JLukas

  • Fan Project Leader
  • Squaretable Knight (+400)
  • *
  • Posts: 426
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #12 on: February 06, 2008, 11:26:47 pm »
Have a look at this older thread for more details on sprite assembly:

http://www.chronocompendium.com/Forums/index.php/topic,2872.0.html

Ex: Schala sprite assembly at 1E2B48-1E2EDF
$28 bytes per frame, $17 total (23 frames)

« Last Edit: February 06, 2008, 11:50:06 pm by JLukas »

FaustWolf

  • Guru of Time Emeritus
  • Arbiter (+8000)
  • *
  • Posts: 8972
  • Fan Power Advocate
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #13 on: February 06, 2008, 11:41:03 pm »
Judging from Vehek's first post there regarding sprite assembly, it would seem that I should revise the Ozzie sprite grid to start with 00 on the vertical axis instead of 01. If I can get confirmation on that, I'll revise and re-up. That way the grid will be in line with the subtile labels actually in the assembly section of the ROM.

justin3009

  • Fan Project Leader
  • God of War (+3000)
  • *
  • Posts: 3296
    • View Profile
Re: I'm having some trouble with sprite editing.
« Reply #14 on: February 07, 2008, 12:40:43 am »
Yes.  The grids are usually 00 to 255 or FF in hex.  Maybe 254 in norma numbers.  Goes across so 00 01 etc