A List of NES Homebrew Games

As a NES homebrewer, I have been lucky enough to meet some great people, and play lots of interesting games. The past few years have been huge in the NES homebrew community, and I feel like next year will be even bigger.

This is my list of favorite NES homebrew games. Several of these I haven’t played yet because several of these aren’t completed yet. Which is why I think 2018 is going to be a great year for NES gaming.

I didn’t want to list “top 10” or “top 20″…and piss someone off, so I listed them sort-of alphabetically.

 

 

2nd Dimension

-AO

01AO

This is an interesting puzzle game. Imagine a 2x1x1 block that has to be tipped over in exactly the right directions to make it through to the goal.

(Also available from 2nd Dimension is Get Em Gary – which is like “Wrecking Crew and Fix-It Felix Jr”, programmed by Sly Dog Studios)

http://www.second-dimension.com/

 

 

Alp

Most people will probably not know who Alp is, but he was working on an awesome Zelda-like game called “Cat Quest“. We will probably never see that game made, but Alp is still (not-so) secretly working on NES games, and they look damn good. The Cat Quest project seems to have morphed into a game called Transamnia (possibly NSFW). Here’s a beautiful screenshot.

-Transamnia (? formerly Cat Quest)

03Trans

And a game I’m personally excited about is Cotton & Candy, a platformer. Excellent work Alp. Hopefully these games will be made available…someday?

-Cotton & Candy

02CottonCandy

@Alp317

 

 

Brad Smith (Rainwarrior)

This is a big one that has been in the works for a while…and is almost done (as of late 2017). In Lizard, Canadian programmer / musician Brad Smith has made a very big open-exploration world…well 2 parallel worlds connected by doors. You play as a little person wearing a lizard costume. If you find a different costume, you gain new abilities. There are lots of little secrets in this game (big head mode, bad eye mode, a talking moose). Tons of interesting details in this game should keep you occupied for weeks.

-Lizard

04Lizard

http://lizardnes.com/

 

 

Chris Cacciatore

Still a work in progress, in Nebs n Debs you play as a little girl with an Octopus hat on. A Megaman style platformer, you can dash across gaps and collect diamonds. This was a winner of the 2016 Nesdev competition. Very high quality.

-Nebs n Debs

05NebsDebs2

@cacciatc
(I don’t think he has an official website) There’s a link to the demo at the bottom of the first post here…

http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=169549

 

 

 

Diskover / RetroNES Software

I guess this one had a very limited cartidge release, since it didn’t meet it’s crowdfunding goals (I think he said he made a few copies for his friends). Banketh is Diskover’s first game, which is a top-down adventure game (like Star Tropics). I hope we get to see the full game released some day.

-Banketh

39Banketh

The Demo is here…

http://www.retrones.net/juegos-homebrew/banketh-video-game

Diskover recently announced he is porting The Sword of Ianna to the NES. Here’s a screenshot of what that will look like.

41Sword

 

Doug Fraker

I, of course, made a game, which is available on cartridge. It’s a fighting platformer. And I’m working on another project. Stay Tuned.

-Vigilante Ninja 2

31VigilanteNinja

https://nesdoug.com/2016/05/05/update-games-im-working-on/

 

 

Glutock / Broke Studio

Another winner of the 2016 Nesdev game competition, and also a work in progress from France. In Twin Dragons, you play as two dragons named Dinky & Minky. You can play as either one. A great looking platformer with excellent music. If you eat a hot pepper, you can breath fire. If you eat a cold pepper, you can breath ice. Probably my favorite NES game. Maybe.

-Twin Dragons

07TwinDragons

http://www.brokestudio.fr/en/front-page-en/

 

 

Gradual Games

I really wanted to mention both games. Nomolos: Storming the Catsle (yes that’s cat…sle) is a fun platformer fighter game (like Zelda II), featuring a cat knight. It deserves to be on this list, but I prefer The Legend of Owlia. Which is kind of like a Link to the Past style adventure game. You carry an Owl, which can attack and get things and has several other abilities. And, apparently they are working on a 3rd game, which should be done next year.

-The Legend of Owlia

08Owlia

http://www.gradualgames.com/

It should also be mentioned that Gradual Games made a music engine that other people have used to get music in their NES games (StarKeeper, Dushlan and Mystic Searches). AND, Gradual Games has developed a Virtual Machine for porting NES games to play on PCs without an emulator (Get ’em Gary and Eskimo Bob). Check out the Github pages.

https://github.com/gradualgames

 

 

Infinite NES Lives

Action 53 (2 volumes), are multicarts from the entries into the 2011 and 2014 nesdev competitions. There are so many cool games on these cartridges, but I wanted to highlight a few…Streemerz is like Bionic Commando (you shoot out a rope which pulls you up), with lots of blocks to avoid that kill you. I wanna flip the sky is a reverse gravity platform puzzle with tons of spiked floors. You will die a lot in that game. Love Story is a sword fighting action platformer. Sir Abadol (from Mojon Twins) is another action platformer, with puzzle elements (locked doors and find keys). Very fun. And many more games that I didn’t have enough room to mention. Here’s a list…

http://wiki.nesdev.com/w/index.php/Action_53

More about Mojon Twins in a second. I will also mention Shiru later…he contributed the most games to the Action 53 set.

Volume One –

-Streemerz – The Fox

10Streemerz

-I Wanna Flip The Sky! – Tom Livak

11Flip

Volume Two –

-Love Story – Tom Livak

12LoveStory

-Sir Abadol – Mojon Twins

13SirAbadol

http://www.infiniteneslives.com/products.php

Some of the games are available to play for free…
http://www.nesworld.com/article.php?system=nes&data=neshomebrew

 

 

KHAN Games

Kevin Hanley has programmed several NES games, including a famous Frogger port. I should mention the ‘Larry and the Long Look for a Luscious Lover‘ port, which is worth playing, but not technically a homebrew. (I guess?). Some of his games are available from RetroUSB…like Study Hall, which is a bit like a harder version of Donkey Kong Jr. No, there isn’t any math.

My favorite KHAN game is The Incident, which is a Sokoban style top-down puzzle with moving boxes.

-The Incident

15Incident

http://www.khangames.com/store/home/8-the-incident-complete-in-box.html

-Study Hall

14StudyHall

http://www.retrousb.com/index.php?cPath=30

 

 

Lucasz Kur

Lucasz Kur is a Polish NES programmer, who is sometimes working with Brazilian graphic artist, Marcelo Barbosa (Tcheco in the Castle of Lucio). I don’t know everything that he’s worked on but definitely these games. Lucky Penguin isn’t finished, but you can play a demo from nesdev forum. http://forums.nesdev.com/viewtopic.php?p=201167

-Lucky Penguin

16LuckyPenguin

-Cowlitz Gamers’ 2nd Adventure

17Cowlitz

The Cowlitz 2nd Adventure game had a limited cart release this year, and I heard it sold out in minutes. I haven’t played it, but it looks very nice. Lucasz Kur also programmed Inversion. Here’s a link to that…
https://www.romhacking.net/homebrew/44/

 

 

Mega Cats Studio (formerly 8-bit Evolution)

Mega Cats has hit the ground running with 10+ NES games developed (or almost done) in just a few years. They were foremerly called 8-bit Evolution and made Germ Squashers.

-Justice Duel
-Creepy Brawlers
-Creepin it Real
-Expedition*
-Little Medusa
-Almost Hero
-City Trouble*
-Log Jammers
-Dushlan*

I ran into Mega Cats at a game convention, and played 2 of their games. Nice. I’m most excited about Little Medusa, which reminds me of Kickle Cubicle and Zelda. Apparently not finished, but maybe next year. I’m going to have to play some of the other games before I can really comment on them.

*(It’s been brought to my attention that City Trouble, Dushlan, and Expedition were not developed by Mega Cats, just published by them).

18LittleMedusa

https://megacatstudios.com/

 

 

Miau (Morphcat)

Morphcat submitted the Super Bat Puncher demo for one of the nesdev competitions (2011). I’ve heard many people tell me it is one of the best NES homebrews. I’ve been told that Morphcat won’t be making a full game from it…but he and Nicolas Betoux are making a 4-player haunted adventure, yet untitled, which showcased in the game museum in Berlin. I’ve been unable to find much about the game (not even a title) but here’s a screen shot.

19Untitled

Super Bat Puncher is a fast-moving platform game, with a cat that punches bats…and walls to get a boost.

-Super Bat Puncher

20BatPuncher

http://morphcat.de/superbatpuncher/

 

 

Mojon Twins

I can’t count how many games na_th_an has programmed. 50? Maybe. Some of the best were submitted to the 2016 nesdev competition. Very good games. Here’s a list of great games. I think they are all available on their website (mostly in Spanish). Caution, some NSFW images.

http://www.mojontwins.com/juegos_mojonos/

-Sir Abadol (remastered)
-Super UWOL
-Lala the Magical
-Cheril the Goddess
-Wo Xiang Niao Niao
-Jet-Paco

My favorite is Lala the Magical, about a witch girl who can create temporary platforms to stand on. Hard, but fun.

21Lala

Cheril the Goddess is similar, except that you can temporarily fly sometimes. On a side note, Wo Xiang Niao Niao means “I need to pee pee”. It is a fun game where you jump and bounce off enemies. Check out their games, which are all free to play.

 

 

Nova Squirrel

Nova contributed several games to the Action 53 set. He is currently working on a game, called Nova the Squirrel, featuring a spunky little green squirrel. It is a unique platform game, with lots of clever block puzzles. I have no idea when it will be finished, but it looks cool.

-Nova the Squirrel

22Nova

http://novasquirrel.com/
@BushytailSkwirl

 

 

Optomon

Pyronaut is programmed by Optomon (graphics by M-tee). It looks a lot like Metroid, and I hope it will be finished one day. “Due to commitments on smaller scale works and increasingly busy personal lives, M-tee and I have halted work on Pyronaut indefinitely, with the intention of resuming work on it in the future.”

23Pyronaut

http://optovania.com/dsk/mod_pyronaut.html

Optomon is also working on a game called Rollie, which looks promising. You might have heard about him from his excellent work on Metroid Rogue Dawn.

M-Tee is working on a game called Isolation right now, with KHAN. It looks like a point and click game (like Maniac Mansion). There isn’t a demo yet.

23_B_Isolation

 

 

Piko Interactive

Piko Interactive (I think) is better known for developing SNES homebrew games. They have released 2 NES games as well. Quest Forge is my favorite. It’s a bit like a top-down adventure game, like Zelda. Piko also got the rights to several unreleased NES and SNES games (not really homebrews), which they now produce.

-Quest Forge

24Quest

https://www.pikointeractive.com/index.html

 

 

Shiru

-Alter Ego
-LAN Master
-Many Other Games (see Action 53 above)

From Russia, Shiru has been contributing to the nesdev community for years with his open source game library and NES Screen Tool app. He has developed for multiple retro consoles. Several of his games are included in the Action 53 game sets. I think the most fun game (which is not in Action 53) is Alter Ego. It is a port of a VX Spectrum homebrew by Denis Grachev. It’s sort of a ladder and platform game, and you have a shadow self that mirrors your moves. You can switch places with him, and collect all the items. It’s fun. It has excellent music as well.

25AlterEgo

https://www.romhacking.net/homebrew/1/

-Lan Master

Also check out Lan Master, if you like puzzles.

40LanM

https://www.romhacking.net/homebrew/2/

Shiru made some games for Retroscribe / Greeting Carts. Blow Em Out, Beer Slinger, and Perfect Pair (limited edition). I’ve been told the company was under new management, but still running. You could get personalized games, with a private message at the end of the game. Great as a birthday gift.

http://www.retroscribe.com/

 

 

Sivak

This is the big one. If you play one NES homebrew game, play Battle Kid. It’s THAT good. If you like Megaman, you will like Battle Kid. Find keys, gain abilities, fight monsters. It’s fun, but also very hard. Both available from Retro USB.

http://www.retrousb.com/index.php?cPath=30

-Battle Kid 1 + 2

26BattleKid

 

 

Sly Dog Studios

Sly Dog has been busy making NES games for years. Over a dozen games. I think my favorite is The Mad Wizard, which the full game is now available to play for free. You play as the wizard, and gain abilities as you adventure through the woods and caves on your way to fight Amondus the Summoner. You don’t jump. The wizard can slowly levitate, and as you gain abilities…higher and further. This is part of a 3 game series. The gameplay on the other games are completely different, though.

Sly Dog also programmed Get’em Gary for 2nd Dimension (see above) and Black Box Challenge for Hagens Alley. I’m not sure if Black Box is completed.

-Mad Wizard

27MadWizard

https://slydogstudios.org/
http://www.second-dimension.com/shop/
Black Box Challenge – NES Homebrew (Kickstarter Regular Edition)

 

 

Sole Goose Productions

Besides Swords and Runes (Adventure) and 0-to-X (2048 number puzzle), there is Spook-o’-tron. I think it was just finished for Halloween 2017. It’s kind of a top down ‘bullet hell’ shooter game, like Smash TV. At the time of writing this, I haven’t been able to find it or play it.

-Spook-O-Tron

28Spook

 

 

Spoony Bard

Tomas is from Canada, and new this year with his first NES release, Eskimo Bob. It’s a platformer with wrap around scrolling and a snowy theme. Cute artwork. Great first game. Looking forward to more games down the road.

-Eskimo Bob

29Eskimo

http://www.eskimobob.com/

 

 

Tepples (Damian Yerrick)

Tepples has been making cool NES games for a long time. He has been very involved in the nesdev community, and has released several NES tools / etc. (and soon some SNES tools), including a music driver (pently).

http://pineight.com/

For the last 2 years, he has raised the bar for NES homebrew games. He and Retrotainment (Cash In Culture Stores) developed Haunted Halloween 85 and 86. Spooky themed action platformers with excellent boss fights. Punch some zombies and ghosts. Eat candy and soda. Lots of movie references. The music in 86 is great, and it features parallax scrolling effects.

-Haunted Halloween 85-86

30Haunted86

-Full Quiet

And they are working on another game for next year, Full Quiet, which looks cool, from what little I’ve seen.

https://cashinculture.3dcartstores.com/

 

 

I left Star Keeper off my list. I know other people frequently put is on their top lists, but I know almost nothing about the programmer, except that he’s from China. And it doesn’t seem to be available anywhere to play.

Honorable Mentions…

8-bit Hero’s Mystic Searches (coming soon)
http://austinmckinley.com/8bit/the-game.html

32Mystic

 

Kira Kira Star Night
http://kirakira-star-night.riki2riki.com/en/

33Kira

 

Retro City Rampage/ROM City Rampage (I haven’t seen any actual NES gameplay, but I know that the game was ported to the NES, and I think carts exist)
https://www.vblank.com/RetroCityRampage/

34ROMCITY

 

Rekt, by Vectrex (coming soon)
http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=171212

35REKT

 

Star Versus, by Dustmop
http://starversus.com/

36StarVersus

 

Blade Buster
https://www.romhacking.net/homebrew/24/

38Blade

 

Indivisible, by Kasumi
https://kasumi.itch.io/indivisible
37IndivisibleB

 

Too Soon to talk about, but maybe good…one day…
-Unnamed 3d raycaster game (think Doom), by 

Sorry if you weren’t mentioned, homebrewers. Too many great games to list them all. If you want to read more about NES Homebrews, you should check out Jeff Wittenhagen’s book on the subject, NES Oddities & the Homebrew Revolution.

HAGEN'S ALLEY AVAILABLE BOOKS!

Please let me know if I made any mistakes, or if there is some awesome NES homebrew game that should be on this list, but isn’t.

Advertisements

Vigilante Ninja 2, Post-Mortem

Hello.

 

It’s been a while since I finished my big NES game. While it took me 2 years to complete, it could have been done in 1 year, if I focused on it 100% of the time. The game is still available in a limited release, btw. But enough time has passed to reflect on the development process.

 

VIGD2 Purple Cape Man.
My first game I made, “Purple Cape Man, Vigilante Ninja”, was programmed with NESASM. Someone suggested I make a sequel, which became Vigilante Ninja 2, which is entirely unlike the first game in every way.

Vigilante Ninja 2 was programmed with ASM6 (except the music engine, was programmed in cc65/ca65). Graphics were YY-CHR and level design in Tiled (with a custom python script I wrote to compress each level). The design process could have been much better, since it still required lots of cutting and pasting. So, level editing was very slow.

vig2_lv4-1 Vigilante Ninja 2.

What went right?

The music.

Probably the best part of the game. Originally, I wrote a temporary song for the demo, and had planned to write a song for every level. Luckily, estlib was kind enough to write songs for me, which are excellent.

He used more sound effects than any famitone version could handle, so I had to use the full famitracker driver…and again…lucky for me that Shiru wrote a version of famitone to compliment the full famitracker driver.

There is still a small, rare bug that I was unable to diagnose and solve. The main downside to using an unfamiliar sound engine. Occasionally, when you start level 4, the main melody doesn’t play for a few seconds. But the bass line plays. It doesn’t sound “wrong”, but it was.

Some of the graphics.

At the start, I had no idea what I was doing, or even what style I wanted. I actually redid the level 1 graphics 3-4 times, and completely redrew the hero. A fellow homebrewer informed me that the graphics of my game were crap, so I kept trying to improve them.

vigN_Old

vigN_Old2
vigN_Old3
Vig2New

By the end, especially level 4, I had my flow, and the graphics actually started to click. Many of the enemies in level 5 (fire, ghost) are my favorites.

Vig2-Lv5

The process of sketching on paper, and drawing in GIMP, then YY-CHR didn’t change. But, I got better at it over time. I wish I had put more effort into animating. Nearly every enemy only has 2 animation frames. And I had plenty of blank tiles I could have used.

Special thanks again to Nicolas Betoux for drawing the title screen graphics. Paired with the excellent title screen music (by estlib), it really made my little homebrew feel like a real NES game.

The throwing weapons.

One of the more fun parts of the game is collecting different weapons and using them. Oddly, I got complaints that you had unlimited shots, so I (very late) added a power bar, which drains if you use too many weapons. I’m still not satisfied with this hacky solution, since it just slows the game down (especially fighting a boss).

Most of the game engine.

Vigilante Ninja 2 scrolls pretty smoothly, without bugs. The NMI code got a little spaghetti like at the end, when I added bank switching. All the level testing was done with NROM sized roms, even through level 5. I made 2 separate level 5 test ROMs, 1 for level, 1 for boss.

In the end, when I finally switched to MMC3, I put in what I called “trampolines” in the main fixed bank, which switched (for example) the music code and data banks in and started the music engine. But it wasn’t so easy, and the bank switching code is ugly and hacky. But I suppose everything is working… so it’s good enough… just don’t expect to reuse the code in a year and understand what everything is doing.

What didn’t work?

The Sprite system.

I didn’t plan the sprite object system well. Pretty much just used static addresses in the OAM buffer, which made the size and shape of enemies very inflexible and difficult to change. And, I used an entirely different 256 bytes of RAM just for sprite shuffling, which was a huge waste of memory. (NES has only about 2000 bytes of usable RAM).

The worst part of it, was I didn’t use variable names in the original code, just address numbers. And, so much time passed before I revisited the object code, that I barely knew what the numbers meant. I wanted to change things, but I would have had to rewrite a thousand lines of code, so I kept the original terrible system.

I rewrote part of it for the hero, just so I could layer sprites (the sword). I wanted to change the look of coins and make them bigger, but I painted myself into a corner, and couldn’t change a little thing without rewriting everything. So, my biggest regret is not starting with a better sprite code.

The gameplay.

Looking back, there is very little difference between the different sub-levels. Sure, the graphics and enemies change from level to level, but I could have done 100 little things to make each sub-level feel interesting. Hidden things. Changes in graphics. More interactive elements. A specific goal (collect all X, kill all X’s, avoid X). A special throwing weapon only found in room 23. A secret 1 up, if you do X.

Basically, just run from the left to the right, and don’t die. Not great.

Enemy AI.

Probably the weakest point of the game. Most enemies walk left and right. A few fly in right to left. Shoot them, get a standard reward.

Level 3 has the most interesting enemies. The spider can climb any wall, and always follows you. I think (at least in early versions) if you slowly walk right, the spider can climb on top of the ceiling and follow you pretty far.

The bat (not the boss), was an attempt at a more aggressive enemy, who loops around attacking you. However, he’s a bit buggy if you move a certain way. Never quite got him right.

Vig2-Bat

The bees (level 4) chase you, fly just above you, and try to sting you. It’s all timed a certain way, that it pretty much always misses you trying to sting. I had to slow them down, as they were damn hard to get away from or hit.

But, nearly all the rest just slowly walk around, and disappear if they wander just a bit too far left. Also a failure, not keeping off screen coordinates, so he could walk back on screen after that.

The Ending.

I wish I had done a more elaborate ending. It’s just 1 screen of text, and then the credits. I had room for more graphics, I could have done some more graphic story…maybe related to that magic sword I kept talking about.

Marketing.

I really dropped the ball here. I barely made an effort to advertise the game development. I had a thread over at nesdev forums, and mentioned it on my blog. But, almost no one from the nesdev forum asked me for a copy of the game. I guess buyers don’t visit there.

I didn’t make boxes, or print booklets, etc. I could have printed T-shirts. I could have traveled to game conventions. Or tried to contact all the used game stores within an hour drive of my house. But, I didn’t.

When I finally did mention the game to buyers, it was right after the release of Ninja II, a completely different homebrew game with a similar name…which I think caused some confusion.

Actually, the entire concept… making a sequel to a lousy game that no one played, and making it completely different, was confusing. Several people asked me “where is Vigilante Ninja 1?” Well, it’s called ‘Purple Cape Man’, and it’s not the same game. I had a few people ask me, “if he’s a vigilante, why is he fighting squirrels and bunnies?” I think a different name and concept would have helped.

Conclusions…

In 2 years, I learned a lot. Made a full sized NES game. Put it on a cartridge (thanks infinite NES lives), and gamers around the world are playing it. I’ll say partial success. There have been so many great NES homebrew releases lately, that have really raised the bar. Perhaps people would be better off buying Haunted Halloween, or Twin Dragons, or Lizard. I’d be ok with that.

And I’m still making games. Maybe the next game will be the one everyone remembers. Only time will tell. Back to the work I go.

NES Podcast

Just a shout out to KHAN Games (Kevin Hanley, @atonofglaciers ) and Sole Goose Productions (Beau, @SoleGoose ) for their recent and ongoing Podcasts.

The Assembly Line discusses all aspects of NES homebrewing, and live interviews with homebrewers. I’ve listened to them, and rate it a “must listen” broadcast for anyone programming the NES, or just anyone interested in games and game production.

I’ve found multiple links…I think these all work.

https://itunes.apple.com/us/podcast/the-assembly-line-an-nes-homebrew-podcast/id1247222547

https://m.soundcloud.com/user-463768680

https://player.fm/series/the-assembly-line-an-nes-homebrew-podcast

https://play.google.com/music/m/Il7yhrcfqbuejnfyh24a2dlpp7y?t=The_Assembly_Line_An_NES_Homebrew_Podcast

Good stuff guys. Looking forward to more.

 

How to make a coloring book page from any image.

Using GIMP. Open the image.

Gnome

Color / Desaturate

Gnome2

Filters / Edge-Detect / Edge…

I just used whatever was standard settings = Sobel, 2.0, Smear.

Gnome3

Color / Invert

Gnome4

Color / Curves

Put a dot near the middle and then drag the right side up.

Gnome6

Gnome5

Lets put a border on it.

-Select All

-Select / shrink, 3 pixels

-Select / invert selection

-Pencil Tool, choose black, draw over the edge

Gnome7

Change print size. Image / print size / 8″ wide (or 10.5″ tall).

And print your coloring book page.

 

Scrolling

By request, I made a scrolling game engine, with BG collisions. I was supposed to use neslib, but I made so many changes, and basically did 90% of the meat in ASM, that it’s not really a lesson in C. Sorry.

I’m going to have to come back and explain lots of things. I made it way too complicated…so basically, I created a huge top-down all-direction scrolling game engine.

I think I’m going to have to make a simpler one, for my next page (a little later).

Here’s the mess of code, that probably still has bugs in it. I recommend speeding up the emulation, it’s a bit slow.

http://dl.dropboxusercontent.com/s/wapes71qfp3gvxx/lesson28.zip

lesson28

NOTE: I haven’t had time to properly test/debug this code…or even comment about it here. Some people on the nesdev board have had bugs/problems, so I suggest you don’t use this code until further notice.

 

Add Music, Famitracker

I wrote some (terrible) songs and sound effects in Famitracker. So, first the songs. Put all songs in the same Famitracker file (adding songs in the module properties). I wrote another page on the limitations of the famitone music engine. Basically, no effects allowed except looping backwards (the Bxx effect, where xx is the frame number).

Export all the songs as a text export, and then process the .txt with text2data (command line program). Make sure to include the -ca65 tag.

Sound effects were put on another Famitracker file. Again, each sound effect on a unique song, using module properties to add another song. You can use any kind of sound effect (I think). But there is an annoying limitation on the length of sound effects. You can actually get around that limitation, by rewriting the famitone.s source (but I can’t show you that rewrite, because it’s not open source code. Sorry.) I have a habit of ending each sound effect with — cut sound and then C00 end of song (on separate lines). I believe this properly ends the sound effect.

Anyway, save all the sound effects as 1 FTM file. Process it with ftm2data (with the -ca65 tag).

Include the music data, in crt0, right after the label music_data: and include the SFX data in crt0 after sounds_data. The crt0 I have, will automatically initialize (set up some pointers) the data, during startup.

Now…use music_play(0); to start the first song. You pass it the song number, starting with 0, of course. If the song number is too high, music will stop. (That’s not the rigtht way to make music stop, btw).

To pause the music, use music_pause(1). To unpause, use music_pause(0). To stop the music (and lose your place in the song) use music_stop().

To trigger a sound effect, use sfx_play(unsigned char sound,unsigned char channel). I didn’t enable (in crt0) more than 1 sound effect channel, but you can, if you want some sound effects to have priority over the others. Notice, I have Square Channel 2 blank in the songs, and exclusively use Square Channel 2 for sound effects. That’s so they don’t collide. If you put song parts on the same channel as the sound effect, make sure you use a less important song part, so the main melody doesn’t cut out every time a sound effect plays.

I just remembered. I have previously used a modified version of famitone.s…but I think I’m using the original verion here. I may change that in the future. No worries. Just make sure the volume of sound effects stays at least as loud as the music channel…or else it won’t play. In a modified version (not here) sound effects always had priority over music, regardless of volume.

That’s it. Easy. The song’s suck, but I didn’t want to spend much time on this. Here’s the example code. Pong, with sound and music (but still no scoreboard).

http://dl.dropboxusercontent.com/s/m02sq4hfod15dct/lesson27.zip

 

Sprite BG Collision, Pong

So, I wrote the simplest game possible. Pong with walls. The ball bounces off the walls (and the paddles)

The first thing I did was make everything in NES Screen Tool. Saved the CHR, saved the BG as a RLE .h file. Saved the Paddles as Metatiles.

Then I made a collision MAP. I just did this by hand. I could have used Tiled and saved the map as a .csv, but it was quicker just to type the map out as an array of zeroes and ones. 1 = the ball will collide with the BG. 0 = the ball will pass through it. Each entry represents a 16×16 block on the screen.

Now, I wanted a random start point and direction for the ball, but I needed a way to get a random seed. I decided to have it spin in a while loop, and count how many loops before a button is pressed on Controller 1.

while (!pad_poll(0)){
  ++Seedy; 
} // Seedy is an int, 2 bytes

set_rand(Seedy);

Now rand8() will give us some actually random numbers.

 

Each frame, the ball’s speed are added to the ball’s position. First X, then check collisions, then Y, then check collisions. If the change in X caused a collision, then I reverse the X speed. If the change in Y caused a collision, then I reverse the Y speed.

X example…

KeepIt = Ball.X; 
Ball.X += Ball_X_Speed;
index = (Ball.Y & 0xf0) + (Ball.X >> 4); 
if (MAP[index]){ 
  Ball_X_Speed = 0 - Ball_X_Speed; 
  Ball.X = KeepIt; 
}

If the ball goes past the paddle, I have it pause for 2 seconds. It counts down frames, until the pause variable is zero, then it respawns the ball with new random direction and position.

I didn’t add a scoreboard. I just wanted to keep it as simple as possible, to show how sprites can collide with the background. It, of course, isn’t really colliding with the background tiles, but rather an array (MAP) that represents the positions of the wall within the room.

Here’s the example code.

lesson26

http://dl.dropboxusercontent.com/s/1a20e1s1pd00ntg/lesson26.zip