Dynamic level generation?

Discuss technical or other issues relating to programming the Nintendo Entertainment System, Famicom, or compatible systems. See the NESdev wiki for more information.
vicious
Posts: 15
Joined: Wed May 16, 2012 9:00 pm

Dynamic level generation?

Post by vicious »

I've been wondering about the possibility of creating a Canabalt clone on NES, but i'm curious if NES could handle the dynamic platform generation. Has anyone made any similar demos?
User avatar
Dwedit
Posts: 5256
Joined: Fri Nov 19, 2004 7:35 pm

Re: Dynamic level generation?

Post by Dwedit »

As long as you can keep generating columns of new tiles, you can display any dynamically generated background on the NES.
Here come the fortune cookies! Here come the fortune cookies! They're wearing paper hats!
User avatar
tokumaru
Posts: 12668
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Dynamic level generation?

Post by tokumaru »

vicious wrote:i'm curious if NES could handle the dynamic platform generation.
Of course it can, specially if the player can't walk backwards (like seems to be the case in this game). The computational cost of generating dynamic levels is negligible if you don't have slopes and other complex structures, but even then it wouldn't be impossible. Going backwards would require a significant amount of RAM to store everything that has been generated on the fly.
Has anyone made any similar demos?
I can't really think of anything, but it shouldn't be complicated to pull off at all. You have to consider all possibilities and randomize all parameters when generating a new level piece. I took a quick look at the game and there seem to be a few kinds of structures, like regular buildings, collapsing buildings, cranes, building you go through... just randomize a type of structure, how long it is, what you'll draw on top of it (pipes, antennas, roofs, whatever), and you have a level piece. Enemies, items and such can be randomized just as easily. You might have to think of the difficulty of the game, which should get progressively harder. For example, you could avoid generating large gaps between structures in the first levels, or limit the number of enemies, things like that.
tepples
Posts: 22993
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)

Re: Dynamic level generation?

Post by tepples »

Case in point: Play Excitebike, go into edit mode, and enter level pieces at random.
Celius
Posts: 2158
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States

Re: Dynamic level generation?

Post by Celius »

tokumaru wrote:Going backwards would require a significant amount of RAM to store everything that has been generated on the fly.
You could randomize it on a larger scale so you don't have to use so much RAM (e.g. 8x8 metatiles vs. 4x4 or 2x2). But even then, you'd likely use quite a bit.
User avatar
tokumaru
Posts: 12668
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Dynamic level generation?

Post by tokumaru »

Celius wrote:You could randomize it on a larger scale so you don't have to use so much RAM (e.g. 8x8 metatiles vs. 4x4 or 2x2). But even then, you'd likely use quite a bit.
Absolutely. If the levels are like the ones in Canabalt, you can probably come up with a very compact format, since they are basically composed of gaps and structures. It might even fit in the 2KB of RAM the NES has.
lidnariq
Site Admin
Posts: 11802
Joined: Sun Apr 13, 2008 11:12 am

Re: Dynamic level generation?

Post by lidnariq »

Or you could use a reversible LFSR like that which was used in 2600's Pitfall.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: the universe

Re: Dynamic level generation?

Post by thefox »

Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
GradualGames
Posts: 1106
Joined: Sun Nov 09, 2008 9:18 pm
Location: Pennsylvania, USA

Re: Dynamic level generation?

Post by GradualGames »

This game reminds me a "bit" of the indie game Bit Trip Runner. Wonder if it was inspired by this game? I don't believe that one is dynamically generated, though.
User avatar
rainwarrior
Posts: 8764
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada

Re: Dynamic level generation?

Post by rainwarrior »

Canabalt predates Bit Trip Runner, actually.

When Canabalt came out, I started making a two-button running/jumping game inspired by it for a little while before I abandoned it. Then Bit Trip Runner came out pretty soon after.
User avatar
koitsu
Posts: 4201
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Re: Dynamic level generation?

Post by koitsu »

GradualGames wrote:This game reminds me a "bit" of the indie game Bit Trip Runner. Wonder if it was inspired by this game? I don't believe that one is dynamically generated, though.
These type of games are all just weird spin-offs of Chelnov/Atomic Runner, if you ask me -- and often not very good ones. And actually, Bit Trip Runner reminds me more of Moon Patrol.
tepples
Posts: 22993
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)

Re: Dynamic level generation?

Post by tepples »

I determined along with another Slashdot user that there are really only two kinds of games that developers have made to work well on a touch screen and accelerometer: point-and-click games and racing games. I use "racing games" loosely to include continuous running games like Chelnov and Canabalt and Temple Run and Rayman Jungle Run. But unfortunately, the only mobile platforms that ship with anything but a touch screen and accelerometer have fairly high entry barriers for developers.
Sik
Posts: 1589
Joined: Thu Aug 12, 2010 3:43 am

Re: Dynamic level generation?

Post by Sik »

koitsu wrote:And actually, Bit Trip Runner reminds me more of Moon Patrol.
Which on that note, was on the Atari 2600, out of all systems http://www.youtube.com/watch?v=M3CrqmhDk2A