Page 1 of 1

New demo uploaded: 64x64 Ship Sprites

Posted: Fri Jan 29, 2021 3:38 pm
by rje



64x64 Ship Sprites




View File






This simple demo loads five 64x64 8-bit sprite images into VRAM, each an ancient sailing ship.  Sprite 0 is turned on to point at them; press spacebar to cycle through the images.

Use the cursor keys to move the sprite around the screen.  The spacebar will also stop the movement.

 






  • Submitter




    rje




  • Submitted


    01/29/21




  • Category







 

New demo uploaded: 64x64 Ship Sprites

Posted: Fri Jan 29, 2021 3:43 pm
by rje

There is one thing that bothered me just a bit about sprites in this demo: selecting the RAM window for the image sort-of requires a VPOKE to *TWO* addresses.  Here's why.

A 256 color 64x64 sprite takes up 2K RAM.  So a list of them starting at $04000 would be at these nice even addresses:

$4000

$5000

$6000

$7000

... and so on.

But, the way the sprite window is split between two memory registers, you'd have to VPOKE to two addresses to do this.

So for the demo, I aligned these images on $2000 byte boundaries:

$4000

$6000

$8000

$A000

$C000

Leaving 2K gaps between each.

It's not a major big deal, but every little odd corner adds up.


New demo uploaded: 64x64 Ship Sprites

Posted: Fri Jan 29, 2021 3:48 pm
by rje

As for the sprites themselves, I think they look just a little too jaggy.  I have a set of greyscale images that I'll try next.

...yes, greyscale looks a bit better, but perhaps the jaggies are mainly from the "flashier" ships like the Genoese Galley and the Xebec.

 

Now the greyscale looks like it's constrainable into a 4 bit scheme, which means these sprite images could shrink from 4K down to 2K, which would be nice.

 

SHIPS-BW.PRG


New demo uploaded: 64x64 Ship Sprites

Posted: Sat Feb 06, 2021 3:25 pm
by rje

Updated the demo.

* removed user control; ship wanders aimlessly

* added 7 more ships

* added some mild flocking behavior in the additional ships


New demo uploaded: 64x64 Ship Sprites

Posted: Sat Feb 06, 2021 4:58 pm
by Fenner Machine


On 1/29/2021 at 3:43 PM, rje said:




A 256 color 64x64 sprite takes up 2K RAM.





Is this correct?


A 64x64 sprite at 8 bits per pixel (256 colour) would take 4K RAM?


Or am I missing something?


New demo uploaded: 64x64 Ship Sprites

Posted: Sat Feb 06, 2021 6:11 pm
by rje


1 hour ago, Fenner Machine said:




Is this correct?



A 64x64 sprite at 8 bits per pixel (256 colour) would take 4K RAM?



Or am I missing something?



You're right.  It's my brain.