What was the first NES homebrew game?

You can talk about almost anything that you want to on this board.

Moderator: Moderators

User avatar
tokumaru
Posts: 11863
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: What was the first NES homebrew game?

Post by tokumaru » Wed Oct 18, 2017 6:00 pm

tepples wrote:If you want to do something like Mario Kart, make it more like Rad Racer along the lines of Sonic Drift for Game Gear.
That's been done before, so... not nearly as fun to make.

ccovell
Posts: 1015
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Re: What was the first NES homebrew game?

Post by ccovell » Thu Oct 19, 2017 12:08 am

There have been a couple F-Zero/MarioKart-like homebrew games on the MSX and Megadrive/Gen that do a blocky sort of "raycasting":

https://www.youtube.com/watch?v=B_towiGufz4

https://www.youtube.com/watch?v=7Nw3OL4-tw4

https://www.youtube.com/watch?v=Yt_He0Ep02o

User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2032
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: What was the first NES homebrew game?

Post by FrankenGraphics » Thu Oct 19, 2017 6:37 am

On an unrelated note, I thought of a way to make Mario Kart on the NES. It involves using less than 50% of the screen, CHR-RAM, much slower frame rate (maybe 15 fps), and raycasting. It would look crappy, but I think you could simulate mode7 style perspective.
Would chr-ram page toggling be helpful in this regard?
http://www.frankengraphics.com - personal NES blog

User avatar
tokumaru
Posts: 11863
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: What was the first NES homebrew game?

Post by tokumaru » Thu Oct 19, 2017 8:11 am

If I were implementing Mario Kart on the NES (there goes the topic...), here's what I'd try first:

- Use 4x4 software pixels, so that all possible pattern combinations fit in a constant set of 256 tiles, eliminating the need for slow CHR-RAM manipulation;

- CHR bankswitching to separate the distant parallax layer from the road itself;

- Create look-up tables indicating the map coordinates of the contents of every on-screen pixel, relative to the player position, for all possible angles. That could end up being well over 100KB, but would eliminate the need for complex math: for each on-screen pixel, you'd add the relative coordinates to the player's position and use the result to read a color from the map, which may use tiling to save space;

- Objects/sprites would be drawn exactly like in a raycaster, possibly using logarithmic division and an arctangent look-up table to find the horizontal position of on-screen objects, and a multiplication is used to calculate their distances, and from that, their size.

Celius
Posts: 2157
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Re: What was the first NES homebrew game?

Post by Celius » Thu Oct 19, 2017 10:23 am

tokumaru wrote:Use 4x4 software pixels, so that all possible pattern combinations fit in a constant set of 256 tiles, eliminating the need for slow CHR-RAM manipulation.
I wonder if it would work to use 2x8 software pixels and use timed code to reset the scroll every 2 scanlines to increase resolution... I think we had discussed this idea, or a similar one for raycasting a while back.

If I took a stab at it, I would do polygons with XOR filling in a window centered in the screen. My thought is that a wireframe racer would be doable; adding XOR filling could just be a step beyond (it's not always that simple to add filling, but if we assume just a single flat road, it should be rather simple). I wouldn't try to have too much detail on the road itself to increase frame rate. Could be pretty decent, or pretty terrible.

User avatar
dougeff
Posts: 2741
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: What was the first NES homebrew game?

Post by dougeff » Thu Oct 19, 2017 10:38 am

There have been a couple F-Zero/MarioKart-like homebrew games on the MSX and Megadrive/Gen that do a blocky sort of "raycasting":

https://www.youtube.com/watch?v=B_towiGufz4

https://www.youtube.com/watch?v=7Nw3OL4-tw4

https://www.youtube.com/watch?v=Yt_He0Ep02o
Sadly, this is what I had in mind, and it does look kind of bad.

I don't like the 4x4 pixel idea, but I suppose it would fill the screen, whereas my idea of having rendering off for 50% of the frame to write 240 tiles worth...3840 writes, over 4 frames is 960 writes per frame...is a bit crazy.
nesdoug.com -- blog/tutorial on programming for the NES

tepples
Posts: 22054
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: What was the first NES homebrew game?

Post by tepples » Thu Oct 19, 2017 10:56 am

The third option is to prerender each frame of movement around the track and then have the camera move on rails. Toy Story Racer for Game Boy Color does this.

User avatar
tokumaru
Posts: 11863
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: What was the first NES homebrew game?

Post by tokumaru » Thu Oct 19, 2017 11:02 am

Celius wrote:I wonder if it would work to use 2x8 software pixels and use timed code to reset the scroll every 2 scanlines to increase resolution... I think we had discussed this idea, or a similar one for raycasting a while back.
Yeah, that could probably be done to improve the resolution, but it may impact the performance quite a bit. Using a lower resolution not only makes things easier to display on the NES, but it also reduces the amount of calculations you have to do in order to render a scene and the amount of data that has to be transferred to VRAM. 4x4 software pixels would look like the second video Chris posted, which is more than acceptable considering it's the NES doing it in software. Drawing interesting tracks using only 4 colors would be a challenge, though... more colors could be simulated with dithering, but then the combinations won't fit in 256 tiles anymore. Maybe the maps can be designed to not have more than 4 colors visible at a time, so the palette could change on the fly.

I feel like a higher frame rate is more important then resolution in a game like this, and since this is the NES we're talking about, there will have to be compromises.
dougeff wrote:my idea of having rendering off for 50% of the frame to write 240 tiles worth...3840 writes, over 4 frames is 960 writes per frame...is a bit crazy.
The problem is not so much transferring that data to the PPU, but calculating those 4KB of data. You most likely won't get a playable frame rate if you need to generate and transfer a full pattern table for every game frame.

User avatar
dougeff
Posts: 2741
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: What was the first NES homebrew game?

Post by dougeff » Thu Oct 19, 2017 1:17 pm

The problem is not so much transferring that data to the PPU, but calculating those 4KB of data. You most likely won't get a playable frame rate if you need to generate and transfer a full pattern table for every game frame.
TG16/PCE could do it. Its processor is much faster.

Of course the "cool factor" is getting a worse system to do it.
nesdoug.com -- blog/tutorial on programming for the NES

User avatar
TmEE
Posts: 760
Joined: Wed Feb 13, 2008 9:10 am
Location: Estonia, Rapla city (50 and 60Hz compatible :P)
Contact:

Re: What was the first NES homebrew game?

Post by TmEE » Thu Oct 19, 2017 3:51 pm

PCE also has no restrictions to VRAM access, you can write stuff as fast as you can and anytime during the display. CPU is unable to use of all of the available VRAM bandwidth and there's no DMA device to do it either, similar problem to SMS/GG which have much more bandwidth than CPU can use up on its own. MD and SNES add DMA that can use up all the bandwidth available.

ccovell
Posts: 1015
Joined: Sun Mar 19, 2006 9:44 pm
Location: Japan
Contact:

Re: What was the first NES homebrew game?

Post by ccovell » Thu Oct 19, 2017 6:31 pm

dougeff wrote:TG16/PCE could do it. Its processor is much faster.
Well, I did program my own simplified version for the PCE. :)

https://www.youtube.com/watch?v=HEp7niIP4Qw

User avatar
dougeff
Posts: 2741
Joined: Fri May 08, 2015 7:17 pm
Location: DIGDUG
Contact:

Re: What was the first NES homebrew game?

Post by dougeff » Thu Oct 19, 2017 8:41 pm

See, that proves my point. That looks beautiful. An NES version would look like Space Invaders by comparison.
nesdoug.com -- blog/tutorial on programming for the NES

Celius
Posts: 2157
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Re: What was the first NES homebrew game?

Post by Celius » Fri Oct 20, 2017 9:31 am

tokumaru wrote:I feel like a higher frame rate is more important then resolution in a game like this, and since this is the NES we're talking about, there will have to be compromises.
I would agree about frame rate being a higher priority. I would try to find a balance between resolution and complexity of textures to increase speed. I'm not a fan of complicated textures at low resolution anyway (that's why I think a lot of games on PS1 looked so bad). If you did some sort of polygon method, you could make basic shapes with solid colors, like the road with gray, grass with green, water with blue... Essentially if you can find where to draw the corners of the shapes on the screen, just connect those points with line drawing code and XOR fill.

The nice thing also about filling polygons with XOR filling is that it simplifies the line drawing code. You don't need to draw a line like this:

Code: Select all

-------X
-------X
------X-
------X-
-----X--
-----X--
----X---
----X---
It only requires 1 pixel to be set per column of pixels:

Code: Select all

-------X
--------
------X-
--------
-----X--
--------
----X---
--------
This speeds up line drawing tremendously. The more I think about this, the more I want to try this out and see how it looks!

User avatar
Dwedit
Posts: 4354
Joined: Fri Nov 19, 2004 7:35 pm
Contact:

Re: What was the first NES homebrew game?

Post by Dwedit » Sun Oct 22, 2017 4:12 pm

Split the mario kart stuff?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!

User avatar
Punch
Posts: 362
Joined: Sat Feb 16, 2013 11:52 am

Re: What was the first NES homebrew game?

Post by Punch » Sun Oct 22, 2017 5:31 pm

feels like the discussion got derailed away already, nesdev style, but here's a compilation of Family BASIC games video(s):

https://www.youtube.com/watch?v=AD0DNX1RIkA

No idea if they're from the time period or new stuff though
This is a block of text that can be added to posts you make. There is a 255 character limit.

Post Reply