[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]

/agdg/ - Amateur Game Development General

AGDG - The Board
Name
Email
Subject
REC
STOP
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Oekaki
Show oekaki applet
(replaces files and can be used instead)
Options
dicesidesmodifier

Allowed file types:jpg, jpeg, gif, png, webp,webm, mp4, mov, swf, pdf
Max filesize is16 MB.
Max image dimensions are15000 x15000.
You may upload5 per post.


Welcome to AGDG, keep working on your game anon!
See also: /ideaguy/ | /vm/

File: 243eda07dc91387⋯.png (62.39 KB,400x400,1:1,ClipboardImage.png)

377b32 No.31686

Let's talk about procedural generation and random generation. Anything that gives you content while being a programming fag.

Do you know what Smooth Gradient Noise is? Do you know why it's important? Are you working on a routine to generate a dungeon floor, character names, AI? Let's talk about it.

I can provide a lot of help on this topic, I'm fairly knowledgeable about procedural generation. So ask your questions.

RESOURCES

Perlin Noise

https://web.archive.org/web/20160303232627/http://www.noisemachine.com/talk1/

Simplex Noise

http://www.csee.umbc.edu/~olano/s2002c36/ch02.pdf

LibNoise

This is a library that helps you to make interesting textures. These can be used for actual textures of things in your game, or maybe use them to build a height-map for a world.

http://libnoise.sourceforge.net

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

d8e4d5 No.31691

>>31686

How would you go about programatically generating a story?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

4ee6c9 No.31693

>>31691

This keeps coming up on this board. It's not possible to create a meaningful story outside of a vague background story.

Describe how you think it would work.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

4ee6c9 No.31694

>>31693

>>31691

Every story has key elements. From memory there's only a handful of story "templates" that are used over and over again.

You could randomly select a template and then fill in the key details. Each detail is itself a further template that adds more overall variables to the story. For example, I pick the "youth saves the world" template (aka, Star Wars ep 4). Then for the setting, I might pick Kingdom. Kingdom then creates variables such as "kingdom name", "king name". Maybe i also pick another thing to randomise the kings court, adding a "wizard". Or maybe instead, when randomly selecting the queens backstory, "raised by a wizard" is selected.

These have now added a wizard to the global variables. Maybe, when chosing the main antagonist, we have to select from the pool of characters already pulled into the story (because then we have a guarantee that the antagonist has relationships to characters for drama). Maybe this selects the wizard. This in turn raises the "importance" of characters related to the wizard. Further to this, when the story requires a "blacksmith", it has a high chance of selecting an existing character from the pool, rather than filling the story with more and more characters.

In the end, I think you could construct a story outline with a fair bit of depth. The problem next would be what the fuck you do with it. How do you put it into the game in any meaningful way? How would you construct quests or missions etc?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

121ea7 No.31708

Reminder not to rely on pure randomness and noise algorithms for everything.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

bb0f19 No.31712

File: 312bcab61829908⋯.png (695.5 KB,3360x2100,8:5,ecroh-labelled.png)

>>31691

>>31693

>>31694

This is a big topic. For a start, look at Dwarf Fortress. DF is probably the most ambitious "story generator". You can generate a world, and then it will simulate that world to create a kind of story. For example, "In the year X, king Y led an army and defeated Z". Combine these things together in a meaningful way and you can have a kind of procedurally generated story.

The main issue with this is that there isn't much in the way of flavour, or creative writing. The game just gives you facts. However this is a good starting point. You can then develop additional algorithms which take these basic facts and present them in an interesting way.

Having said this, it is by no means a simple task. DF has been in development for 12 years, and while it creates very detailed worlds, it is presented to the user basically as an encyclopedia. But this is probably the best attempt I've seen at procedurally generated storytelling.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

bb0f19 No.31713

File: f82d471b31a1f59⋯.png (471.36 KB,1025x1025,1:1,world-greyscale.png)

File: 07493423ac755d4⋯.png (11.75 KB,1025x1025,1:1,world-landmass.png)

I've also done a fair bit of work on procedural generation. I have a fairly functional map generator. This is done using the diamond-square algorithm, with a smoothing algorithm applied to coastlines. I'll try to get some info up on the wiki when I have some time.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

5a9064 No.31715

I've started to improve the wiki

http://8agdg.wikidot.com/procedural-generation

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

f4ea56 No.31716

>>31712

So in the simplest example you can think of, tell me how you could use this bare bones historical stuff, to not only produce a storyline, but have it mean something, and put it in the game.

You can't. You can't make a randomly generated "story", if you could even do that, unfold in an interesting and creative way. Maybe, maybe, maybe a CYOA story... but even then, it would read like shit.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

f4ea56 No.31717

>>31712

>>31716

Don't get me wrong. I would like to explore the idea. I just think everyone is underestimating the complexity of nuance.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

366d27 No.31725

File: 496c3aeb5bc2032⋯.jpg (98.08 KB,1224x792,17:11,46d53f31184a48b37c6d6456b0….jpg)

File: 49b8eeb6a64b459⋯.jpg (105.24 KB,800x637,800:637,b6ffc8ee5c747dcbb3af6b0674….jpg)

File: 91d9f15a16b663c⋯.jpg (63.19 KB,350x332,175:166,siheyuan1.jpg)

File: 752734d32a54ee7⋯.jpg (82.88 KB,486x544,243:272,4123224e925604f04989c283f5….jpg)

I'm trying to randomly generate ancient chinese houses, aka Siheyuans. (for a 2d roguelike game, so tiles.)

I've got experience with randomly generating dungeons but none with houses or apartments or really anything other than dungeons and world terrain.

They seem to generally have the same layout (while following the rules of Feng Shui): main courtyard in the center surrounded by pergolas, with some general laws governing how the rooms are divided: most important room is always to the north (ancestors shrine), least important rooms to the south (servants quarters, for example). The entrance to the complex is (almost always) to the southeast, and everything is surrounded by walls. Sometimes there's an outer courtyard, too, and upstairs floors with stairs from the main courtyard.

The algorithm I have in mind first generates the data for the residents, and then starts out with the main courtyard (size dependant on wealth of residents as the larger the courtyard, the more rooms around it), then builds the walls around it and then generates the secondary courtyard to the south and then the walls around everything + entrance and a second floor if wealthy enough.

I'm afraid though that because of the "rules" for constructing one of these they're all gonna end up more or less the same structurally and the only things that will seem different at the decorations (different gardens, different weapon racks..). Am I even on the right track here? Can you think of a better way of doing this?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

f4ea56 No.31726

>>31725

Seems somewhat contradictory to say there's well defined rules and feng shui and then be concerned they will all turn out the same. This may be a case where you need to allow more variation in construction because you're making a game, not an historical city recreation.

It sounds like what you're doing is on the right track though. For sure.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

bb0f19 No.31732

File: 3a3cec878935107⋯.jpg (522.07 KB,1652x843,1652:843,6fe5c5bd7db924e4625e217266….jpg)

>>31716

>>31717

To produce a storyline? No idea. I would just be interested in some kind of sandbox game. Think Mount and Blade, just a bit more complex. Not everything needs to be procedurally generated BTW. You can hardcode in whatever you want. Take Daggerfall for example, it has the huge procedurally generated world and dungeons, then it layers a hardcoded plot over it.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

bb0f19 No.31733

File: 7683443c9a059f2⋯.jpg (387.88 KB,1680x1050,8:5,screenshot1.jpg)

>>31725

You can always go with a "building blocks" approach. Create a bunch of template layouts, which basically sets out which room serves which purpose, and then populate the template with randomly selected room layouts. That's how a lot of modern games make their random levels. That's also how architecture generally works anyway.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

6e184a No.31737

>>31732

I was responding to you bringing up Dwarf Fortresses approach to creating history, which a storyline make it does not (you were responding to posts about making a random story). While I appreciate that the random history is cool, and even creates notable figures from which to draw from for artifact names / city names / artwork descriptions etc, it doesn't help to give the player a "quest" outside of "Go to the [building type] of [historical name] and retrieve the [thing] of [historical name]".

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

b5dba3 No.31741

>Have 33x33 mesh, generate 2D vector values randomly on each point

>Interpolate between 4 corners to generate values

But apparently this isn't Perlin Noise unless you take surface normals?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

6e184a No.31742

>>31741

Specifically for it to be classed as "perlin" noise you need to calculate a dot product (surface normal I guess is one way to say it) and interpolate.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

10975e No.31744

I'm completely new to procedural generation but I'd like to use it to generate dungeons. I have no idea how to start, so I was wondering if there were any good examples or tutorials for starting with procedural generation

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

bb0f19 No.31760

>>31744

Depends on what kind of game and what kind of dungeons you are making. If you're interested in minecraft-style generation, look at http://accidentalnoise.sourceforge.net/minecraftworlds.html

If you're interested in Daggerfall-style dungeons: http://en.uesp.net/wiki/Daggerfall:Dungeons

If you're after something nethack-style: https://www.gamasutra.com/blogs/AAdonaac/20150903/252889/Procedural_Dungeon_Generation_Algorithm.php

And finally, there's also the classic Legend of Zelda style, which doesn't require too much explanation.

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

10975e No.31763

>>31760

Thanks for the links, the nethack one looks very promising!

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



[Return][Go to top][Catalog][Nerve Center][Random][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]