Ultimate Amiga
Network Boards => AMOS Programming Environment => AMOS Factory => AMOS BASIC => Topic started by: rednova on August 21, 2015, 12:18:38 AM
-
Dear Amos Friends:
I have no experience using sprites and bobs.
I am looking forward to learn, as I want to make new amos games
that use sprites.
Any tips for a newbie ?
-
Sprite graphics use colors 17 to 31 in the palette even if the screen uses fewer than that. You can only have four of them horizontal from each other unless you use fewer colors. They cannot be wider than 16 pixels wide without stacking them horizontally. The first color entry is always transparent and the lower numbered sprites overlap the higher numbered ones.
Bobs are slower than sprites but use the whole screen palette. The bigger they are, the slower they get.
-
To elaborate a little...
For 4 colour sprites, colours 17,21,25 and 29 will be the ones used for transparency.
For 16 colour sprites colours 17 and 25 will (I think) be used for transparencies.
Also, there is no limit on how tall a sprite can be (although they are rarely larger than the screen).
I hope you have fun playing with Sprites :)
-
@Lonewolf10
Your numbers are not correct. The transparent background shows through 16 because you're supposed to start with zero as the first entry.
Also, sprites aren't arbitrarily tall. The maximum height is 126 pixels. This is due to the way sprites are stored in memory.
@rednova
For 3 color sprites, entries 17, 18, and 19 work on sprites 0 and 1. Colors 21, 22, and 23 work on sprites 2 and 3. Colors 25, 26, and 27 work on sprites 4 and 5. Colors 29, 30, and 31 work on the last two sprites, 6 and 7.
I'd avoid using 3 color sprites for now though. It only lets you use twice the amount of sprites.
-
You can use 'Set Sprite Buffer 256' to change the height of your sprites to the same height as a PAL screen.
Also, you can layer 3 colour sprites on top of each other to create more colours in your image.
On another note, its nice to see people getting back into AMOS again.
-
That's not how it works. Computed sprites copy all of the uses of a sprite channel into one buffer. The first line contains information about the coordinates and height of the sprite in rows. Since the height is 7 bits and the result must be even, 126 is the maximum height of a sprite image.
AmosPro will automatically stack sprites to make them appear bigger than possible in the hardware. This comes at the expense of additional sprites.
-
@Lonewolf10
Your numbers are not correct. The transparent background shows through 16 because you're supposed to start with zero as the first entry.
Ack! That always catches me out.
Thanks for the correction :)
Also, sprites aren't arbitrarily tall. The maximum height is 126 pixels. This is due to the way sprites are stored in memory.
Is this an AMOS only thing? I have used sprites larger than 126 pixels (in fact it was the height of the screen, so ~250 pixels) before without any known issues in my All Square demo made in assembler.
-
According to this link to the Hardware Reference Manual (http://amigadev.elowar.com/read/ADCD_2.1/Hardware_Manual_guide/node00BB.html), there are actually 9 bits on the VSTOP. Maybe they can be taller than I thought.