๐พ Archived View for bbs.geminispace.org โบ s โบ Bucket-List โบ 21256 captured on 2024-12-17 at 15:10:39. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
I've done a bit of 6502 programming, and as a teen, wrote some game code snippets on an Atari800 and an Apple ][... By the time the NES came out I was busy dropping out of high school, hanging out with the wrong people, etc. Eventually jumped back into coding 68K machines, and entirely missed the NES until my kids started gaming.
I've always looked at it enviously, as the NES represented the high point of 8-bit game machines, possibly all game machines, beautifully minimal but not as minimal as the Atari 2600 (which is so minimal as to have very few limitations, as evidenced by really amazing games still being written today! But I am not ready to count cycles to ouput pixels yet). 3D rendering had ruined games, in my opinion, and excess computing power nailed the coffin for creative expression.
And so I've always wanted to write an NES game.
I think I'm going to try it.
Oct 27 ยท 7 weeks ago ยท ๐ drh3xx, wasolili, StanStani, gemalaya, mrrobinhood5, Ahab
๐ gritty ยท Oct 27 at 19:51:
I've recently bought new indie NES carts. I like how there's still a community for it.
๐ stack [OP/mod] ยท Oct 27 at 19:55:
I wonder if it's harder to write a decent game on the NES, or make an FPGA-based NES in Verilog on, say, my $20 Chinese FPGA Nano 9K board...
But as I know very little about the workings of the NES, making a game first is probably a good idea if I wanted to recreate the hardware.
And so I started by trying to set up an environment.
A 10-minute search yielded a few possibilities.
Retroarch-- an easy install on my 10-year-old Linux box. Works with a random homebrew game.
fceux. Read some good comments, on nesdev. Oh, a linux version? Good luck installing. I couldn't. Linux is now officially in its own version of dll-hell, with absurd library incompatibilities. Rather than hunting down old libraries, installed wine, and after fiddling for 5 minutes to get the 32-bit version working, the win32 version of fceux was running as smoothly as imaginable.
I am not a fan of Windows, and haven't used it most of this century, but I've been known to say that Win32 may become the lingua franca of computing. Apparently I was not wrong.
NO$NES.EXE... Another winders emulator that was recommended.
Over the past few days I spent a lot of time watching various youtube videos on the subject. Displaced Gamer's channel is particulary good, and there are a few others I can't remember the names of. I think I know the basic structure of the device.
To be continued...
๐ฆ wasolili [...] ยท Oct 28 at 18:23:
this is on my bucket list, too, although ive not touched it in a while (and didnt get much further than a basic game of life implementation before getting distracted with other half finished projects and life's nonsense). nerdy nights is a decent tutorial and neshacker has some good videos on YouTube.
it's only tangentially related, but shiru8bit's demos for nes are really cool, especially after getting familiar with the limitations of the hardware. worth a watch:
โ https://www.youtube.com/watch?v=338r2BRYg3A
and he has a blog post about it here:
โ https://habr.com/ru/articles/487018/
๐ stack [OP/mod] ยท Oct 28 at 22:58:
I am thinking of making a version of Targ for NES. It looks like it hasn't been done for some reason, probably licensing issues with Exidy originally.
There is surprisingly little information about this game -- a few pictures and some videos of people playing it very poorly.
I spent most of my freshman lunch money honing my Targ and Gorf skills, and remember a couple of moves...
It seems like a reasonably simple game, no scrolling, simple graphics... I have to figure out the enemy AI without too much screwing around.
๐ stack [OP/mod] ยท Oct 30 at 02:32:
Moving right along. Created the playfield. (LaGrange will stretch the pic, so it is a bit odd looking, but it's good, trust me).
Since you have to make everything out of a fixed set of tiles and palettes, this is really fiddly. The tools are sucky -- I imagined in 40 years it would be a little easier...
On the positive note, it is not a mockup -- it loads on the emulator, and the objects are real sprites. Nothing moves yet, but still, not a bad start.
๐ฆ zzo38 ยท Oct 30 at 02:44:
I use Mednafen as the NES/Famicom emulator and also many others. I could not install Wine, due to package manager conflicts, but can also run programs in DOS and others.
I would also want to see, if someone make up (FOSS) Pokemon battle simulator with NES/Famicom, even with 2 players. The team can be edited by keyboard and saved/loaded by a tape, and then players will have to select the command without knowing what command will be selected by opponent.
โฏ๏ธ dragfyre ยท Oct 30 at 12:51:
this is awesome.
๐ stack [OP/mod] ยท Nov 06 at 21:54:
A couple of all-nighters, and I can drive the Wummel around and shoot.
The targs (enemy arrow-like things) are not yet doing anything. But I do have a generic collision detector, so I just have to come up with some simple AI for them to decide on directions.
Also, the spectar smuggler, scoring, and overall game managment...
๐ stack [OP/mod] ยท Nov 09 at 19:26:
My ADHD has been atrocious and I've been unable to motivate myself lately. I suppose the stupid elections were a steady load of all kinds of dread. But that is just an excuse. I would sit down, look at the all-too-complicated logic for the Wummel, think about how I should really replace it with a lookup table, procrastinate some more, play a game of farkle and go sit in the bathtub.
๐ stack [OP/mod] ยท Nov 09 at 23:10:
Tons of ugly logic which looks at the current direction, speed, position, and the controller, and figures out what the next direction and speed should be -- maybe 150 instructions with spaghetti logic and a few small lookup tables... replaced.
A neat 64-byte lookup table - and a handful of instructions to look up and update next state.
Why was it so hard? Fiddling with a 5-dimensional table that yields 3 bits is painful and error-prone. The problem is that once you figure it out, you realize that you want to change how the lookup works because it saves many instructions, but there is no tool that lets you symbolically manipulate and reorder a table that works. So you wind up doing awful cut-paste of bits, knowing there will be hard-to-catch errors...
I almost cranked up Common Lisp to write a generic state machine builder which lets you generate tables any way you want once the data is in... But stopped myself for now. Maybe next project.
๐ stack [OP/mod] ยท Nov 10 at 03:30:
OK, this is incredibly fun!
6502-fu is coming back to me. I am ripping through my code, cleaning and optimizing. It's amazing what you can do when you start thinking that way.
For instance I had a subroutine which checked if the Wummel is at an intersection. It looked decent, maybe 10-12 lines of assembly, maybe 25 cycles. But, another 6 cycles each to call and to return! Inlining it saves 12 cycles. Then, only positions divisible by 8 can maybe be intersections. 7 out of 8 times a moving Wummel can quickly rule out an intersection. Optimizing the fast check to 7 cycles, while the longer case takes 22 cycles averages out to 8.875 cycles per check -- much faster than a call/return that does nothing!
And that's just a simple optimization. The real fun is realizing that by restructuring code, or lookup tables, or whatever -- you can cut the code by an order of magnitude! I just did that in the Wummel control code. And that is just pure joy.
I feel like my brain was built for this. I love every second of it. Doing it on modern machines is silly (I can't help myself anyway, most of what I write on x86 is under 20 kilobytes).
๐ stack [OP/mod] ยท Dec 06 at 15:24:
Haven't updated for a while, as I took off to NYC for a bit...
Last session I got pretty much everything moving, and collision detection working. A bit messy still.
I also don't know where to begin with sound fx. Seems that libraritis started already back in NES days, and there are no guides on how to make sounds -- everyone uses some sort of interrupt-driven library...
will get back to it soon...