Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

So you want to use dark green in GBS?

So you want to use Dark Green?

Well let’s start with the basics, in GB Studio actor sprites are made of 3 colors, plus the transparency. The transparency takes the place of the color “dark green” that is used in the GB background tiles. For this tutorial I will call the darkest shade "Black" and the lightest shade "White" to hopefully save some confusion.

Sprite hex color codes:

  • Black #071821
  • Green #86c06c
  • White #e0f8cf 
  • Transparency #65ff00

And just as a reminder background tiles use these four hex color codes:

  • Black #071821
  • Dark Green #306850
  • Green #86c06c
  • White #e0f8cf

**Transparency can't be used on BG tiles**


So how can you use dark green(#306850) for sprites in DMG mode?  OBP1!


Well inside of the GBS sprite editor, you can highlight the sprite tiles on the canvas. This brings up a toggle switch on the right side to select between OBP0 or OBP1. 

OBP stands for Object Palette. 

While OBP0 uses the standard 3 sprite colors, OBP1 switches Green(#86c06c) to Dark Green(#306850). But you still must draw your sprite with green! If you try to create a sprite tile with dark green within your sprite sheet, the dark green pixels will show up as black in your game. 



Now that we understand how the OBP switch works. What if we want to use all four colors in our sprites? Well it’s possible with stacking sprites. Just create a sprite tile with only Green(#86c06c) to layer on top of your normal sprite, highlight only the top sprites you want to turn it dark green(#306850).  Normally I pull these tiles off to the side and highlight it on its own, and then place the sprite on top.



But the downside to stacking sprites, is it can add up quickly to your overall tile onscreen limit(40 8x16 tiles onscreen at one time), and it also counts towards the hardware line limit(10 8x16 tiles per horizontal line). 



**The OBP switch does not work within  either of the GBStudio CGB color modes.**

Color Modes

Stacking sprites does work in color mode, since multiple palettes can be chosen for one sprite. This can lead to much more colorful sprites but at the cost once again adds to the Gameboys hardware limits of 40 8x16 tiles onscreen at one time, and 10 8x16 tiles per horizontal line.



Below you can see we changed the palette of the sword to a golden color (Palette 3) and then stacked another dark blue sprite tile (Palette 2) on top of our player sprite (Palette 1). GBS sprites only use 8 palettes slots per scene, so choose wisely.



Under the hood of DMG shades

Okay let's head back to DMG and look over the GBVM Operations listed in the GBS Docs.

 COL1,  COL2, COL3, COL4 

So each of these parameters are slots, and they require a value 0-3. With 0 being the lightest DMG shade, and 3 is the darkest shade. You can swap what shade is in which slot. This is how the OBP switch works, it changes the value of COL2 to be the dark green instead of green. 


For more info and resources on DMG palettes check out these links.

Nalas plugin: https://github.com/Y0UR-U5ERNAME/gbs-plugin-collection#set-palette-colors-plugin-not-updated-for-31-yet-for-gbc 

GBS Central tutorial: https://gbstudiocentral.com/tips/lights-out-dmg-custom-color-palettes-tutorial/

Or Join the GBStudio Discord and ask your questions in the Help channels. Loads of friendly and helpful folks in there!




*Sprites used above are from the FC/NES game Chronicles of the Radia War or Radia Senki*

Support this post

Did you like this post? Tell us