Enemy count in beat-em-ups

Discussion of hardware and software development for Super NES and Super Famicom.

Moderator: Moderators

Forum rules
  • For making cartridges of your Super NES games, see Reproduction.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: Enemy count in beat-em-ups

Post by psycopathicteen »

Artwork. I'm drawing a character who is 160 pixels tall.
Something I've began to think of is for me, metasprites are going to be a total pain in the ass to create. The problem is trying to figure out how to arrange everything to minimize the number of sprites per line is very time consuming. I don't know how feasible it would be to make a program that if you gave it an indexed picture (color 0 is transparent and would be able to be cut out) and told what you want to be the center point, if it could automatically generate the graphics and metasprite data.
That was one of the reasons why I ditched the Gunstar Heroes port. I forced every sprite to fit inside a 4 16x16 cells, which got tiring very quickly.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Enemy count in beat-em-ups

Post by tepples »

Espozo wrote:By animation, do you mean animation engine, or artwork you've created?
I myself would need the latter. First there needs to be a set of plausible test frames with which a software architect can refine the design of the engine. But the skills to make artwork and an engine often don't coincide. I can volunteer only for the engine.
Espozo wrote:Something I've began to think of is for me, metasprites are going to be a total pain in the ass to create. The problem is trying to figure out how to arrange everything to minimize the number of sprites per line is very time consuming.
For The Curse of Possum Hollow, each actor type's sprite sheet was accompanied by a text file listing the coordinates of a set of rectangular slabs that cover each cel. The sprite sheet converter read this file and turned it into a list of 8x16 pixel sprite tiles for each cel, arranged in horizontal strips. Optimizing the slabs was manual but not too difficult or time-consuming. In addition, each cel on of a sprite sheet could have other values and coordinates associated with it, such as the duration of each frame, the position and strength of hitboxes that a sprite deals during each frame, and how it interacts with physics.
Oziphantom
Posts: 1163
Joined: Tue Feb 07, 2017 2:03 am

Re: Enemy count in beat-em-ups

Post by Oziphantom »

Espozo wrote:By animation, do you mean animation engine, or artwork you've created?

Something I've began to think of is for me, metasprites are going to be a total pain in the ass to create. The problem is trying to figure out how to arrange everything to minimize the number of sprites per line is very time consuming. I don't know how feasible it would be to make a program that if you gave it an indexed picture (color 0 is transparent and would be able to be cut out) and told what you want to be the center point, if it could automatically generate the graphics and metasprite data.
I don't think it would be that hard, sprites are not very big, so you could just do a brute force approach and get reasonable times, given you don't change your artwork every build, even if you have to leave it "overnight" it wouldn't really be an 'issue'. For making optimal bounding boxes around 3D objects for collision 'we' use to have a Genetic Algorithm that would "search" for the optimal solutions. Yeah it took all night, but 3D volumes is a lot larger search space than a 64x64 2D array ;)
However I don't think the problem has a single dimension, sure min per line is nice, but you also have to be able to fit them all into RAM/ROM so you might want to optimise the player for example with min per line and min unique tiles. While a boss probably hang the RAM/ROM cost as they will be the only other thing on screen and flicker is your issue, so min per line.
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Enemy count in beat-em-ups

Post by Drew Sebastino »

Oziphantom wrote:I don't think the problem has a single dimension, sure min per line is nice, but you also have to be able to fit them all into RAM/ROM so you might want to optimise the player for example with min per line and min unique tiles.
I think there are few enough objects with identical sprites that you could manually make the metasprite. Anyhow, the way I'd do it is by looking for identical sprites first, and then do the least per line.

Hey, psychopathicteen, how are you handling the index registers and direct page in your metasprite routine? I thought I'd ask because I made it to where the metasprite data is indexed by y instead of direct page so it can be out of bank $00, but then I have to switch y back and forth between being a metasprite data offset and a sprite table offset, which is definitely slower than what I had.
psycopathicteen
Posts: 3001
Joined: Wed May 19, 2010 6:12 pm

Re: Enemy count in beat-em-ups

Post by psycopathicteen »

I use X for metasprite data, and Y for OAM.
User avatar
Drew Sebastino
Formerly Espozo
Posts: 3496
Joined: Mon Sep 15, 2014 4:35 pm
Location: Richmond, Virginia

Re: Enemy count in beat-em-ups

Post by Drew Sebastino »

What about the object table then?
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Enemy count in beat-em-ups

Post by tepples »

Saved to zero page and restored, I assume. Because there are a lot more metasprite and OAM table entries than object table entries, quickly accessing the object table in the draw step of the engine isn't quite as important.

During the move step, I tend to use X for the object table entry and Y for, say, the frame number or the other object's entry.
Post Reply