Sprites vs Shapes
Sprites vs Shapes
Hi all
Can anyone explain to me what the important differences are between sprites and shapes in SmartBASIC? Are there performance advantages to one over the other or does it simply come down to how they're stored in memory (bitmap vs vector)?
Can anyone explain to me what the important differences are between sprites and shapes in SmartBASIC? Are there performance advantages to one over the other or does it simply come down to how they're stored in memory (bitmap vs vector)?
Re: Sprites vs Shapes
I am not sure if SmartBasic uses the sprites to implement the Shapes or not but the main difference is that the sprites use the video processor to create up to 32 sprites that are overlaid onto the screen image and I believe the Shapes are actually just written onto the graphics screen and become part of it. Again I could be wrong - I personally have not used shapes since my Apple ][ days.
Milli
Re: Sprites vs Shapes
Ah okay, I do remember reading something about a sprite being treated like a layer of sorts. Since a sprite is native to the video processor I’m guessing it would come out way ahead performance-wise too.
SmartBASIC 1.0 apparently didn’t have support for sprites but they are available in version 2.0.
SmartBASIC 1.0 apparently didn’t have support for sprites but they are available in version 2.0.
Re: Sprites vs Shapes
One limitation of the 9918 VDP is that you can only have 4 sprites on a single row. Additional ones will not be displayed. So when you are programming with sprites, you need to make sure that situation does not occur.
Re: Sprites vs Shapes
Does this mean that more than 4 sprites can't appear at the same y-coordinate regardless of what their x-coordinate is?
Re: Sprites vs Shapes
You need to get the PDF versions of "The Hackers Guide to ADAM Vol. I & II" with volume II being more SmartBASIC specific.
Also, download the disk image of SpritePower by Digital Express. This is a well down sprite creation program using a SmartKEY interface and there is a SmartBASIC 1.0 sprite loader program that will load a sprite set into memory and allow you to use them. Another good source of SmartBASIC info are the PDF'ed newsletters of Nibbles & Bits... especially look for the listing of the game Puff as it will provide plenty of examples.
Also, download the disk image of SpritePower by Digital Express. This is a well down sprite creation program using a SmartKEY interface and there is a SmartBASIC 1.0 sprite loader program that will load a sprite set into memory and allow you to use them. Another good source of SmartBASIC info are the PDF'ed newsletters of Nibbles & Bits... especially look for the listing of the game Puff as it will provide plenty of examples.
Re: Sprites vs Shapes
Thank you very much for all the recommendations. I will definitely give SpritePower a try. I have the Hackers Guides but just sort of skimmed them so far.
Good to know that SmartBASIC 1.0 can do sprites too! I was hoping to stick with 1.0 anyway since most of the example code that has been published over the years uses that as a target. I already found the solution to the rem/data bump bug in one of the newsletters (maybe NIAD!) so that’s not a problem anymore either.
Good to know that SmartBASIC 1.0 can do sprites too! I was hoping to stick with 1.0 anyway since most of the example code that has been published over the years uses that as a target. I already found the solution to the rem/data bump bug in one of the newsletters (maybe NIAD!) so that’s not a problem anymore either.
