That's been done before, so... not nearly as fun to make.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.
What was the first NES homebrew game?
Moderator: Moderators
Re: What was the first NES homebrew game?
Re: What was the first NES homebrew game?
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
https://www.youtube.com/watch?v=B_towiGufz4
https://www.youtube.com/watch?v=7Nw3OL4-tw4
https://www.youtube.com/watch?v=Yt_He0Ep02o
- FrankenGraphics
- Formerly WheelInventor
- Posts: 2064
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
- Contact:
Re: What was the first NES homebrew game?
Would chr-ram page toggling be helpful in this regard?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.
Re: What was the first NES homebrew game?
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.
- 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.
-
- Posts: 2158
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
Re: What was the first NES homebrew game?
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.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.
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.
Re: What was the first NES homebrew game?
Sadly, this is what I had in mind, and it does look kind of bad.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
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
Re: What was the first NES homebrew game?
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.
Re: What was the first NES homebrew game?
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.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.
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.
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.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.
Re: What was the first NES homebrew game?
TG16/PCE could do it. Its processor is much faster.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.
Of course the "cool factor" is getting a worse system to do it.
nesdoug.com -- blog/tutorial on programming for the NES
- TmEE
- Posts: 960
- Joined: Wed Feb 13, 2008 9:10 am
- Location: Norway (50 and 60Hz compatible :P)
- Contact:
Re: What was the first NES homebrew game?
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.
Re: What was the first NES homebrew game?
Well, I did program my own simplified version for the PCE.dougeff wrote:TG16/PCE could do it. Its processor is much faster.
https://www.youtube.com/watch?v=HEp7niIP4Qw
Re: What was the first NES homebrew game?
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
-
- Posts: 2158
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
Re: What was the first NES homebrew game?
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.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.
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---
Code: Select all
-------X
--------
------X-
--------
-----X--
--------
----X---
--------
Re: What was the first NES homebrew game?
Split the mario kart stuff?
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
Re: What was the first NES homebrew game?
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
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.