Procedural level generation on the NES?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems.

Moderator: Moderators

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

Re: Procedural level generation on the NES?

Post by psycopathicteen » Fri Nov 17, 2017 1:28 pm

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: 3141
Joined: Mon Jan 03, 2005 10:36 am
Location: Tampere, Finland
Contact:

Re: Procedural level generation on the NES?

Post by thefox » Fri Nov 17, 2017 2:01 pm

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 6354 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: 275
Joined: Tue Jul 12, 2011 10:58 am

Re: Procedural level generation on the NES?

Post by slobu » Fri Nov 17, 2017 2:19 pm

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: 920
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Procedural level generation on the NES?

Post by Sumez » Fri Nov 17, 2017 3:48 pm

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: 8006
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Procedural level generation on the NES?

Post by rainwarrior » Fri Nov 17, 2017 6:38 pm

I always assumed that Balloon Fight's "Balloon Trip" mode was procedurally generated.

User avatar
za909
Posts: 226
Joined: Fri Jan 24, 2014 9:05 am
Location: Hungary

Re: Procedural level generation on the NES?

Post by za909 » Sat Nov 18, 2017 4:43 am

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: 2033
Joined: Thu Apr 14, 2016 2:55 am
Location: Gothenburg, Sweden
Contact:

Re: Procedural level generation on the NES?

Post by FrankenGraphics » Sat Nov 18, 2017 4:59 am

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.
http://www.frankengraphics.com - personal NES blog

User avatar
Sumez
Posts: 920
Joined: Thu Sep 15, 2016 6:29 am
Location: Denmark (PAL)

Re: Procedural level generation on the NES?

Post by Sumez » Sat Nov 18, 2017 11:09 am

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: 97
Joined: Mon Jul 14, 2014 6:05 am
Location: Lausanne, Switzerland

Re: Procedural level generation on the NES?

Post by Vectrex2809 » Tue Nov 21, 2017 5:26 pm

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: 2045
Joined: Sat Sep 07, 2013 2:59 pm

Re: Procedural level generation on the NES?

Post by DRW » Tue Jan 01, 2019 7:08 pm

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": www.denny-r-walter.de/city.htm

Post Reply