How To

How to have an animated background layer

1

Anywhere Games 2022-06-15 21:27

How would one use sprites to animate a background layer? The Sprites in question are supposed to replace the green in the BG.

Colorless.nx | Open in app
2022-06-15 21:27

nathanielbabiak 2022-06-16 03:52 (Edited)

The graphics on this console are pretty complicated. If you revise your question based on the following terms, I (or others) can give pretty specific advice. :-)

This video explains it pretty well for a similar console.


Anywhere Games 2022-06-16 04:42

That definitely just blew my mind, makes me appreciate the time I owned a Gameboy Color all the more.


Anywhere Games 2022-06-16 04:45

And it gave me an Idea.


was8bit 2022-06-16 16:41

A few more thoughts...

The VISIBLE portion of the screen is 20x16 ... x range 0-19, y range 0-15

Sprites can be set at 1x1, 2x2, 3x3, or 4x4 blocks of characters... once set to a size you only need reference the one character# of the upper left corner of the block


was8bit 2022-06-16 16:47

You can animate sprites simply by changing the referenced sprite#

To animate a single cell on a background, simply use CELL X,Y,chr# to change a single cell..

Alternatively, you can use COPY to change the image in memory that will change the image inside the memory, which effectively changes ALL cells with that image...


was8bit 2022-06-16 17:00 (Edited)

Here is an example of how you might animate a background :)

https://lowresnx.inutilis.com/topic.php?id=2445


Anywhere Games 2022-06-16 21:28

Another question is there no Sprite Layer?


McPepic 2022-06-17 00:44

There is a sprite layer. It's on top of both backgrounds (unless you change priority). A sprite gets put on the sprite layer as soon as it's created. You can set the position, character, and attributes of any sprite indexed 0-63.


was8bit 2022-06-17 06:06 (Edited)

Sone additional notes on sprite layers..

1) sprites layer over other layers in order, and you cannot change this ... so sprite #0 is above all other sprites... sprite #1 is under #0 and above spr#2,3,etc... and lastly, sprite #63 is ALWAYS below all other sprites

2) SPRITE HIT(0) command will only return one hit result... it will always be the “higher” sprite... so if sprite #0 hits both spr#10 and spr#12 ... only sprite#10 will be returned to the HIT variable...

So if you have 10 possible sprites that can hit a spr#, and you need to know which ones do hit and which ones don’t hit, you have to individually check each one..


was8bit 2022-06-17 06:10

If you have 10 sprites that are the same, and it doesnt matter WHICH of them it, just if one or more hit, then give all ten sprites sequential #s, and the SPRITE HIT command lets you check a range of spr#s


Anywhere Games 2022-07-03 00:54

Can one use BG 1 and BG 1 PRIO 1 as two different BG Layers?


McPepic 2022-07-03 13:52

@Anywhere Games Unfortunately, no. The background priority only affects whether the background cell is drawn in front of sprites with a a lower priority.


Anywhere Games 2022-07-03 20:47

Darn, How would one print Text on a PRIO 1 BG?


McPepic 2022-07-03 20:51

Same way you print text regularly. Before you print the text, type PRIO 1.


Anywhere Games 2022-07-04 21:34

Ok, Thanks! :D


Log in to reply.