Here they are, for your convenience. These are not part of the rules, but you should make at least some effort to follow some of them. Namely the thing about 8x8-pixel tiles.
Note, there are ways to skirt around them a bit using scanline-sensitive or even cycle-exact hackery but you have to know what you are doing.
Most important thing: Everything is made up of 8x8-pixel tiles, and on the background layer these all scroll together on a uniform grid.
- Resolution: 160x144 pixels (AKA 20x18 8x8-pixel tiles)
- Framerate: 59.73fps
- Tilemap: 8x8 pixels per tile
- Background layer: 32x32 grid of 8x8 tiles, scrollable, and scrolling wraps
- Practically, you can use any size grid you want, as on the real hardware you'd replace tiles while they're offscreen.
- Colour gamut: 4 "colours"
- Sprite object sizes: 8x8 or 8x16 determined by a global flag - larger sprites are made up of
- Colours per BG tile: 4
- Colours per sprite: 3 + 1 transparent
- Palettes for background+window layers: 1
- Palettes for sprites: 2
And here's some of the tighter ones where you should consider them but you shouldn't actually enforce them:
- Max number of tiles in tilemap: 384 (with some nasty tricks), 256 (w/o nasty tricks)
- Technically you can stream in new tile data as you scroll. Think of this as a discouragement from having too much variance on a single screen.
- Max sprite objects: 40
- Max sprite objects per scanline: 10
If in doubt, check this: http://gbdev.gg8.se/wiki/articles/Pan_Docs
Just don't get distracted by the GBC/CGB stuff as that thing lets you do a lot of things that you can't do on the DMG.
Important notes:
- Respect the 8x8 grid.
- Respect the 8x8 grid.
- SERIOUSLY RESPECT THE 8x8 GRID IT'S NOT HARD
- Punch everyone who does not respect the 8x8 grid.
- There is a window layer. The actual specifics of it are kinda weird, but basically you set the top-left corner, you cannot scroll it past the top-left corner of the "screen", and everything rightwards and downwards is part of your window.
- In other words, if you use bidirectional scrolling, put the HUD on the bottom and/or the right, or use a small number of sprite objects.
- Yes you can just have it in the bottom-right corner.
- Yes, it's a grid of 8x8 tiles. Beginning to see a pattern here?
- Don't go overboard with parallax. There's only one background layer, and sprite-background priority is only determined on a per-sprite basis. But on real hardware you can abuse the scanline interrupt and adjust the horizontal scroll, or you can scroll a few tile bitmap entries if you know what you're doing. Looking at those options:
- The scanline-interrupts method will scroll the whole horizontal section of the background layer.
- The tile-bitmap-scroll method will scroll every instance of a few given tiles. Feel free to emulate that using separate scrollable layers. Although in this case... yes, it'll have to be 8 high, and probably 8 or 16 or 32 wide.
- Respect the 8x8 grid.
- Sprites are 3 colours plus transparent, not 4. If you want to use all 4 colours, you can overlay sprite objects. Some GB games did this, AFAIK some NES games did as well.
- Sprites use one of two shared palettes. The palette which is used is determined on a per-sprite basis. Yes, they have 3 colours each.
- All palette colours are sourced from the 4-colour gamut, so no, you will not get a 5th shade of grellow.
- DO NOT MAKE AN ACTUAL PERSPECTIVE 3D GAME UNLESS YOU ARE DOING IT FOR THE REAL HARDWARE IT WILL NOT WORK IF SOMEONE WERE TO TRY AND PORT IT TO REAL HARDWARE
- The closest you'll get to 3D is some form of orthographic projection. Isometric is kinda tricky here (it's best to go with 16x8 for each edge), but a basic oblique projection (e.g. the later Commander Keen games like Keen 4) should be fine.
- The closest you'll get to 3D is some form of orthographic projection. Isometric is kinda tricky here (it's best to go with 16x8 for each edge), but a basic oblique projection (e.g. the later Commander Keen games like Keen 4) should be fine.
- Pick or make a font where each character fits into 8x8, then respect the 8x8 grid and draw a character every 8 pixels across.
- Completely acceptable exception: Static HUD text can be proportional, but the width should ultimately be a multiple of 8 pixels, unless you implement the HUD as sprites.
- You still shouldn't spam lots and lots of sprites here!
- Completely acceptable exception: Static HUD text can be proportional, but the width should ultimately be a multiple of 8 pixels, unless you implement the HUD as sprites.
- Finally, respect the 8x8 grid.