TIGSource Forums

Community => Procedural Generation => Topic started by: ArmchairArmada on May 11, 2008, 08:39:52 PM



Title: The First of Infinite Adventures
Post by: ArmchairArmada on May 11, 2008, 08:39:52 PM
I wanted to try to create a game where the entire game-play experience is procedurally generated.  I don't mean just some procedural graphics, nor simply random world layouts.  I mean an entire adventure uniquely created from start to finish each time the game is played.  It is no understatement that this will be a great challenge to face ... but I have a pretty good feeling I could pull it off.

Some time ago (actually the day before the official start of the competition) I created a little test to see what procedurally generated forest paths might look like.  The results looked better than I originally hoped for.  Note, these images are not from the game, but only from a test.  The real game will have greater graphical detail.

(http://img115.imageshack.us/img115/2968/testmaps01pk7.gif)

The basic idea was to create game maps similar to organizational graphs with nodes (clearings) and connecting lines (paths).  The layout of the map will be determined with the following steps:
  • Determine game elements, such as locked doors, breakable rocks, burnable bushes, etc.
  • Add game elements and their dependencies into a list -- for example a bomb item followed by a number of breakable rocks, a torch followed by caves or burnable bushes, empty rooms, etc.
  • After the game element list is built up it will be shuffled.
  • Game elements and dependencies will be untangled so that items are obtainable before their use is needed.
  • The element list will be divided into groupings with gateway obstacles (such as bomb rocks, or locked doors) at the beginning of each group.
  • Create connecting links between nodes within each group.
  • Create links between random nodes in groups with the gateway node of other groups.
  • Possibly figure out a way to create other links between groups as long as it does not create any shortcuts where the player could simply skip portions of the game.
  • Determine geographical locations of nodes with reasonable path lengths
  • Uncross any intersecting paths.
  • Generate basic terrain elements map.
  • Map out enemy locations.
  • Beautify map with more detailed graphics and textures.
  • Let the player explore the newly created world.

If I can figure out how to get this game world graphing to work the way I hope it would then the same exact principals (same functions even) could be applied not only to world maps but also dungeons, caves, villages, and even the room layouts of individual homes.

The only part I have not quite figured out yet is how to make sure paths between nodes do not cross -- possibly creating unintended shortcuts past large parts of the game.

As far as progress goes, things have been a little slow.  If I were using Python I likely would have had twice as much work done already, but I thought I needed the speed and power of C++ for this job so I have to live with the little extra typing.  I only had a few hours hear and there to work on this project, so, at this point in time, I still have almost everything left to do.  Visually the quick test (as shown above) is more impressive than how my actual game project is.  I am a little uncertain if I will have enough time complete even a fraction of what I imagined this project to become.


Title: Re: The First of Infinite Adventures
Post by: William Broom on May 11, 2008, 11:00:04 PM
Can't wait to see more of this. It looks brilliant.


Title: Re: The First of Infinite Adventures
Post by: Noyb on May 11, 2008, 11:03:49 PM
I love the style of the forest scenes. The gameplay design sounds like a procedurally-generated Zelda...which is a very good thing. It definitely sounds ambitious, but you do sound like you know what you're talking about. Looking forward to the final result!


Title: Re: The First of Infinite Adventures
Post by: zradick on May 11, 2008, 11:05:16 PM
Graphics are looking spectacular already.  I love the procedurally generated water in particular.  It reminds me of an idea I had at one point to write software that could simulate erosion forces accurately enough to produce dynamic mountains with run-off, streams, etc.  But I never actually went anywhere with that one.

A fairly simple way you could ensure the player does not have shortcuts to get ahead of themselves would be to do basic line/rect intersection testing.  Calculate min/maxes for the polygonal areas you carve out and from each of your nodes, produce a ray and see if it intersects with the min/max rectangles you have already created.  If not build in that direction, otherwise pick another random direction.  This would tend to create a rather linear (although potentially curving or snaking) path, but it would lead from node to node without the possibility of shortcutting.

You could also place transitions at the end of each area that would move to another randomly generated space, which would also be an easy solution.

Good luck!
Cheers,
--Zack


Title: Re: The First of Infinite Adventures
Post by: jeb on May 11, 2008, 11:21:50 PM
I think you misunderstood something... the deadline is June 2 2008  ::)

j/k, your pics look great :)


Title: Re: The First of Infinite Adventures
Post by: jwaap on May 12, 2008, 01:42:31 AM
Well, these "hills" are the nices looking ones I've ever seen in a game.


Title: Re: The First of Infinite Adventures
Post by: Pip on May 12, 2008, 03:07:33 AM
I'd like to use my one-per-competition "please keep working on this if you don't finish in time"  :-*


Title: Re: The First of Infinite Adventures
Post by: jph wacheski on May 12, 2008, 04:27:50 AM
yup,. i must concure your tests look great, and yout ideas are grand!  I would focuss on one small element of the larger idea (perhaps just a dungen area game?) for this compo and when you get that working add another,. in this way you are sure to have a good entry.  You are then free to work on the larger adventure system at your leasure. . just my thoughts this morning,. as I read your great ideas an ponder how much I intend to bite off on my own scalabe entry.


Title: Re: The First of Infinite Adventures
Post by: increpare on May 12, 2008, 05:40:05 AM
The screenshots look very beautiful.  Will be very cool to see how this develops.


Title: Re: The First of Infinite Adventures
Post by: PaulMorel on May 12, 2008, 06:01:47 AM
I'm jealous of your graphical prowess.

If you can finish this by June 2nd, then you must be some kind of Chuck Norris/Superman/Jesus super robot programmer sent from the future to embarrass us all.


Title: Re: The First of Infinite Adventures
Post by: FARTRON on May 12, 2008, 06:37:23 AM
Wowzers, those shots are really nice. I agree with the thread's general sentiment: keep it simple for the compo, but keep working on this after it's over.


Title: Re: The First of Infinite Adventures
Post by: ArmchairArmada on May 12, 2008, 11:06:38 AM
Thanks for the responses!  I had just gotten back from work, so I will be working on it more today.  The game will be a similar to Zelda hack-and-slash adventure.

Don't be fooled by what you see.  There are no erosion simulations or even any complicated programming of any sort.  The paths are merely lines that are randomly subdivided to be made curvy.  The points on the paths are drawn as filled circles that are randomly made thinner or thicker with each step.  In the above pictures all of the grass paths start at the top-left and end at the bottom-right corner of the screen.  The water is only a different colored path and starts at the top-right and ends at the bottom-left.  The more 'interesting' paths are only multiple paths drawn on top of each other.  After this was drawn the grass and water was given random color variance and the trees were drawn as short vertical lines.

Last night I came up with a much simpler way of handling world/dungeon layouts.  Basically I will be creating the world similar to a procedurally generated maze -- with each node having essentially north, south, east, and west directions.  After the basic map layout is determined I will shift around node positions so that everything will no longer be a simple grid shape, but instead more organic looking.  This will help simplify a number of the more difficult programming problems.


Title: Re: The First of Infinite Adventures
Post by: Entar on May 12, 2008, 05:53:02 PM
That's looking pretty cool, and it's all the better that you did it in a simple way :)


Title: Re: The First of Infinite Adventures
Post by: Metroid48 on May 13, 2008, 08:32:37 AM
This is looking fantastic! In accordance with the other replies, the graphics style looks pretty good as-is. Work primarily on the gameplay, as opposed to making it look really good - it's got style already!

The depth of quests/items will be the most interesting part I feel. Especially if you get procedurally-generated enemies. Keeping it simple as a whole is a good idea, but features like that would make this fun to play again and again.

Despite the contest, keep working on this after it's over. It looks really good!


Title: Re: The First of Infinite Adventures
Post by: shrimp on May 13, 2008, 09:58:56 AM
Looks and reads like it will be really great! I have a similar-ish procedural adventure project on the go but it's not eligible for entry since I started it months ago (and your screenshot is much slicker than anything mine has produced so far  ;D).

If you're interested in maze generation, I found this page really useful: http://www.astrolog.org/labyrnth/algrithm.htm

Check out the various lists of maze properties and operations as well as the algorithms.


Title: Re: The First of Infinite Adventures
Post by: ArmchairArmada on May 21, 2008, 06:40:59 AM
I have been working on my project for a while and I made some nice progress ... but there is still a lot to do.  Basically all I really have left is the stuff common to most games (sprites and animation routines, collision detection, entity management, entity interactions, items and inventory, menus, sound and music, etc.)  I have a feeling that I would not be able to get all of this done before the competition deadline.  If I don't make the deadline I will likely continue this project, but much of it might be rewritten.

Anyhow, here are a few screen shots of what I currently have.  Note that there isn't a main character yet, just a black square.  Like I said, there's still a lot to do.

Screen Shots
(http://img440.imageshack.us/img440/1492/infadvscreenshot02kb3.jpg)

(http://img440.imageshack.us/img440/523/infadvscreens01iy1.jpg)

A map of one of the worlds
(http://img440.imageshack.us/img440/2496/examplemaptk8.gif)


Title: Re: The First of Infinite Adventures
Post by: Hideous on May 21, 2008, 07:17:39 AM
... I'm sorry to say that it has lost a load of it's nice looks :(

The trees look like watermelons!


Title: Re: The First of Infinite Adventures
Post by: Alex May on May 21, 2008, 07:36:36 AM
Your map is really really good :)

I don't mind about the rendered graphics myself. Would be cool if you have time to make some of your own... procedurally!


Title: Re: The First of Infinite Adventures
Post by: Zaphos on May 21, 2008, 07:52:54 AM
The lo-fi aesthetic from the tests on the first post looks much better to me than the bizarre 3D renders ...


Title: Re: The First of Infinite Adventures
Post by: ArmchairArmada on May 21, 2008, 07:54:37 AM
I know the graphics do not look quite as nice, but at the resolution of the original test the characters and enemies would be a single pixel big!  That simply wouldn't do.  The trees are quite cheaply made.  They are basically only a circle and a cylinder made in Blender with texture and displacement mapping applied to them.  I have to admit, originally I wanted graphics that are a lot more detailed (and a lot more procedural) but time is so short.  There are a few other obligations I have put off to work on this, so there is currently no guarantee much further progress will be made.  More than one deadline is looming...


Title: Re: The First of Infinite Adventures
Post by: Melly on May 21, 2008, 08:03:19 AM
I like the map layout. ;D

Also, understand that most people around here are pixel fetishists (myself included) so that might make our opinion about your graphics biased.

However I also feel you might have bitten of more than you can chew. The project sounded really complex for such a short development time.

Good luck though!


Title: Re: The First of Infinite Adventures
Post by: Corpus on May 21, 2008, 08:47:48 AM
How about you release one version of the game with the rendered graphics, and another version with the awesome abstract-looking pixel graphics? Doo iiit.


Title: Re: The First of Infinite Adventures
Post by: FARTRON on May 21, 2008, 09:21:39 AM
I like the new grass, but the new trees look like plastic.

I really liked the personality of the original shots too, so much so that I'd been trying to mimic them in Processing.


Title: Re: The First of Infinite Adventures
Post by: Xion on May 21, 2008, 01:14:03 PM
I have to jump on the "liked the proto-graphics better" train. The prospect of a game with low-fi procedural graphics like that heightened my delight.


Title: Re: The First of Infinite Adventures
Post by: Zaphos on May 21, 2008, 01:24:43 PM
I know the graphics do not look quite as nice, but at the resolution of the original test the characters and enemies would be a single pixel big!
Std Bits had essentially pixel-sized enemies, and it was pretty lovely.  I bet you'd save a lot of work and getting something more appealing in the end with lo-fi.  And you'd have a much better shot at finishing on time ... single-pixel characters don't need animation, and collision detection is easy, right?  ;)


Title: Re: The First of Infinite Adventures
Post by: Xion on May 21, 2008, 01:27:16 PM
If you like I can whip up some pixels for you.


Title: Re: The First of Infinite Adventures
Post by: Pip on May 22, 2008, 06:12:35 AM
Would it be at all possible to scale the environment in the first shots up to allow for a 16x16 sprite? I think it could work.

You must really hate us for shooting down the 3d that you probably spent a long time on  :(


Title: Re: The First of Infinite Adventures
Post by: Melly on May 24, 2008, 10:29:39 PM
Yeah, you should jsut ignore us.

We're bad tigglets.


Title: Re: The First of Infinite Adventures
Post by: nenad on May 25, 2008, 02:51:28 AM
Am I the only one who actually like the look of the rendered trees? It may be argued that they look "plastic" but I don't see why that is a bad thing. "Plasticity" can be a valid visual premise for the game graphics in the same respect the e.g. "pixelization" is. Methinks.


Title: Re: The First of Infinite Adventures
Post by: William Broom on May 25, 2008, 03:23:11 AM
Indeed, we tend to associate 'plasticity' with FPS games that are far too enamoured of their high-definition highlights. But if the game is made plastic-looking in an intentional, thoughtful way, it could be very good.


Title: Re: The First of Infinite Adventures
Post by: Pip on May 25, 2008, 05:25:11 AM
I don't think the plastic look is a problem, it's just the stylistic gulf between the first shots and the second shots was a bit of a shock. We weren't expecting it, that's all.


Title: Re: The First of Infinite Adventures
Post by: ArmchairArmada on May 26, 2008, 02:08:22 PM
Sorry for seemingly ignoring you guys.  I haven't used my computer for a few days.  Like I said earlier, I have a few other things I need to be working on, so this project will be put on the back burner for a few weeks -- which means I will not likely meet the deadline on time.

I did not take the comments on the gaphics personally.  I also would like them to look better, but I also thought I had to make them quickly.  Despite looking so lumpy, those trees had literally taken only a few minutes to make.  That's the magic of displacement mapping -- a rough surface with very little effort.

When I continue work on this project I will redo the graphics.  Actually, I would like to attempt to create entirely procedural graphics.  Trees are easy and something I have some previous experience with.  I have also previously experimented with procedural noise textures a little and would like to try expanding this into being able to make many interesting textures.  This will all take some time though.

Sorry to disappoint anyone, but this game will not be ready for the competition.  Thanks for taking an interest in my game idea though.  I really appreciate the feedback.


Title: Re: The First of Infinite Adventures
Post by: Melly on May 26, 2008, 04:28:08 PM
Oh, that's okay. Just make sure you one day come back to show us what you did. I'll be eagerly waiting.