mirror of
https://github.com/NovaSquirrel/NovaTheSquirrel.git
synced 2026-01-16 23:13:17 +01:00
Page:
Engine overview
No results
1
Engine overview
NovaSquirrel edited this page 2016-07-31 06:31:19 -04:00
Table of Contents
Princess Engine is an NES platformer engine with similar goals and features as President, named because of its intended use and because it has higher required specs than President (PRG RAM required).
System requirements
- NES
- choice of UxROM with PRG RAM, MMC1, MMC3 or Mapper 28
- 128 KiB to 512 KiB PRG ROM
- 8 KiB of CHR RAM
- 8 KiB of PRG RAM
General details
- 12.4 fixed point in coordinates, so that the most significant byte goes up in increments of metatiles
- horizontal scrolling only (up to 8px/frame)
- sprite HUD instead of needing sprite zero or an interrupt
- NMI routine has slots for updating metatiles in the nametable and a slot for updating 4 CHR tiles
Sound
- Pently music engine
- lag doesn't affect music playback
Graphics
- list of PPU resources containing CHR compressed with pb53 and palette information
- levels specify a list of PPU resources needed and they are uploaded when the level is loaded
- levels choose four .5KB sprite graphics banks; sprites detect which one contains the needed tiles
CHR RAM $0xxx: 0x: |\ COMMON: Tiles that are always loaded during gameplay 1x: | \ 2x: | | 3x: | / 4x: |/ 5x: |\ TERRAIN: Theme-specific tiles like ground and such 6x: | | 7x: |/ 8x: |\ EXTRA: Additional backgrounds, foreground tiles, etc 9x: | \ ax: | / bx: |/ cx: |\ DECORATION: Small background sets dx: |/ ex: | ? fx: | DYNAMIC: Special use CHR RAM $1xxx: 0x: |\ Player tiles 1x: | \ 2x: | / 3x: |/ 4x: |\ Common 5x: | \ 6x: | / 7x: |/ 8x: |\ Slot 1 9x: |/ ax: |\ Slot 2 bx: |/ cx: |\ Slot 3 dx: |/ ex: |\ Slot 4 fx: |/
Levels
- 256x16 map of 8-bit metatile IDs (4096 bytes)
- level is split up into 16x16 screens that can be linked to each other vertically, and scroll stops can be inserted in-between screens horizontally
- stored in ROM as a series of rectangles which is then processed to add edges and corners
- backgrounds can be added after the level is decompressed
- data can be stored per-column that specifies destinations for doors, contents of ? blocks, etc
Sprites
- only 128 maximum sprites types, but sprites have 4 bits for variants when spawning them in the level
- each sprite can opt-in for common sprite behaviors instead of explicitly calling routines in their handlers
Metatiles
- 256 maximum metatiles
- palettes can be assigned freely per-metatile
- metatiles can be solid on top, solid on all sides or not solid
- metatiles can specify an "interaction type" out of 32 (water, ladder, etc)