The Pixel storage
We will see where we stock the graphics stuff for a NES game.
Chr is Character data, the banks to stock you tiles for sprites and BG elements.
Prepare yourself because you will have only 8K (8192 bytes) that means 512 tiles.
This time we will see the place we can use to stock our graphic data.
We have a bank of 512 tiles. Normaly the bank is separate in 2, each can contain 256 tiles.
Super Mario Bros use it like this:
One bank is for the Sprites: Characters, ennemies, effects, items…
The other one is for the BG: Decorative element, letters, coins…
Personaly i like this way to store the graphics. But you can mix all, nothing is fixed.
You have 8K to store all what you want and decide after what will be a sprite or a BG element. You can use the same tile for both.
Have a look to the Banks of Super Mario Bros , left for sprites , right for BG elements.
Ok sorry, it’s again some limitation but people could make some games with this space. Look Super Mario bros, Donkey Kong. They are great!
If your gameplay is nice and you feel blocked with this little space for graphics, think about a simple and minimalistic graphics. What ever you can make, a nice gameplay will always by the basis of your game. Graphics are just here to make it nicer.
We will see after how to get more space for Graphics. To explain you and to make it simple (because it’s more complicated): you can only use this chr bank per frame on a tv screen . So it will be necessary to update graphics and replace them to have more in some specific time. Different levels, ennemies, extra-big boss etc. For the moment, we will concentrate oursleves only in this CHR bank.
The best thing is to create element that you can combine many times. It’s a very good exercice, to limit yourself to use only this chr bank for a game.
Title screen, letters, levels, hero and ennemies.
During this Tutorial’s serie, i will use the management system of Super mario Bros for CHR Bank. One bank for Sprite, the second one for BG. But you can make as you want for our project.
Sprites in CHR’s Bank
The bank are numered in hexadecimal too. Starting from $00 (0) to $FF (255), the $ signs means it’s a value. And this value need to be store in an adress. We will see this after in details. We are here to create graphics.
You can noticed the sprites are cutted, like slices. Why?… because you have two possibilities to add sprites on screen, first one is too add it with many small tiles (8x8px), the second is with a bloc of 2 tiles (8x16px). Many sprites are more bigger as 8x 16px, it’s necessary to separated in different parts and recompose it till you create your full-sprite on screen. we will take the first line of the sprite’s CHR bank (sprites).
We will need to cut our sprites in this format (8x16px) to place it correctly in the CHR bank.
BG in CHR’s Bank
For the CHR bank for BG, you need to manage correctly the space. When you will start to make a game, don’t forget the place for letters, point and symbols you want to had on the screen. Better to let 3 line’s free for this and have space for sloving graphics problem.
Like in Super mario, my technic is to let 3 lines empty. Even if you are working on BG elements, better to let this space since the beginning for letters, numbers, special characters, basic block colors. Here are the 3 first lines, the space from $00 to $2F:
When will come the time to make texts or title screen and you will have this space, you will be glad. Everybody have his own way to manage this bank, so I guess you will find the best solution for your project.