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.
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. :-)
All graphics in LowRes NX are based on characters. A character is an 8x8-pixel image.
Sprites are independent objects, consisting of references to characters, which can be freely moved on the screen.
A background is a map of 32x32 characters, which is used for cell (i.e., text and tile) based maps or images. Each cell has the information of which character it references.
The display is composed of 3 layers, which are from back to front: Background 1, Background 0, and Sprites.
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 :)
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