Mode 3 Scrolling Game Engine Demo (WIP)
Posted: Tue Dec 27, 2022 11:08 pm
This is something that I've been working on sporadically since 2018, but until a couple months ago it was always just a super messy hack. I've recently started focusing on creating some new graphics and game engine mechanics that do not rely on the level data being randomly accessible, because in the future I want to stream it in from the SD card like in my previous demo.
For the time being, the level data is stored in PROGMEM just for simplicity, but it shouldn't be too hard for me to convert it to stream from the SD card later (requiring just a single sector read when new data needs to be loaded). Also, I just wanted to be able to draw the level in GIMP, and then have all of the tiles "come alive" by themselves without much configuration. Some additional PROGMEM arrays need to be stored in flash for the animations and collectables, but I use the whisper console ports to have the game automatically dump the commands for creating those data files, and then I just copy and paste the commands into the terminal and compile it again with that data included.
So far I have:
Although the smooth day/night transition is not enabled in this demo, you can still mess with the DDRC value by holding down SELECT and pressing either Y or B to change the bitmask on the data direction register of the video out port. You should see values printed to the whisper port. If you press B a bunch of times, you can get it to the value I picked for night: 0x1D.
Edit: For the latest version of the demo, look for my latest post in this thread.
For the time being, the level data is stored in PROGMEM just for simplicity, but it shouldn't be too hard for me to convert it to stream from the SD card later (requiring just a single sector read when new data needs to be loaded). Also, I just wanted to be able to draw the level in GIMP, and then have all of the tiles "come alive" by themselves without much configuration. Some additional PROGMEM arrays need to be stored in flash for the animations and collectables, but I use the whisper console ports to have the game automatically dump the commands for creating those data files, and then I just copy and paste the commands into the terminal and compile it again with that data included.
So far I have:
- bigger sprites
- physics engine now capable of colliding a 1x2 entity
- camera dead zones to reduce camera bounce when doubling back and/or jumping
- can jump as high as you want above the screen without collisions with stuff in hidden VRAM
- pits that kill you
- one way tiles
- working ladders
- dissolving one way tiles
- ground, wall, ceiling hazards (spikes)
- animated collectables
- tracking system for when certain classes of tiles enter or leave the VRAM (uses a single bit of RAM for a given tracked tile)
- ram tile-based popup menu system
- new sound effects, some using just the noise channel
- music (recycled from my last game for now, just to see if it plays nice with the sound effects)
- melee combat (press X to attack)
- prototype for sprite-based hazard (fireball) that can travel in or out of visible area
- prototype for smooth day/night transitions by setting DDRC manually (not enabled in the demo)
Although the smooth day/night transition is not enabled in this demo, you can still mess with the DDRC value by holding down SELECT and pressing either Y or B to change the bitmask on the data direction register of the video out port. You should see values printed to the whisper port. If you press B a bunch of times, you can get it to the value I picked for night: 0x1D.
Edit: For the latest version of the demo, look for my latest post in this thread.