Witch n' Wiz - Puzzle Platformer [1st Runner-Up]

Moderator: Moderators

User avatar
Goose2k
Posts: 320
Joined: Wed May 13, 2020 8:31 am
Contact:

Witch n' Wiz - Puzzle Platformer [1st Runner-Up]

Post by Goose2k »

Image

Recommended Emulators: FCEUX 2.3 (or greater) or Mesen. Will not work on older emulators.
Genre:

Turn-Based Puzzle Platformer (e.g. Fire n Ice, Catrap, etc)

How to Play:

Objective:

Vanquish all the monsters in room by slamming into them from the side. Push blocks around in a similar way to create bridges over gaps.

You cannot jump! The only way to move up is the climb a ladder.

If you make a mistake, press B to undo your last move, or SELECT to restart the room.

Controls:

D-PAD: Move the character.
SELECT: Restart current room.
START: Pause game (view password, change floors, quit game).
B BUTTON: Undo last move.
A BUTTON: Switch characters (later levels only).

Development Details:
  • Targets Mapper 28 (Action 53) directly, rather than one of the supported discrete mappers.
  • 64KB PRG-ROM + CHR-RAM (CHR bank swapping for background animation).
  • Written in C (CC65) using NESLib and NESDoug/cppchris' MMC1 Helper libraries
  • Famitone5 sound engine (also by nesdoug)
The full game is currently targeting Mapper 1 (MMC1) with 256KB of Memory (16 x 8KB PRG-ROM + 16 x 8KB CHR-ROM), so this compo build is a bit of a stripped down version of that long term target.

Status:

COMPLETE: DOWNLOAD HERE!

Features:
Competition Category:

Category 1 - Game

Competition Results:

2nd Place! :D

Social Media:
Attachments
nes2_nesdev_shortgameplay_loop_small.gif
nes2_nesdev_shortgameplay_loop_small.gif (1.35 MiB) Viewed 7891 times
nes2_nesdev_shortgameplay_wiz_loop_small.gif
nes2_nesdev_shortgameplay_wiz_loop_small.gif (502.91 KiB) Viewed 7891 times
Last edited by Goose2k on Thu May 06, 2021 5:48 pm, edited 23 times in total.
User avatar
Goose2k
Posts: 320
Joined: Wed May 13, 2020 8:31 am
Contact:

Re: Witch n' Wiz

Post by Goose2k »

For the 2021 competition I am hoping to enter my current project, Witch n' Wiz, into Category 1 (Game).

I've been working on it on and off since August 2019, but was pretty busy with my other project, From Below. But now that I have shipped that game, I am able to focus 100% on this!

Witch n' Wiz is actually somewhat of a port. I originally wrote it for Pico-8, and can be played for free here: https://mhughson.itch.io/witch-n-wiz

For the NES version my plan is to expand on what was in the original with more variety in graphics and new game mechanics.

Currently I have finished porting all the levels from the original Pico-8 version, and started expanding on the gameplay.

Here is a short sample of what's in the game today:

nes2_gameplay_jan_06_2021c.gif
nes2_gameplay_jan_06_2021c.gif (3.79 MiB) Viewed 11715 times

It uses the MMC1 mapper 01, configured with 256KB of memory (8 x 16k PRG-ROM banks, and 16 x 8k CHR-ROM banks). This is obviously not compatible with the 64k PRG-ROM configuration required by the competition. However, at the moment, I am only using a fraction of the 256kb allocated, so I might be able to make it work.

Next Steps:

First I plan to put together a complete 30+ level version of the game, likely very similar to what was in the Pico-8 version. I am actually pretty close. Here is what is left:
  • Title screen
  • Level select
  • Level complete screen
  • Restart level option
  • Ending/Credits
  • Music and Sound (placeholders in using FamiTone5)
Assuming I can do that without ballooning memory requirements too much, I will move on to the next step.

Second, I will branch the project and start hacking and slashing my way down to 64k PRG-ROM + CHR-RAM. I've never used CHR-RAM, so I'm not sure how hard this is going to be.

Here's the current memory usage today:
rom_memory.png
Roughly speaking, if I can move all code/data to PRG 0, 1, and 2 (48kb) with about 8kb free in PRG-ROM 2. That leaves PRG-ROM 4 (16kb) for CHR data, music and sound. It's probably more complicated than that, but it's a least in the realm of possibility at the moment (but again, the game isn't done yet).

CHR-ROM 01 is actually just for animating the background via bankswapping, so it can actually be cut to save space pretty easy (and may need to be; I don't know how perf-intensive updating CHR-RAM, and if I can afford to do it every few frames like I do with bank swapping). That will give me space for a nice title screen too.
Last edited by Goose2k on Wed Jan 06, 2021 4:58 pm, edited 2 times in total.
User avatar
dougeff
Posts: 3079
Joined: Fri May 08, 2015 7:17 pm

Re: Witch n' Wiz - Puzzle Platformer

Post by dougeff »

Looks good.
nesdoug.com -- blog/tutorial on programming for the NES
User avatar
Goose2k
Posts: 320
Joined: Wed May 13, 2020 8:31 am
Contact:

Re: Witch n' Wiz - Puzzle Platformer

Post by Goose2k »

Thanks Doug. I just remembered I am using FamiTone5 as well, so you get yet another credit in my game. :lol:
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Witch n' Wiz

Post by lidnariq »

Goose2k wrote: Wed Jan 06, 2021 11:59 am CHR-ROM 01 is actually just for animating the background via bankswapping, so it can actually be cut to save space pretty easy (and may need to be; I don't know how perf-intensive updating CHR-RAM, and if I can afford to do it every few frames like I do with bank swapping). That will give me space for a nice title screen too.
Mapper 28 supports bankswitching CHR RAM, and I think all future released cartridges populate enough RAM for it.
User avatar
Goose2k
Posts: 320
Joined: Wed May 13, 2020 8:31 am
Contact:

Re: Witch n' Wiz

Post by Goose2k »

lidnariq wrote: Wed Jan 06, 2021 5:08 pm
Goose2k wrote: Wed Jan 06, 2021 11:59 am CHR-ROM 01 is actually just for animating the background via bankswapping, so it can actually be cut to save space pretty easy (and may need to be; I don't know how perf-intensive updating CHR-RAM, and if I can afford to do it every few frames like I do with bank swapping). That will give me space for a nice title screen too.
Mapper 28 supports bankswitching CHR RAM, and I think all future released cartridges populate enough RAM for it.
I'll have to come back to this when the time comes, because i don't really understand what that would mean. :D
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Witch n' Wiz

Post by lidnariq »

Goose2k wrote: Wed Jan 06, 2021 11:08 pm I'll have to come back to this when the time comes, because i don't really understand what that would mean. :D
To do my best to TL;DR it: you can still have CHR bankswitching animations, not relying on uploading replacement tiles during runtime.
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Witch n' Wiz

Post by Controllerhead »

lidnariq wrote: Wed Jan 06, 2021 5:08 pm Mapper 28 supports bankswitching CHR RAM, and I think all future released cartridges populate enough RAM for it.
I'm looking at the 2019 ROM, it's set as a 32KB CHR RAM chip. I'm also reading the wiki.

If i understand correctly, you can load all of that CHR RAM and switch in 8K chunks from $8x00-$Fx00 with bits 0 and 1?
Image
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Witch n' Wiz

Post by lidnariq »

Controllerhead wrote: Thu Jan 07, 2021 12:11 pm If i understand correctly, you can load all of that CHR RAM and switch in 8K chunks from $8x00-$Fx00 with bits 0 and 1?
If the menu system put your game in CNROM mode, yes. Otherwise, you'll have to juggle switching between UNROM-or-ANROM -vs- CNROM mode at runtime.

I think tepples said that entries are allowed to write 0 or 1 to $5000 to switch between those two.
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Witch n' Wiz

Post by Controllerhead »

lidnariq wrote: Thu Jan 07, 2021 1:06 pm If the menu system put your game in CNROM mode, yes. Otherwise, you'll have to juggle switching between UNROM-or-ANROM -vs- CNROM mode at runtime.
Oh ok, i think i understand, but i still have some questions:

A 64KB CNROM can switch between 4 8KB CHR chunks, and UNROM uses switchable 16KB PRG chunks with an 8KB CHR RAM chip. So, by switching between the two: you could mix and match this functionality?

Also, you're implying if a ROM boots in CNROM mode from the menu, the second 32KB chunk of ROM is assumed to be graphics and copied into CHR RAM when the game loads automatically?

I'm reading the Wiki and not sure how to switch between CNROM and UNROM mode?
http://wiki.nesdev.com/w/index.php/Action_53_mapper
Image
tepples
Posts: 22708
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Witch n' Wiz

Post by tepples »

Controllerhead wrote: Thu Jan 07, 2021 1:31 pmA 64KB CNROM can switch between 4 8KB CHR chunks, and UNROM uses switchable 16KB PRG chunks with an 8KB CHR RAM chip. So, by switching between the two: you could mix and match this functionality?
Yes.
Controllerhead wrote: Thu Jan 07, 2021 1:31 pmAlso, you're implying if a ROM boots in CNROM mode from the menu, the second 32KB chunk of ROM is assumed to be graphics and copied into CHR RAM when the game loads automatically?
Yes.
Controllerhead wrote: Thu Jan 07, 2021 1:31 pmI'm reading the Wiki and not sure how to switch between CNROM and UNROM mode?
http://wiki.nesdev.com/w/index.php/Action_53_mapper
After $5000=0, writing $8000 sets the CHR bank. After $5000=1, writing $8000 sets the PRG bank. I'd draw analogy between the functionality of $5000 and $8000 in Action 53 and the functionality of $8000 and $A000 in FME-7.
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Witch n' Wiz

Post by Controllerhead »

tepples wrote: Thu Jan 07, 2021 1:57 pm After $5000=0, writing $8000 sets the CHR bank. After $5000=1, writing $8000 sets the PRG bank.
This is very clear. Thank you! :D
Image
lidnariq
Posts: 11432
Joined: Sun Apr 13, 2008 11:12 am

Re: Witch n' Wiz

Post by lidnariq »

Controllerhead wrote: Thu Jan 07, 2021 1:31 pm A 64KB CNROM can switch between 4 8KB CHR chunks, and UNROM uses switchable 16KB PRG chunks with an 8KB CHR RAM chip. So, by switching between the two: you could mix and match this functionality?
Yes.
Also, you're implying if a ROM boots in CNROM mode from the menu, the second 32KB chunk of ROM is assumed to be graphics and copied into CHR RAM when the game loads automatically?
I think the menu system only starts a game in CNROM mode if it's received as mapper 3. In that case, the CHR data is compressed and may not even be in an adjacent bank.

For more specifics, you should look through tepples's posts, and maybe the Action 53 multicart builder source code. I'm quickly running out of personal knowledge here.
I'm reading the Wiki and not sure how to switch between CNROM and UNROM mode?
After writing 0 to $5000, it's in CHR banking mode, possibly with 1-screen mirroring control. After writing 1 to $5000, it's in PRG banking mode, also possibly with 1-screen mirroring control.

I think tepples has indicated that a game is permitted to write to $8000 $80 to $5000 (in order to change PRG banking mode or H/V nametables), but it must be careful about the specific values it writes to the mode register.
Last edited by lidnariq on Fri Jan 08, 2021 4:47 pm, edited 1 time in total.
Reason: braino
User avatar
Controllerhead
Posts: 314
Joined: Tue Nov 13, 2018 4:58 am
Location: $4016
Contact:

Re: Witch n' Wiz

Post by Controllerhead »

lidnariq wrote: Thu Jan 07, 2021 2:32 pm For more specifics, you should look through tepples's posts, and maybe the Action 53 multicart builder source code.
Thanks for your help! I have enough to start experimenting now. I'll probably post a demo / template exploring PRG ROM / CHR RAM bank switching combinations within 64KB.

The only downside of using this hybrid scheme is that your game is limited to mapper 28, as opposed to sticking with a conventional mapper config which would ensure high compatibility. Personally i think it's at least worth exploring what can be done.
Image
User avatar
Goose2k
Posts: 320
Joined: Wed May 13, 2020 8:31 am
Contact:

Re: Witch n' Wiz - Puzzle Platformer

Post by Goose2k »

Does Mapper 28 have bus conflicts (specifically when running UNROM game)?
Post Reply