Skip navigation
NintendoAge
Welcome, Guest! Please Login or Join
Loading...

Tech Talk Why haven't you learned to program for NES yet? Come tell us.

Jun 20, 2015 at 5:07:56 AM
Shiru (0)

(Shiru Shiru) < Meka Chicken >
Posts: 677 - Joined: 06/08/2011
Russian Federation
Profile
Yes, Chase is open source and its code is intended to be read and modified in any way; most of my other NES games open source as well.

If you have very complex game logic that will take more than 1/60s, but you need to keep the UI responsive, you can just make two 'threads' - the UI stuff in NMI, game logic in the normal thread. I did this in my very first NES game, Lan Master, to trace puzzle units connections and detect level completion. The same is done in most of 8/16 bit RTS-like games, with a group of characters controlled by player's orders and a pathfunding algorithm - the character movements could get slower in complex situation, but it won't affect the UI speed, so it'll be less noticeable for player.

'All-in-the-NMI' approach works if it is guaranteed that game frame won't take longer than TV frame. I'd move sound update right after the VRAM update, though, to reduce possible jitter (uneven periods between sound updates) - it is not very noticeable, but as it does not require major changes, why not.

Disabling NMI itself is not a good idea, OAM RAM needs to be refreshed by rewriting it every frame with OAM DMA, otherwise it'll deteriorate soon, producing graphics artifacts. Disabling some logic in the NMI that is not needed during a 'turn' calculation may help a little bit, but probably not by much - like, if a turn calculations take 10 frames, it may reduce it to 9 frames, and if it takes 5 frames, it won't be noticeable at all.

Jun 20, 2015 at 5:23:57 AM
user (6)

< El Ripper >
Posts: 1462 - Joined: 05/30/2014
Profile
Originally posted by: Shiru

Yes, Chase is open source and its code is intended to be read and modified in any way; most of my other NES games open source as well.

If you have very complex game logic that will take more than 1/60s, but you need to keep the UI responsive, you can just make two 'threads' - the UI stuff in NMI, game logic in the normal thread. I did this in my very first NES game, Lan Master, to trace puzzle units connections and detect level completion. The same is done in most of 8/16 bit RTS-like games, with a group of characters controlled by player's orders and a pathfunding algorithm - the character movements could get slower in complex situation, but it won't affect the UI speed, so it'll be less noticeable for player.

'All-in-the-NMI' approach works if it is guaranteed that game frame won't take longer than TV frame. I'd move sound update right after the VRAM update, though, to reduce possible jitter (uneven periods between sound updates) - it is not very noticeable, but as it does not require major changes, why not.

Disabling NMI itself is not a good idea, OAM RAM needs to be refreshed by rewriting it every frame with OAM DMA, otherwise it'll deteriorate soon, producing graphics artifacts. Disabling some logic in the NMI that is not needed during a 'turn' calculation may help a little bit, but probably not by much - like, if a turn calculations take 10 frames, it may reduce it to 9 frames, and if it takes 5 frames, it won't be noticeable at all.
Touche'! I did never think about it. I will in future, when also learning to handle NES music formats better.

Thanks for all the advice and suggestions. Really appreciated.

Jun 29, 2015 at 6:06:10 AM
Velheim1334 (0)
avatar
(Casey Strange) < Crack Trooper >
Posts: 197 - Joined: 01/05/2014
Wisconsin
Profile
I've been told that Castlevania IV has coding that is very complex to reverse engineer, hence why there are no ROM hacks available. Is this true?

Jun 29, 2015 at 8:41:24 PM
Retroscribe81 (241)
avatar
(Bill H) < Ridley Wrangler >
Posts: 2985 - Joined: 07/23/2010
Pennsylvania
Profile
It took me 8 hours to learn how to mod my Wii. With help from an expert chatting with me on Facebook.  It still didn't work right.

That should tell you something about my abilities.

-------------------------


 


Edited: 06/29/2015 at 08:41 PM by Retroscribe81

Jul 16, 2015 at 12:38:04 AM
MrFaust (27)
avatar
(Anthony ) < Meka Chicken >
Posts: 659 - Joined: 02/03/2014
Pennsylvania
Profile
With the upcoming release of my first hack (a three year process, mind you) I think I am going to take your courses and learn me some nes programing. I'd like to move away from the simple stuff I've been doing and make something of my own (well, i dont know about simple. Took alot of work jus for a hack.). Gonna be a fun ride none the less.

-------------------------
We can't game here, it's Donkey Kong Country.


Edited: 07/16/2015 at 12:41 AM by MrFaust

Jul 16, 2015 at 9:03:29 AM
KHAN Games (89)
avatar
(Kevin Hanley) < Master Higgins >
Posts: 8126 - Joined: 06/21/2007
Florida
Profile
Congrats on making the decision.

-------------------------

gauauu: look, we all paid $10K at some point in our lives for the privilege of hanging out with Kevin


Jun 17, 2016 at 2:20:26 PM
SoleGooseProductions (129)
avatar
(Beau ) < King Solomon >
Posts: 3506 - Joined: 04/22/2013
Michigan
Profile
Crap, I'm like fourteen days late in bumping this, but have at it! I know quite a few have tried to learn in the past year, what is holding you back? How can we as a community help? What are your sticking point? We want to help  .

FYI: still my favorite Brewery thread.

-------------------------
"The light that burns twice as bright burns half as long..." ~ Blade Runner

SoleGooseProductions.com



Edited: 06/17/2016 at 02:21 PM by SoleGooseProductions

Jun 17, 2016 at 3:36:26 PM
user (6)

< El Ripper >
Posts: 1462 - Joined: 05/30/2014
Profile
Originally posted by: SoleGooseProductions

Crap, I'm like fourteen days late in bumping this, but have at it! I know quite a few have tried to learn in the past year, what is holding you back? How can we as a community help? What are your sticking point? We want to help  .

FYI: still my favorite Brewery thread.

I think that an argument to think about could be this. All efforts to write up guides and tutorials are worth admiration, gratitude, and respect.

However, Nerdy Nights by BunnyBoy and MetalSlime are, in my opinion, more efficient than others.

Starting from zero, NerdyNight is the perfect tool. It is technical enough to make you understand what's going on behind the scenes, easy enough to be understandable, it uses a proper English language not relaying too much on slangs, jargons, and such, and it coherently builds up a learning path from beginning to end.

Done with the tutorial, you are able to make simple games.

For instance, the beginning of your code will always be BunnyBoy code: RESET, setup stack, clear RAM, load background tiles, sprites positions, PPU stuff, and so on. Your NMI routine will be easy to implement, and you can, from there, personalize a simple game as much as you wish, moving sprites around and such. Nothing too fancy, but it will works wonderfully. You know about VBlank time, you make sure to avoid glitches writing to the PPU only when you are supposed to, and you are set. Music will be simple, but MetalSlime engine allows you to do whatever basic you wish to do.

After that, there are many articles, on NA, nesdev, or made by others authors, but not a coherent "Level2" guide. You are pretty much on your own wondering how to figure out how different mappers work, what other options you have for music, how fancier graphical effects work and should be implemented. Everything you can find gets technical, havier on jargons, and nothing is proposed in a tutorial step by step fashion. There is of course the ask all questions thread, which will save you pretty often, but a coherent what's next guide is missing.

And it is unlikely to find something specific about NES game design in a book store. The way I see it, a competent NerdyNights 2.0 would be beneficial, because after how to make simple games is learned (weeks), the time spent in searching how to learn the extra knowledge needed to finish up a more specific game is huge (months/years, and tons of coding hours gone); and moreover, a solution already worked out years ago, or a knowledge known for sure by an expert, makes more sense than an attempt to reinvent the wheel by someone learning in the process.

Of course, experts have a life too, and are not paid to teach others, so it would be simply arrogant to complain about it. But if a good book (paper or digital) was written in year 2016 on this specific subject (NES videogame design in assembly), I guess that many wouldn't mind to spend some money to buy it. I would even buy a nicely formatted paper copy of NerdyNights, no matter teh fact that it is already available for free here on NA!

I think this lack could be in the reasons for very few people keeping on making NES games, after their first experiments.

As always, just my silly two cents opinion on the matter, I can definitely be wrong on the subject.

Cheers!  
 

Jun 17, 2016 at 4:18:17 PM
bunnyboy (81)
avatar
(Funktastic B) < Master Higgins >
Posts: 7704 - Joined: 02/28/2007
California
Profile
I completely agree, and thats part of why its sad Nerdy Nights is still (among) the best. The next step is almost completely missing. There are a few complete games with commented source, but that doesnt really go through the process of setting up data structures and arranging big blocks of code.

A "pong to vertical shooter" or "pong to platformer" is badly needed.

Jun 17, 2016 at 4:40:32 PM
Bort License Plate (56)
avatar
(Barclay Barry Bert Bort) < Wiz's Mom >
Posts: 12397 - Joined: 09/02/2015
Ontario
Profile
Never noticed this thread. I'd love to try to program an nes game one day just to say yeah I did it, but I don't have the time currently. I'm curious if any of you homebrewin guys do this for a living or just as a part time hobby?

-------------------------
Switch Friend Code: SW-3306-9533-2032

Jun 17, 2016 at 4:51:43 PM
user (6)

< El Ripper >
Posts: 1462 - Joined: 05/30/2014
Profile
Originally posted by: BertBerryCrunch

Never noticed this thread. I'd love to try to program an nes game one day just to say yeah I did it, but I don't have the time currently. I'm curious if any of you homebrewin guys do this for a living or just as a part time hobby?
The money made last year is in this year tax papers, if this was the question.
If you divide such amount by the hours spent, you gonna laugh (and need floating point math).
Still, be in the few lucky who actually made some income is somehow an achievement.
If you like to learn for the sake of it, do it. If you plan a career, I advice to try something else.

Jun 17, 2016 at 4:58:15 PM
Bort License Plate (56)
avatar
(Barclay Barry Bert Bort) < Wiz's Mom >
Posts: 12397 - Joined: 09/02/2015
Ontario
Profile
Originally posted by: user

Originally posted by: BertBerryCrunch

Never noticed this thread. I'd love to try to program an nes game one day just to say yeah I did it, but I don't have the time currently. I'm curious if any of you homebrewin guys do this for a living or just as a part time hobby?
The money made last year is in this year tax papers, if this was the question.
If you divide such amount by the hours spent, you gonna laugh (and need floating point math).
Still, be in the few lucky who actually made some income is somehow an achievement.
If you like to learn for the sake of it, do it. If you plan a career, I advice to try something else.



yeah I was just curious if it has been done. I wouldn't expect to jump in and instantly be making a living wage off that alone. I do enjoy learning things, and getting creative. I've been messing around with music production just for fun, wanted to get into remixing game music but it's still going to be a while before I get there. Maybe I'll mess around with making nes games somewhere in the future, looks like fun.

-------------------------
Switch Friend Code: SW-3306-9533-2032

Jun 17, 2016 at 6:07:09 PM
Mog (140)
avatar
(Mr Mog) < King Solomon >
Posts: 4728 - Joined: 05/02/2009
Federated States of Micronesia
Profile
Alright, I learned how to program for NES. Now we need a thread that says "So you've learned how to program....Why haven't you made(finished) a game yet?"   


Edited: 06/17/2016 at 06:07 PM by Mog

Jun 17, 2016 at 6:44:22 PM
user (6)

< El Ripper >
Posts: 1462 - Joined: 05/30/2014
Profile
Originally posted by: Mog

Alright, I learned how to program for NES. Now we need a thread that says "So you've learned how to program....Why haven't you made(finished) a game yet?"   

Since we are here sharing opinions today, I dare to have a say on this topic as well. When I get boring, you guys let me know.  

About three weeks after starting reading NerdyNights, I was done with the unpolished version of 1007 Bolts. One of the first feedback I got was like "nice little game", and the game made it into Action 53 volume II multicart by INL and nesdev. This was lucky, and unexpected, of course. And kept the morale high about try to make NES games. When I made Cyo it costed me about 3 weeks of effort as well: I only wished to attempt a simple shooting game, have a game 100% made by myself published and downloadable for free, and when I posted the ROM, someone finished the game up (which many still unable to, so not an easy game to defeat) after like 2 days it was available, telling me like "it is fun to play".  

I don't wish to sound like a guru or anything, and when I see Derek of Gradual Game talking about Owlia, and the time he dedicated to it, I'm like "whoaaaa..." and full of respect. But I wonder how many Derek are out there, and I wonder what the real first Derek project on a NES was. I mean, keeping the morale up for years, never being done with a project, is tough. Of course, some projects cannot be accomplished in few weeks, but for a first game, my advice would be to KISS (keep it simple stupid).

I fear that some don't really estimate the coding/testing/design/debug hours a project needs, when they plan their first game; and if it is too complex, always buggy, never done, and so on, the morale and enthusiasm about it goes low. I think that if the project complexity is 1, the difficulty and resources needed are going to be 1; if the compelxity is 2, resources needed 4; 3 becomes 9; 4 will be 16; and so on, growing exponentially. This expecially if you are new to the task and have to figure out pretty much everything.

Of course, 100% chapeau to those who jump in with a first game which is something astonishing. But I'm not betting that this would be the correct approach for everyone. A smaller scope and a nice planning, could be a solution to have a first ROM completed rather than not.

As always, just my two cents. Free to disagree.

Thanks for reading.  

 

Jun 17, 2016 at 7:55:23 PM
Broke Studio (1)
avatar
< Crack Trooper >
Posts: 141 - Joined: 06/02/2015
France
Profile
If someone has a specific idea for a tutorial, I may try to write something on the subject. If it can help. Not that I'm a NES expert but I've learned a lot this last year.

Jun 17, 2016 at 9:20:50 PM
Teknoskan (0)
avatar
< Meka Chicken >
Posts: 627 - Joined: 09/20/2015
Texas
Profile
I would loooove to make some NES homebrews, but I don't know how to code. Or even the technical limitations. All I know is it has a limited color palate and only a certain amount of sprites can be on screen. If someone wanted to work on a homebrew and show me some ropes, I'd be down for one on my spare time.

-------------------------
My Collection Imgur: http://imgur.com/a/tjhfH

Jun 17, 2016 at 9:48:11 PM
user (6)

< El Ripper >
Posts: 1462 - Joined: 05/30/2014
Profile
Originally posted by: Teknoskan

I would loooove to make some NES homebrews, but I don't know how to code. Or even the technical limitations. All I know is it has a limited color palate and only a certain amount of sprites can be on screen. If someone wanted to work on a homebrew and show me some ropes, I'd be down for one on my spare time.

NA >> The Brewery >> NES Programming (Organized - Nerdy Nights)

http://nintendoage.com/forum/mess...

Nerdy Nights - Week 0 (Intro)
Nerdy Nights - Week 1 (Number Systems and Core Programming Ideas)
Nerdy Nights - Week 2 (NES Architecture Overview)
Nerdy Nights - Week 3 (6502 ASM, First App)
Nerdy Nights - Week 4 (Color Palettes, Sprites, Second App)
Nerdy Nights - Week 5 (Multiple Sprites, Reading Controllers, More Instructions)
Nerdy Nights - Week 6 (Backgrounds)
Nerdy Nights - Week 7 (Subroutines, Game Layout, Starting Pong)
Nerdy Nights - Week 8 (16 bit math, pointers, nested loops)
Nerdy Nights - Week 9 (Numbers, Bin -> Dec)

Advanced Nerdy Nights #1 (CHR Bank Switching)
Advanced Nerdy Nights #2 (MMC1 CHR and PRG Bank switching, WRAM + Battery)
Advanced Nerdy Nights #3 (Horizontal Background Scrolling)
Advanced Nerdy Nights #4 (Sprite 0 Hit for a Status Bar)

Nerdy Nights - Hacking 1 (Hex Editing)

Nerdy Nights - Sound 0 (Intro)
Nerdy Nights - Sound 1 (APU Overview and Square 1 Basics)
Nerdy Nights - Sound 2 (Square 2 and Triangle Basics)
Nerdy Nights - Sound 3 (Periods and Look-up Tables)
Nerdy Nights - Sound 4 (Sound Engine Basics)
Nerdy Nights - Sound 5 (Sound Data, Pointer Tables, Headers)
Nerdy Nights - Sound 6 (Tempo, Note Lengths, Buffering and Rests)
Nerdy Nights - Sound 7 (Volume Envelopes)
Nerdy Nights - Sound 8 (Opcodes and Looping)
Nerdy Nights - Sound 9 (Finite Loops, Key Changes, Chord Progressions))
Nerdy Nights - Sound 10 (Simple Drums)

That's pretty much all you need for your first game. Actually, right after reading this, I suggest to:

1 .find a list of 6502 processor opcodes (useful also to know which opcodes triggers which flags):

https://duckduckgo.com/?q=6502+op...; ; and

2. add some knowledge about NMI and vBlank:

http://wiki.nesdev.com/w/index.ph...

If you have questions, the ask all question thread it is here in this NA brewery.

Good luck!  

Jun 18, 2016 at 9:53:24 AM
GradualGames (39)
avatar
(Derek Andrews) < El Ripper >
Posts: 1128 - Joined: 10/09/2009
Pennsylvania
Profile
I think one of the biggest mistakes folks make when trying to make games is being too ambitious too quickly---and having unrealistic expectations of vast strides of progress within a few days or weeks. I made these mistakes early on, before I got into the NES---many times in a row, so I had the scars and history to realize that that approach would not work. On top of that, I had been working as a programmer for about 2 years before I got into NES coding---and I saw even more evidence of how ambition, short timelines, and too many features creates utter disaster, very quickly. On top of ALL THAT, I had very, very little motivation in my personal life to pursue hobbies back then. However, deep in my heart I had a burning desire to make a game that wouldn't go away. So I decided to completely throw away ANY tendency to criticize myself for slow progress---and decided that just 3 times a week I would do *SOMETHING*, a very small goal, and write down what I wanted to do and whether I did it.

This goal could be as small as "reading a paragraph" of a tutorial---because back then I literally had that much difficulty focusing on something challenging.

Little by little, by being kind to myself, and giving myself 5 years to complete my first (NES, I'd made several smaller games for DOS before) game---Nomolos was created. No marathons---no extreme ambitions, just slow and patient progress. I realized making a retro style game for the NES is probably the most important thing in my life. You only live once. DO IT.


-------------------------
Creators of: Nomolos: Storming the CATsle, and The Legends of Owlia.


Edited: 06/18/2016 at 10:12 AM by GradualGames

Jun 18, 2016 at 9:59:45 AM
SoleGooseProductions (129)
avatar
(Beau ) < King Solomon >
Posts: 3506 - Joined: 04/22/2013
Michigan
Profile
Originally posted by: Mog

Alright, I learned how to program for NES. Now we need a thread that says "So you've learned how to program....Why haven't you made(finished) a game yet?"   

Maybe we should get a special award/badge for being in this state. Three years strong, and I still haven't "finished" a game.


-------------------------
"The light that burns twice as bright burns half as long..." ~ Blade Runner

SoleGooseProductions.com


Jun 18, 2016 at 10:13:24 AM
Mega Mario Man (63)
avatar
(Tim ) < Ridley Wrangler >
Posts: 2743 - Joined: 02/13/2014
Nebraska
Profile
Originally posted by: SoleGooseProductions
 
Originally posted by: Mog

Alright, I learned how to program for NES. Now we need a thread that says "So you've learned how to program....Why haven't you made(finished) a game yet?"   

Maybe we should get a special award/badge for being in this state. Three years strong, and I still haven't "finished" a game.
 
We are in the same boat.... Hope it can keep floating for a bit longer.

 

-------------------------
Current Project
Isometric Survival Horror

Older Projects
Tailgate Party, Power Pad Demo, Happy Hour

Links
Store, Facebook, Twitter

Jun 18, 2016 at 10:43:12 AM
GradualGames (39)
avatar
(Derek Andrews) < El Ripper >
Posts: 1128 - Joined: 10/09/2009
Pennsylvania
Profile
Originally posted by: Mega Mario Man
 
Originally posted by: SoleGooseProductions
 
Originally posted by: Mog

Alright, I learned how to program for NES. Now we need a thread that says "So you've learned how to program....Why haven't you made(finished) a game yet?"   

Maybe we should get a special award/badge for being in this state. Three years strong, and I still haven't "finished" a game.
 
We are in the same boat.... Hope it can keep floating for a bit longer.

 
You can do it!!!

-------------------------
Creators of: Nomolos: Storming the CATsle, and The Legends of Owlia.

Jun 18, 2016 at 12:38:21 PM
user (6)

< El Ripper >
Posts: 1462 - Joined: 05/30/2014
Profile
Originally posted by: GradualGames

I think one of the biggest mistakes folks make when trying to make games is being too ambitious too quickly---and having unrealistic expectations of vast strides of progress within a few days or weeks. I made these mistakes early on, before I got into the NES---many times in a row, so I had the scars and history to realize that that approach would not work. On top of that, I had been working as a programmer for about 2 years before I got into NES coding---and I saw even more evidence of how ambition, short timelines, and too many features creates utter disaster, very quickly. On top of ALL THAT, I had very, very little motivation in my personal life to pursue hobbies back then. However, deep in my heart I had a burning desire to make a game that wouldn't go away. So I decided to completely throw away ANY tendency to criticize myself for slow progress---and decided that just 3 times a week I would do *SOMETHING*, a very small goal, and write down what I wanted to do and whether I did it.

This goal could be as small as "reading a paragraph" of a tutorial---because back then I literally had that much difficulty focusing on something challenging.

Little by little, by being kind to myself, and giving myself 5 years to complete my first (NES, I'd made several smaller games for DOS before) game---Nomolos was created. No marathons---no extreme ambitions, just slow and patient progress. I realized making a retro style game for the NES is probably the most important thing in my life. You only live once. DO IT.

I can confirm. It is a known pattern in any gamemakers or modders community. Some reasonable projects getting done, unreasonable ambitious stuff usually abandoned unfinished after a while.

As a little disagreement with what you say (and I basically agree with), if what is planned to be done before a deadline is reasonable, a near deadline can help to keep concentration and find a couple of hours to work on the project in that free day you are being lazy about the project. It gives you some self-discipline about keeping on working on it.

For the rest, excellent comment on my books, which confirms me what I already knew. Thanks for the post. Cheers!  

Jun 18, 2016 at 12:43:05 PM
Mog (140)
avatar
(Mr Mog) < King Solomon >
Posts: 4728 - Joined: 05/02/2009
Federated States of Micronesia
Profile
Originally posted by: SoleGooseProductions

Originally posted by: Mog

Alright, I learned how to program for NES. Now we need a thread that says "So you've learned how to program....Why haven't you made(finished) a game yet?"   

Maybe we should get a special award/badge for being in this state. Three years strong, and I still haven't "finished" a game.
 


How about a half full mug of beer with cobwebs on it?



Edited: 06/18/2016 at 12:47 PM by Mog

Jun 18, 2016 at 1:40:14 PM
SoleGooseProductions (129)
avatar
(Beau ) < King Solomon >
Posts: 3506 - Joined: 04/22/2013
Michigan
Profile
Originally posted by: Mog

Originally posted by: SoleGooseProductions

Originally posted by: Mog

Alright, I learned how to program for NES. Now we need a thread that says "So you've learned how to program....Why haven't you made(finished) a game yet?"   

Maybe we should get a special award/badge for being in this state. Three years strong, and I still haven't "finished" a game.
 


How about a half full mug of beer with cobwebs on it?
 

I like it! And it should stick around even after that first one is finished. There is something to be said for those that take a long time to finally get one out. It's not like we're not learning or working on something all of the time, but it finds expression much later down the road.


-------------------------
"The light that burns twice as bright burns half as long..." ~ Blade Runner

SoleGooseProductions.com


Jun 18, 2016 at 5:43:52 PM
user (6)

< El Ripper >
Posts: 1462 - Joined: 05/30/2014
Profile
Originally posted by: SoleGooseProductions

I like it! And it should stick around even after that first one is finished. There is something to be said for those that take a long time to finally get one out. It's not like we're not learning or working on something all of the time, but it finds expression much later down the road.

The full homebrewer award is already deserved in my opinion: producing homebrew games doesn't fit the term homebrewer?

Also, more importantly, there is so much curiosity about what you are secretely designing yourself...
You are more enigmatic and secretive (all this said in a good and friendly way) than a well made movie trailer.  

However, whatever your project is, I cheer for it to see a successful release asap!