Cannons - Another Game by The UnDisbeliever

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Cannons - Another Game by The UnDisbeliever
by on (#152341)
Hey everyone, sorry I wasn't around the past two months.

July's entry into my One Game A Month Challenge is a game of Cannons.

Image
Download


There is no AI, this is a "Share the controller" style game.

There is no sound. I got distracted by Borderlands and ran out of time.

As usual, the source is on GitHub.



This demo utilises a large (512x384) 2bpp Pixel Buffer that is stored in WRAM to manage the terrain.

The pixel buffer uses simple bitshifting to allow me to draw pixels, horizontal lines and vertical lines. A GetPixel routine is used to determine if an object is hit or not.

As each BG can only handle 1024 tiles and my pixel buffer is 3072 tiles in size, each BG only handles 512x128 pixels (1024 tiles) of the pixel buffer. HDMA is used to switch between displaying No BG, BG1, BG2 and BG3 (each 128 pixels tall). The table is generated during VBlank, mainly because I have a lot of CPU time free there.

To prevent clipping errors, I process the physics 8 times per frame. It took a bit of experimentation to get the physics right.

I also experimented in having a completely separate gameloop, model data and GUI. It doesn't improve the structure at all. I'm going back to the combined gameloop pattern I've been using before.

---
P.S. Because I forgot last month's entry.

June's entry was a game of Simon, made primarily to test out the SnesGss engine. Download: ROM. Source.
Re: Cannons - Another Game by The UnDisbeliever
by on (#152350)
Works great! I used to play "Tank Wars" for DOS all the time when I was younger and it still never really gets old. I'm impressed, must have taken some doing to work this out on SNES.

Thanks for sharing it!