Procedural level generation on the NES?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.

Moderator: Moderators

psycopathicteen
Posts: 3140
Joined: Wed May 19, 2010 6:12 pm

Re: Procedural level generation on the NES?

Post by psycopathicteen »

SMB3 doesn't randomize scenery does it? The levels always looked the same to me every time I've played. It must keep the seed value the same every time it enters a level.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Procedural level generation on the NES?

Post by thefox »

psycopathicteen wrote:SMB3 doesn't randomize scenery does it? The levels always looked the same to me every time I've played. It must keep the seed value the same every time it enters a level.
smb3-random-stamps.png
smb3-random-stamps.png (10.15 KiB) Viewed 7388 times
Those "stamps" at the top of the screen (flower, star, etc.) are randomized. The seed is not constant.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
slobu
Posts: 276
Joined: Tue Jul 12, 2011 10:58 am

Re: Procedural level generation on the NES?

Post by slobu »

There was a famicom game that ripped off the original Intellivision Dungeons & Dragons game VERY hard. Unfortunately, I forget the name.

Basically, it had a top-down view and dungeon sections were revealed as you traversed them.

RAM really isn't the issue with procedural content. You just need the right PRNG and the wherewithal to tailor your game around the results.
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Procedural level generation on the NES?

Post by Sumez »

RAM can definitely help out a lot, but I'd agree it's not necessary.

Also, just to be clear. Procedurally generated content doesn't necessarily mean it's "random" - although it might as well be.
User avatar
rainwarrior
Posts: 8731
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Procedural level generation on the NES?

Post by rainwarrior »

I always assumed that Balloon Fight's "Balloon Trip" mode was procedurally generated.
User avatar
za909
Posts: 248
Joined: Fri Jan 24, 2014 9:05 am
Location: Mijn hart woont al in Nederland

Re: Procedural level generation on the NES?

Post by za909 »

If I end up having enough space at the end of development, I do plan on adding a randomized "Endless mode" (á la Megaman 9 and 10) to my game, and it pretty much requires no RAM at all. But that's because the entire thing runs on a timer that spawns sets of enemies from data in ROM, all I have to do is make the spawns be dependent on RNG output, or maybe define sets of spawns and let the RNG choose one of those sets.
User avatar
FrankenGraphics
Formerly WheelInventor
Posts: 2064
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Procedural level generation on the NES?

Post by FrankenGraphics »

sumez wrote:RAM can definitely help out a lot, but I'd agree it's not necessary.
It seems the sum is something like this: Work RAM makes the design and programming a lot more convenient/easier as a wider band of approaches become available, but there are applications and techniques within the rather broad term "procedural generation" where the 2kB:s of internal, volatile RAM is (more than) enough.

The question of volatile and non-volatile RAM is something i've pondered about just recently. In the commercial"making of" video for Solstice which rainwarrior linked to in another recent thread, they boast of a game experience "totally unique to the Nintendo Entertainment System", seemingly on the basis of it offering a world where "[...] the player can do whatever he likes, he can manipulate things within the game [...]". This is true in the sense that there's no correct path and you can go wherever you want, perhaps even more so than in for example metroid. But in terms of world manipulation, the game is actually strictly choreobraphed, with the potion system layered on top. This is pretty common for NES (and other console-) games, which i'd attribute to the expense of battery backed work RAM, or just work RAM in the case of a game design like Solstice.

Not that solstice has anything to do with procedural generation, but i think the parallel is valid when hypothesizing how a procedurally generated dungeon explorer/adventure game would work - how to keep track of chests, loot, opened doors, links between levels and anything else in that fashion.
User avatar
Sumez
Posts: 919
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Procedural level generation on the NES?

Post by Sumez »

A true persistent "open world" game could probably demand a lot of ram depending on how you prioritize elements in the design, and leaving stuff explored, enemies killed, chest open etc, is bound to require a least some amount of it, even with clever bitmasks.
But that's a pretty limited application of procedural design compared to what it can be used for. :) Balloon Trip is a great example of a game with simple procedural design and absolutely no amount of persistency.
User avatar
Vectrex2809
Posts: 102
Joined: Mon Jul 14, 2014 6:05 am
Location: Tokyo, Japan

Re: Procedural level generation on the NES?

Post by Vectrex2809 »

I actually did some simple procedural generation on the NES. In Brony Blaster, I randomly generate a path between the rooms, then I randomly choose from 16 sets of 16 rooms depending on how many doors the room has. It's rather simple but it works. - https://www.youtube.com/watch?v=Uyp31O3xSRY (This is an older version where the game would select from 256 rooms at random)

I also randomly generated the shelves on the bonus stages in REKT. The prices and the items on the shelves are randomised. It's just a cosmetic/comedic effect though. Level 4 in that game also randomly chooses rooms, although on a much simpler scale than Brony Blaster - https://www.youtube.com/watch?v=O9upGnDxbbM
User avatar
DRW
Posts: 2225
Joined: Sat Sep 07, 2013 2:59 pm

Re: Procedural level generation on the NES?

Post by DRW »

I might be a bit late to the discussion, but "City Trouble" uses randomized levels. And although there's no backtracking, you will encounter exactly the same level as before when you lose a life, so the status is saved in RAM.
(Random sprite stuff, like enemy placement and actions, are still randomized on demand, though. You won't get the same combination of enemies after you lose a life.)

Since the level structure is pretty easy, the NES' regular RAM provides enough room for it:

For houses, I simply need to store the house width and the house height. (Those two values could actually have been compressed into a single byte if the RAM would have been too small, but I didn't need to do this.)
And for gaps, I store the width.

That's it.
My game "City Trouble":
Gameplay video: https://youtu.be/Eee0yurkIW4
Download (ROM, manual, artworks): http://www.denny-r-walter.de/city.html
Post Reply