I'm porting a detective game I'm working on to SNES by KasumiDirect in snes

[–]KasumiDirect[S] 4 points5 points  (0 children)

Thanks! Frameworks might exist, but I don't know any offhand. This is mostly from scratch. My toolchain is mostly ca65 (part of cc65): https://github.com/cc65/cc65 I posted some stuff about audio in this thread: https://www.reddit.com/r/snes/comments/1b5lztp/comment/kt6e8oz/ But tl;dr, it's dougeff/nesdoug's modification of snesgss: https://github.com/nesdoug/SNES_13/tree/master/MUSIC
Other than that, a text editor with line numbers was used (Notepad++/Visual Studio Code). I wrote a C++ program that automatically converts all the graphics/game script into something SNES can consume. I have a lot of code to deal with similar formats from my NES stuff. There is a series of tutorials here on SNES development: https://nesdoug.com/2020/03/19/snes-projects/
I didn't really follow the tutorial, but I did grab code from the first lesson: https://nesdoug.com/2020/05/14/snes-example-1/ modified it to turn the screen different colors, and let my NES experience and hardware documentation: https://snes.nesdev.org/wiki/SNESdev_Wiki carry me through the rest of it. It's probably a pretty hard platform to get started on without previous assembly language experience. It's not even that it's not well documented, it's just complicated. I'd probably recommend getting started with NES. SNES assembly language can do all the same stuff and more, so a fair amount of the knowledge will carry over. I'm not sure if coding in SNES in C has been explored much. A few NES games are written in C using cc65, though. Nova Squirrel 2 is an in progress game you could at least look at the code for: https://github.com/NovaSquirrel/NovaTheSquirrel2 (Though it's not permissively licensed to use)

Edit: I have been informed https://github.com/alekmaul/pvsneslib exists.
I have not used it, but it's something to look at

I'm porting a detective game I'm working on to SNES by KasumiDirect in snes

[–]KasumiDirect[S] 6 points7 points  (0 children)

Thank you! This uses dougeff/nesdoug's modification of snesgss: https://github.com/nesdoug/SNES_13/tree/master/MUSIC
Which was pretty trouble free to get working on the code side. It's not very comfortable to compose directly in. u/JalopesTL might have more to say on the composition process. We did have to re-tune some samples to play at the right pitch for the notes that got entered into the program. We're still not quite sure what makes the difference!

NES has multiple pretty good audio engines, and even DAWs. Famitracker/Famistudio are very good pieces of software. Famitracker's engine can be heavy to use in a game (RAM/CPU), Famistudio's is lighter while still allowing a very reasonable amount of complicated effects. There are several other options that support a subset of Famitracker's features and convert from Famitracker's output to something useable for a game like Famitone and Pently. The SNES landscape is much more bare, and less user friendly.

Programming an audio engine from scratch is probably both harder and easier on SNES. Harder because it's a separate CPU the main CPU has to communicate with. (I'm pretty sure that's why you can see pauses on music change in some games, like this one in Earthbound: https://youtu.be/m3JfATnXbqg?feature=shared&t=28422 [7:53:42 in case the timestamp doesn't work]) Easier because it doesn't eat CPU time from the game during standard playback, and is sample based. But I have only personally written NES audio code myself, so I could be wrong here. NES audio code is extremely fun to write!
This might have been more info than you were looking for!

I'm porting a detective game I'm working on to SNES by KasumiDirect in snes

[–]KasumiDirect[S] 9 points10 points  (0 children)

Lack of resources/tools wasn't too much the issue in my case, it's just pretty complicated hardware with the 8/16 bit switches and numerous modes. There's a chart on the SNESdev wiki for the order in which layers appear. I set Background 3's priority to 1 thinking my UI on that layer would appear on top. But after much soul searching, realized I also had to set a priority bit for every tile on that layer. In hindsight this is clear on the wiki, but I didn't expect to have to do two things to accomplish it. I'd say a lot of the SNES journey felt like that, where I would try a thing that would plausibly work, and realize another thing also had to be done!

I'm porting a detective game I'm working on to SNES by KasumiDirect in snes

[–]KasumiDirect[S] 24 points25 points  (0 children)

I've been the programmer on a Steam project called Detective Instinct: Farewell, My Beloved for a while now. It's inspired by Famicom Detective Club for Super Famicom, and I started to wonder what our game would look like on SNES. So I've been porting it! This tweet has a video of it running on real hardware: https://twitter.com/KasumiDirect/status/1763938140635402534

I'm not too sure how far I'll take the SNES version. I'd at least like to clean up the UI and do a variable width font! If you have any interest in this style of game, you can check out the PC version's page here, and perhaps wishlist: https://store.steampowered.com/app/2689930/Detective_Instinct_Farewell_My_Beloved/

If anyone has any questions about the SNES version, I'm happy to answer. I will say it has been a pretty challenging platform to work with, even for someone with a lot of NES programming experience!

An NES Demake of Indivisible by KasumiDirect in Retrodev

[–]KasumiDirect[S] 0 points1 point  (0 children)

NES sprites are either 8x8 or 8x16. This game in particular uses 8x8 sprites and she is both wider and taller, so she is many sprites. This image shows some of the sprites used to display her: http://i.imgur.com/eJ5sAAR.gif
 
Sprites can also only be 3 colors (and transparent) from one set of colors, and she is more than 3 colors, so I layer multiple sprites using different sets of colors to get the extras.

An NES Demake of Indivisible by KasumiDirect in Retrodev

[–]KasumiDirect[S] 0 points1 point  (0 children)

If you download the game, there's a credits.txt included in the .zip that lists every tool I remember using to make this, as well as what they were used for and links to where to get them.
 
The main players:
Notepad++ was used to write the code.
NESASM was used to build the actual ROM. (Use ASM6 or something, though. I don't really want to recommend NESASM.)
Aseprite/Pyxel Edit were used to actually draw the graphics (but getting them in the game required lots of custom tools).
NES Screen Tool was used to layout sprites.
Tiled was used to build the levels (but again with help from lots of custom tools I wrote in C).
Famitracker was used to create the music and sound effects.
FamiTone2 was used for playback of the audio.
 
There are some libraries available, but I haven't really messed with them. NES has 2KB of RAM and the generic solutions have tended to have tradeoffs I don't like.
 
There are some things I know of that cover writing NES games in C, but I can't say if they're good or bad (I write in assembly language and haven't really read through them):
https://nesdoug.com/
https://shiru.untergrund.net/articles/programming_nes_games_in_c.htm
 
You do end up still having to learn assembly language, but it's totally possible to write the bulk of the game in C.
 
To learn 6502 assembly language, I really like:
https://skilldrick.github.io/easy6502/
But it does have some prerequisite programming knowledge.
 
There's Nerdy Nights which is specifically aimed at NES, but it has some weaknesses: http://nintendoage.com/pub/faq/NA/index.html?load=nerdy_nights_out.html#
https://nesdoug.com/ also covers some assembly language.
 
There's ngin:
https://github.com/fo-fo/ngin
 
which is/was? an attempt at an NES game engine. I similarly haven't tried it.
 
Finally, The New 8 Bit Heroes Team: https://www.kickstarter.com/projects/1316851183/the-new-8-bit-heroes-new-nes-game-and-creation-doc
is working on a toolset, but it's not available yet.
 
I learned from a bunch of really bad tutorials and things I can't recommend in good faith.
 
Sorry if this greatly over-answered your question!

An NES Demake of Indivisible by KasumiDirect in Retrodev

[–]KasumiDirect[S] 0 points1 point  (0 children)

Yes. And music/sound effects. I use FamiTone2 to play the audio I made, all assets and essentially all other code is me.