Any way to load separate character files for each background? :3

1

Sylveon 2025-11-21 20:58

Read the title


was8bit 2025-11-23 15:58

Nope....

Once you start using another file for your character set, it immediately applies all of the new characters to all existing layers (BG 0, BG 1)

The actual images are not stored in any background layer.... they only hold a number 0-255, thats it...

So, changing the image file doesnt effect the BG layers directly...

I fact, you can use this as a "trick"... if you use code to change an image in the character file, the result will be that all instances of that image# will change to the new image.... you can use this trick to animate all occurrences of a specific graphic#


was8bit 2025-11-23 16:07

Check this example...

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


was8bit 2025-11-23 16:17 (Edited)

So, the lava flowing down is character #1... but the code keeps changing changing the image for character one... all instance of character 1 keep changing because lowres uses the graphic file to display the image for image 1 to all instances of image#1 stored in the background file...

#1 is what is stored in the background file...

The image file supplies the actual image to use for every instance of #1 in the background file...

Both background layers use whatever the current graphics file is being pointed to...


Sylveon 2025-11-23 18:14

@was8bit oh ok so the Background holds (basically) a 2D array with the character id (0-255) and it relies of the characters to display an image, and once you update a character id, all blocks that use that character id automatically update? :3


was8bit 2025-11-24 04:55

Yeppers ;)

To clarify, backgrounds only hold a number 0-255

Your graphics page references #0-255 as well…

IF your code edits there graphics page, it immediately effects what you see

IF you load a whole new graphics set, this will immediately effect all of your backtgrounds, using the updated graphics set (0-255)

You may also store extra backgrounds…. Most useful, for example, if your game uses a background as a map that the player must navigate

… the possibilities are endless… but at the cost of only 256 bits at a time (0-255)


Log in to reply.