Jump to content
  • Advertisement
Sign in to follow this  
  • entries
    53
  • comments
    225
  • views
    69647

Procedural!

Sign in to follow this  
Milkshake

321 views

While I've always thought it would be fun to design fiendish puzzles for my game - I've always thought it would be orders of magnitude cooler to have the computer do it for me. The idea that there's a little Dungeon Master sitting behind the scenes thinking up cool puzzles and encounters for me to play through, crafting a little world just for me to explore.

There are lots of cool games which do things along these lines: Elite, Diablo, Nethack, Fate, Elder Scrolls, etc ... but pretty much all of them boil down to just randomising the landscape in which you fight randomised things for randomised items. Now don't get me wrong, I played Diablo ruthlessly until I had Windforce at my side and a keychain full of my friend's ears: but I really long for the exploration and puzzles that filled the isometric adventures of yesteryear: Head Over Heels, Fairlight, The Great Escape, Little Big Adventure. I want to be able to walk into a room in my own game, and scratch my head wondering what to do next.

So how exactly can I get the computer to actually assemble one of these isometric puzzles, or any puzzle for that matter? It's easy to just drop a few random objects onto some randomly placed platforms in a randomly shaped room, with some random doors to other random rooms - but how can the computer tell this is even traversable, yet alone a challenge for the player? How can the computer actually create a challenge - rather than just re-hashing pre-programmed/pre-assembled sections or hoping something clever emerges from the noise?

Well - a few weeks ago, I hatched a cunning plan that I'm hoping will get me there. It's a big multi-layered algorithm, but it should be quite easy to teach it how to use new objects, new characters, new art assets, new capabilities - so the generated levels will scale with me as I add new things into the game. It should also be quite easy to tune the output, asking it to generate a hard level, versus an easy one, a combat heavy one versus a more cerebral one. It's going to be a big project - I'm thinking around the order of a year.

The first step (of many, many steps) is to teach it how to turn a logical description of an area into a real scene the character can run about in. There are lots of ways to skin this cat, but the solution I'm playing with is kind of like a constraint based physics solver ... although the solver is more directed and focuses on detecting cases where there are no solutions. I've only just started, but here are the first procedurally generated rooms. They're still quite unrefined, but just seeing a navigatable environment that I didn't layout by hand myself was really satisfying. The key thing to note is that while these look like randomly scattered tiles - the computer understands what they are and where the player will be able to move. Indeed, it's constrained them so you can only get where it wants you to be able to get.

x

x

x

x

x

It still generates quite a few messy rooms (that are still valid, just very busy and/or hard to comprehend from an isometric perspective) - but I'll hold off adding more constraints to clean these up until I get a few more elements into the solver. The next step is to give the computer a purpose for the environment it's creating: get the player to this door, or item.


Cheers!



Sign in to follow this  


6 Comments


Recommended Comments

Way too cool (including the last post's screenshots as well).

I second Ravuya's desire to see the underbelly of such a beast.

Share this comment


Link to comment
Fascinating stuff. I normally check this journal because I adore your graphics but this constraints-based procedural generation stuff sounds really ambitious and interesting.

I've actually been playing a PC port of Head Over Heels recently and it is still as good as ever [smile].

Share this comment


Link to comment
Thanks for the positive comments gents!

As far as this whole underbelly thing goes - let me get it doing something cool first!!! It's still very early days and what I have now is really just a proof of concept of a very small part of the algorithm. I've already started pulling it apart to generalise the solver to handle doors and multiple paths, and multiple characters, etc - so everything's really in flux at the minute. As I said (especially with a new bubby on the way), I'm guessing there's a year's work under the hood here, and right now I'm on day 4. If you have any specific bits you're interested in, ask away though.

And EasilyConfused - can I sign you up as my first alpha tester? You'll unfortunately need to wait a while, but Head Over Heels is exactly the kind of magic I'm trying to capture, so I'd love to get feedback on things which just don't "feel" right from other fans of that game when the time comes.

Share this comment


Link to comment
Quote:
Original post by Milkshake
And EasilyConfused - can I sign you up as my first alpha tester? You'll unfortunately need to wait a while, but Head Over Heels is exactly the kind of magic I'm trying to capture, so I'd love to get feedback on things which just don't "feel" right from other fans of that game when the time comes.


That would be great. I grew up on Head Over Heels on the ZX Spectrum back in the golden days of computing.

Drop me a PM if you want to talk about this further. I don't have a vast amount of time to commit but I'd be overjoyed to alpha test this for you.

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!