FAQ Search
Memberlist Usergroups
Profile
  Forum Statistics Register
 Log in to check your private messages
Log in to check your private messages
Moonpod Homepage Starscape Information Mr. Robot Information Free Game Downloads Starscape Highscore Table
How would a procedurally-generated side-scroller play?
Goto page 1, 2  Next
Post new topic   Reply to topic    Discussion Pod Forum Index -> Independent Game Development View previous topic :: View next topic  
 Author
Message
DogBoy
Starscape Jedi
Starscape Jedi


Joined: 13 Mar 2006
Posts: 67



PostPosted: Thu Jun 10, 2010 1:03 pm    Post subject: How would a procedurally-generated side-scroller play? Reply with quote

I've often idly pondered this question, and playing Hydorah (see the thread in "Game Talk" board) made me think about it again.

Roguelike games - and their Diablo-ique offspring - are RPG without fixed pre-designed levels. For something similar in platform gaming, there's "Spelunky", "Icy Tower" or "Canabalt" . Shmups have "Warning Forever". These games focus on gameplay skills rather than rote-learning of level design.

I know I've played scrolling shmups with randomish enemies, but they all felt rather unstructured. The classic side-scroller formula of acquiring radically new weapons and / or access to new ships as you go through qualitatively different stages in the game is a lot of fun. But in classic side-scrollers, half the game is memorising the levels. How would it feel if different levels used different enemies and building blocks, but each time you played the level its layout was different?

In a game like Starscape, enemies don't come in predictable waves. But Starscape levels themselves are pretty homogenous - a bunch of rocks floating in space. I think a randomised side-scroller would have a very different feel to it.

What do other people think?
Back to top
View user's profile
starscape junkie



Joined: 15 Jun 2003
Posts: 177
Location: The Thirteenth Colony



PostPosted: Fri Jun 11, 2010 7:17 am    Post subject: Reply with quote

Depends on how you want to do it really, the beauty of procgen is you can do pretty much anything procedurally as long as you're willing to put in the requisite research time and programming effort.

So we break something like hydorah into its pieces which I would list as:

Landscape: Pretty easy to procgen this, gradius style games backgrounds are often beautiful but rarely complex. A few set pieces and some rules on how to put them together and you're golden. Add in randomized secrets for an extra bit of flair. This is more an art issue than a programming one.

Enemy Ships: You have type, group and move pattern. This is mostly a scripting and art deal again. 3 type a's and 2 type b's come at you in a star shaped group in a sine wave pattern. If you want to go really crazy you can have it generate new ships with differing firing patterns and movement speeds etc with each new game.

Bosses: Essentially Warning Forever with a few tweaks. Admittedly that's not as easy as just writing it but the underlying concept is the same, taking various parts and pasting them together to make a threatening super-ship.

Player Ship & Powerups: This one is a little tricky in the balancing department. If you get a ship with randomized firing patterns and effects at every new level/game/whatever then you run the risk of making something ridiculously overpowered or underpowered and you risk ruining the experience of the player over something they cant control.

With that in mind we end up with ProcGenSS - In Space!. You can then go a couple ways with the game mechanics. You can do a new game that generates x levels and you do a level select deal. Starting a new game gets you a whole new set of levels to play through. You can do a survival style where you dump x lives on the player and see how far they can get.

You can keep the level learning portion of the side scroller while reaping the replayability benefits of having proc-gen levels/ships/bosses/whatever.
Back to top
View user's profile
Poo Bear
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 4121
Location: Sheffield, UK



PostPosted: Fri Jun 11, 2010 8:05 am    Post subject: Reply with quote

It's an interesting idea, there are issues with the landscape creating too many dead ends, managing the difficulty curve properly, etc. That means limiting the level of randomisation and limiting the aspects of the game that can be randomised. Which would probably mean to ensure a good few hours of reasonably paced play it might get boring/predictable?

To counter that take a genetic approach. So you can put the game into creative mode and then get to tweak lots of parameters on how one level is generated, plus you can force it to start from nothing or start from a previously generated level that you might like. So it's procedurally generated under human guidance. Maybe you can even go in and tweak bits by hand at the end. Then that level is uploaded into the 'cloud'. Other people download it and collectively score it, tag and position it within some level structure where everyone agrees it makes sense in terms of style and difficulty.

So you end up with an expanding 'universe' level map that links everything sensibly and an ever expanding set of procgen levels. Set your minimum acceptable score to 10 and you only see the best, set it to 1 and you see everything.
Back to top
View user's profile Visit poster's website
DogBoy
Starscape Jedi
Starscape Jedi


Joined: 13 Mar 2006
Posts: 67



PostPosted: Fri Jun 11, 2010 12:34 pm    Post subject: Reply with quote

OK we could probably discuss the technical aspects of how to do it intelligently for pages and pages (I'm an AI researcher - canny heuristics, neural nets and population search algorithms if necessary).

What I was actually wondering was, how would the play experience for a sidescroller differ if you couldn't rote-learn the levels?

If you've ever played Spelunky, you'll know that in some respects it is very different from a traditional platformer. Not quite so much in the mechanics - jump, hang, boff enemies, collect stuff, buy powerups - but rather in the way you have to relate to the game.

Essentially, in a game with predefined levels, you can win the game by memorising a set of moves from start to end. Your brain gets visual feedback which helps to prompt the correct moves at the correct times, and correct for the effects of minor deviations in your moves from play-through to play-through, but it's pretty much like learning a piece of music by heart. In principle you could win certain games blindfolded, if your memory and timing were good enough.

This is averted slightly in several ways: small differences in timing and positioning can add up to big differences in what moves you need to make, and games which randomise enemy behaviour patterns mean you need to keep your eye on the screen, but rote learning plays a big part.

There is certainly rote learning in Spelunky: various sub-structures are encountered repeatedly; particular tricks are used to defeat different enemies or hazards; but there's enough variety in the levels generated that it feels more like learning musical improvisation (in a particular style) than like learning to play any individual piece.

So what I wonder is: how would this affect the feel of a side-scroller?
Back to top
View user's profile
DogBoy
Starscape Jedi
Starscape Jedi


Joined: 13 Mar 2006
Posts: 67



PostPosted: Fri Jun 11, 2010 12:36 pm    Post subject: Reply with quote

The questions Starscape Junkie raises about how much to procedurally generate are interesting. What makes Spelunky so special is that there are clearly differentiable levels, with different hazards and different enemies. The items are different and do qualitatively different things. If everything was generated procedurally, it would need to be done in a way which preserved a sense of qualitative differences.

Interesting. I started writing "that's a formidable technical challenge to automate (e.g. creating a different set of distinctive procedurally generated weapons every time you play the game)" but on reflection maybe it's not that far-fetched. Say the game has 15 different weapons (which are different each play-through!). We can make our lives easier by hardcoding a few graphically distinct categories of weapon (e.g. shot weapons, beam weapons, missile weapons).

Each category will have parameters: for instance, shot weapons will vary according to firing rate, damage, shot speed, shot size, angular spread, and so on. (Actually, the weapon types will vary according to the relative ratio of these parameters, because each weapon can be powered up; we'll assume for the moment that powerups just linearly increase the value of every parameter.)

A straightforward approach to making a random set of 5 distinctive shot weapons would be to choose 5 maximally distant parameter vectors on a hypersphere (this sounds way more complex than it really is). Then we just have to worry about balance and art. We'll solve art with a dirty trick: choosing from a set of pre-drawn projectiles based on some hand-coded heuristics. We can try and solve balance with another dirty trick: hand-code a crude controller for a ship, make the ship indestructible, and simulate it firing the weapon at various random crowds of enemies. This'll allow us to roughly calibrate weapon effectiveness.

Boo-ya! Wow, I want to try this now Very Happy
Back to top
View user's profile
Poo Bear
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 4121
Location: Sheffield, UK



PostPosted: Fri Jun 11, 2010 1:19 pm    Post subject: Reply with quote

Ah yes, I'd forgotten about Spelunky. Just went back to it now for a refresher. Feels very odd to me, I'm so used to platform games presented as an incremental challenge where you take a run at it fairly recklessly, exploring the challenge safe in the knowledge that you will slowly get better over multiple plays. Spelunky is quite nerve racking, especially until you find the level exit, but even then you have to weigh up further gold collecting with the possibility of running out of equipment or getting stuck.

I guess a procgen side scroller would have a similar tense game play feel resulting in very cautious play. The question is can you play it cautiously? With Spelunky you still get predictable items, enemies, cause and effect. If a side scroller had weapons/levels/enemies all procgen how could you create low-risk situations to safely learn? I suppose it depends how death is handled.
Back to top
View user's profile Visit poster's website
starscape junkie



Joined: 15 Jun 2003
Posts: 177
Location: The Thirteenth Colony



PostPosted: Sat Jun 12, 2010 2:56 am    Post subject: Reply with quote

Player death is one of those tricky things to manage. You can have instadeath and checkpoints every 5 feet like vvvvvv so that death is just part of the learning experience and on the other end of the spectrum starting the entire game again with instadeath. It seems to be a way to artificially either increase the difficulty or length of the game or a personal preference of the designer.

There's a couple ways you could manage to have players learn the hazards of a course in a low-risk situation. The first is at the beginning of the level send a single enemy ship of each new type out. Assuming that you had everything procgenned that level this allows the user to learn the firing patterns of the ship they are using, the firing pattern of the enemy ships, one of the movement patterns that may be used all before the ensuing chaos of lots of different things on screen. You could also do a tiered approach where you introduce a new enemy ship every level while using all the previous ships. So level 1 you get A's; level 2 A's and B's and so on.
Back to top
View user's profile
DogBoy
Starscape Jedi
Starscape Jedi


Joined: 13 Mar 2006
Posts: 67



PostPosted: Mon Jun 14, 2010 12:01 pm    Post subject: Reply with quote

OK, so I've been toying with a few ideas (and trying to unravel the haphazard format of DanC's excellent Tyrian source graphics).

I think I might be on to something conceptually. Using the music analogy again, it would be cool to have a game where there was a mixture of learning and improvisation. So why not make you practice only what you find difficult?

Say the levels are generated randomly (or designed by hand) once only. Every second you play the game, the entire game map behind you mutates slightly (out of sight). Next time you play, the level will be different - up to the point where you died. That bit stays essentially the same until you've beaten it repeatedly.

Admittedly, this could make for a tough game if it means that levels tend to fill up with the stuff that kills you; you'd want to code around that. "I couldn't get past the Snow level after it became packed with those evil Ice Towers".

The flavour could be any of:
* You are in a warp space, which you interfere with just by being there.
* You are attacking a giant battlestation which gets repaired differently after every attack on it.
* Your enemies are semi-intelligent and use trial-and-error learning.

What I find neat is that this idea could work really well with a scrolling game, because they can be constrained to make "in front of you" and "behind you" totally unambiguous.
Back to top
View user's profile
Poo Bear
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 4121
Location: Sheffield, UK



PostPosted: Mon Jun 14, 2010 1:29 pm    Post subject: Reply with quote

Interesting, so you have 3 lives and then you restart? Completed levels are regenerated, but the one you died on remains unchanged. So fresh challenges keep coming until you get stuck on one and then it lets you repeat it.

I suppose if you found that one level impossible you could press a button to fully reset everything. The worst case scenario is you lose all your lives on level4, restart and then find level3 has gotten too hard, restart and now level2 is too hard, so it feels like you are going backwards.
Back to top
View user's profile Visit poster's website
DogBoy
Starscape Jedi
Starscape Jedi


Joined: 13 Mar 2006
Posts: 67



PostPosted: Mon Jun 14, 2010 3:15 pm    Post subject: Reply with quote

Poo Bear wrote:
Interesting, so you have 3 lives and then you restart?

Sure, or you have one life with a regenerating shield, or one life with a multi-hit-point hull which is repaired between levels, something like that.

Poo Bear wrote:
Completed levels are regenerated, but the one you died on remains unchanged. So fresh challenges keep coming until you get stuck on one and then it lets you repeat it.


That's the simplest model. I was even thinking that the game would track how far you'd progressed in a level and regenerate the earlier portions of the level. It shouldn't be impossible - your procgen code would be written to start at the end of the generated area and work backwards keeping things consistent. You'd just make it start ("end") at the part of the level where you died.

Now I'm imagining a game where that happens onscreen. Your ship would emit a visible warp field! Smile

Quote:
I suppose if you found that one level impossible you could press a button to fully reset everything. The worst case scenario is you lose all your lives on level4, restart and then find level3 has gotten too hard, restart and now level2 is too hard, so it feels like you are going backwards.


Yeah, that's definitely something to worry about. But there are ways to work around it, e.g.
1) You get to pick which of several levels to play next
2) You start with a ship which is powered-up according to how far you've reached in the game
Back to top
View user's profile
icarus
Troll
Troll


Joined: 01 Mar 2004

Location: Olympia Washington



PostPosted: Wed Jun 16, 2010 5:41 pm    Post subject: Reply with quote

I think the best way to improve starscape (other than adding more customization options) would be to make the Arachnid proceduraly generated and evolve to match the player's tactics.
Back to top
View user's profile Visit poster's website
Poo Bear
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 4121
Location: Sheffield, UK



PostPosted: Thu Jun 17, 2010 8:14 am    Post subject: Reply with quote

Sounds like Warning Forever, I need to check that game out again. From what I remember though it 'evolves' in a simplistic way i.e. add armour to any areas the player destroys, increase number of weapons if defeated, etc. So in effect it just gets hard fairly quickly. Although, that might be OK in Starscape, because you can back off and go mine/research for a while and come back harder. It would just be reliant on ensuring the player can always upgrade to something as powerful (or more so) than the enemy.

http://jayisgames.com/archives/2006/04/warning_forever.php

What would be nice is if you had some kind of predictable rules governing how everything worked. So lets say the player is defeating an enemy fighter and the controlling AI wants to 'evolve' it. If it adds armour then the fighter's mass increases and it becomes less manoeuvrable. To compensate you need a bigger engine, which needs more power, but there is only so much space in the frame which puts a hard limit on growth. So maybe a weapon has to go to make room, etc. So, minor enemies can change, but they can't just turn into bigger enemies - a fighter must always be a fighter. Similarly if it upgrades the gun then it will take more power, so maybe the engine cuts out when it fires or it cannot sustain fire. If the ship ends up being more sophisticated then it costs more resources to make so there are less of them.

Warning Forever gets bigger and harder, but it does it in a way determined by your own attacks - which is very cool. I think it would be interesting to see enemies adapting within predictable and sensible physical limits. It would be great to enter a zone and start wiping out enemy fighters, then suddenly the fighters have weaker guns and less armour so they are easier to kill, but they are twice as fast and there are twice as many of them and you get nailed. So you fall back and re-equip with a weaker scatter shot weapon so it's easier to kill them.

Sounds like genetic algorithm type stuff, very tricky to implement i.e. the enemy could alter a ship a 1000x before doing something sensible, so if you played through quickly and changed tactics a lot it might not get a chance to respond. That's why I've been thinking about this along with a central server and an 'ongoing world' - still single player but the server is watching each game. So the server would see hundreds of game sessions and get time to select alterations that really did work.
Back to top
View user's profile Visit poster's website
icarus
Troll
Troll


Joined: 01 Mar 2004

Location: Olympia Washington



PostPosted: Sun Jun 20, 2010 7:48 pm    Post subject: Reply with quote

I remember Warning forever (think I found it here in fact) and that's pretty much what I was thinking off.

Also perhaps the enemies would evolve resistance to different attack types to prevent the players spamming the same attacks over and over.

Other mean tricks like warp jammers and those annoying back gravity ships would crop up in response to the players tactics as well. Such as warp jammers only appearing when the player jumps out of the map too often.
Back to top
View user's profile Visit poster's website
DogBoy
Starscape Jedi
Starscape Jedi


Joined: 13 Mar 2006
Posts: 67



PostPosted: Wed Aug 04, 2010 1:33 pm    Post subject: Reply with quote

Poo Bear wrote:

Sounds like genetic algorithm type stuff, very tricky to implement i.e. the enemy could alter a ship a 1000x before doing something sensible, so if you played through quickly and changed tactics a lot it might not get a chance to respond. That's why I've been thinking about this along with a central server and an 'ongoing world' - still single player but the server is watching each game. So the server would see hundreds of game sessions and get time to select alterations that really did work.


I've thought about this before. The easiest thing to do would be to have every ship slightly different, and preferentially replicate the ships which damaged the player the most. Unfortunately, this might be open to abuse from players who deliberately let themselves be damaged by easy-to-handle ships. Also, it might fall foul of weird coevolutionary dynamics, since the ships getting evolutionary credit might not be the ones actually responsible for the challenge (e.g. a ship which forces the player to slow down to avoid crashing into it, so that surrounding ships' shots hit the player).
Back to top
View user's profile
Poo Bear
Pod Team
Pod Team


Joined: 14 Oct 2002
Posts: 4121
Location: Sheffield, UK



PostPosted: Wed Aug 04, 2010 2:06 pm    Post subject: Reply with quote

Maybe players could flag randomly generated 'good' levels/baddies for upload and sharing. So you cherry pick the 10% of content where everything managed to come together nicely? That way you have an online library of good content, but you can still run the system locally when you want to experiment.

Hmm, maybe.
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Discussion Pod Forum Index -> Independent Game Development All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group