Jump to content
  • entries
    21
  • comments
    39
  • views
    19,892

[KM] Let there be Sprite!

Sign in to follow this  
Hornpipe2

446 views

Progress continues slowly. I wrote up a little C application to take BMP files and spit out assembler BYTE codes, so I can draw sprites in MSPaint and not have to punch in hex codes by hand. The colors are off and I end up fixing them manually, but it seems to work okay for the actual pixel on/off data.

 

Here's the current build showing my fighters standing ready. They're 40 pixels wide, and 21 lines tall shown 3 times each, for an effective 40x63 sprite. New animation frames will probably come next, as well as dynamically building the sprite color table in RAM each frame so I can have two differently colored players. That way I can store sprite colors in a special format as there are only 4 colors used (uniform1, uniform2, skin, hair) and that means 2 ROM bits instead of 8 - I would then unpack it to 8-bit colors before starting the frame.

 

Maybe I'll even let players pick the uniform color in the final version - we'll see.

Sign in to follow this  


6 Comments


Recommended Comments

Would this be a case where flicker could be done every other scanline, instead of the entire object every other frame?

Share this comment


Link to comment
Looks good! Nice looking fighters.

 

So they are flickering, right?

Thanks! I'm not much of an artist so this was the best I could do...

 

Yeah, they flicker at 30hz. I turned on "Use Phosphor" with amount 77 in Stella to capture this image.

Share this comment


Link to comment
Would this be a case where flicker could be done every other scanline, instead of the entire object every other frame?

Unfortunately, I don't see a way that would work. My display kernel is pretty tight as-is and I think situations where the sprites are very close or very far apart would break it. It would be really awesome though!

Share this comment


Link to comment

Looks nice Hornpipe. Keep up the good work.

 

Looks good! Nice looking fighters.

 

So they are flickering, right?

Thanks! I'm not much of an artist so this was the best I could do...

 

Yeah, they flicker at 30hz. I turned on "Use Phosphor" with amount 77 in Stella to capture this image.

TROGDOR smacks himself in the head with his big beefy arm.

 

I've been using Stella for over a year now, and I didn't even know that feature existed. No more hand editing screen shots for me! ;)

Share this comment


Link to comment
Unfortunately, I don't see a way that would work. My display kernel is pretty tight as-is and I think situations where the sprites are very close or very far apart would break it. It would be really awesome though!

 

Having two freely-mobile 40 pixel players with flicker-blinds would be tough. If the players were 24 pixels wide instead that might make things a lot easier. In that case, each scan line would have one "single" sprite and one "double". Thus, there would only need to be one write performed during the scan line. I'm not sure how many different versions of the code would be required to deal with the need to hit HMOVE at about the same spot each line. That would be a complicating factor.

 

If both players were 32 pixels wide, then both would have to be written during the visible part of the line. Every possible scenario could be handled with code (sometimes using VDEL, sometimes not) but I can't think of any way for practical code to allow much mobility.

 

If you didn't mind having a couple of vertical stripes running down the two human characters, and if you didn't mind limiting motion to 3-pixel increments, it would probably be possible to show two 31-pixel-wide players on alternating scan lines with no flicker. Not sure if that would be useful or not.

Share this comment


Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...