News for hackers. Stuff that matters.
Re:How to program an NES game in C by gallerdude on Sunday August 13, 2017 @11:00AM (#15003148)
Yeah, making an NES game is on my bucket list. I'm very new at (complex) programming, but I think I might just do it in assembly. If you're going to run a marathon, why not actually do a triathlon?
Re:How to program an NES game in C by Mahn on Sunday August 13, 2017 @07:08PM (#15005495)
In reality most of the complexity lies in how "close to the metal" it is, not so much on the language or the programming techniques per se. Basically, to program for an old console with limited hardware like the NES, you have to understand how the hardware works at a relatively low level to do something with it. There's no "drawSprite" function that you call and be done with, but rather you have to understand what the video processor can do, how do your feed data to it, how you compose a sprite in a layer, etc etc.

So you learn how the different pieces of the hardware work, how do you instruct them to do things, what are their limitations and so on. And once that clicks, it's not particulary more complex than writing modern code. Like programming today, it's less about typing and more about thinking about how all the dots connect together towards doing what you want to do. You do end up with a lot more code that does a lot less, since there are no abstractions and you do everything by hand. But otherwise it's something that anyone with aptitude for programming can pick up.

Re:How to program an NES game in C by tbrock on Sunday August 13, 2017 @11:05AM (#15003178)
Might be easier (but just as much fun) to whet your palate by creating a pico-8 game first: https://www.lexaloffle.com/pico-8.php
Re:How to program an NES game in C by makapuf on Sunday August 13, 2017 @03:51PM (#15004585)
I'd beg to differ. Interpreted lua on a 4GHz pc with 4G of ram is not like compiled C on a 8bit micro. Avr dev or arduino could be arguably closer.
Re:How to program an NES game in C by Impossible on Sunday August 13, 2017 @05:45PM (#15005134)
You should do a little more research into pico-8. Although its true that they aren't the same pico-8 has it's own set of artificial arbitrary execution cost and memory limitations that makes it a lot different than if you were using Love2D or LuaJIT embedded in an SDL2 app. Many things that should be trivial on a PC with effectively infinite resources are hard or impossible to do at frame rate on Pico 8.

The fantasy console that Pico 8 presents is still way more powerful in most ways than an NES though.

Re:How to program an NES game in C by everheardofc on Monday August 14, 2017 @06:35AM (#15007696)
remember that pico-8 is a very limited fantasy console and only has:

32KB cartridges

32KB RAM

a 1MB RAM limitation for the lua VM

Re:How to program an NES game in C by jwhitlark on Sunday August 13, 2017 @12:56PM (#15003696)
I'd start with https://en.m.wikipedia.org/wiki/CHIP-8 first. It won't take too long, and you'll be much better prepared for nes.
Re:How to program an NES game in C by RodgerTheGreat on Sunday August 13, 2017 @06:24PM (#15005285)
I've built some pretty user-friendly development tools targeting Chip8:

https://github.com/JohnEarnest/Octo

Re:How to program an NES game in C by racecar_tacocat on Sunday August 13, 2017 @11:55AM (#15003379)
Your marathon/triathlon comparison, as someone who has done them, makes little sense.