Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

878241 Posts in 32910 Topics- by 24328 Members - Latest Member: Pl4n3

May 21, 2013, 12:03:58 PM
TIGSource ForumsDeveloperTutorialsBraving Procedural Generation
Pages: 1 ... 26 27 [28] 29 30
Print
Author Topic: Braving Procedural Generation  (Read 129531 times)
iopred
Level 0
**


Gutsch


View Profile
« Reply #405 on: February 24, 2012, 06:58:36 PM »

I was playing around with a really loose form of map generation.

I start with two points that move away from each other doing a random walk, after a certain number of steps they start to seek each other instead.

Every so often a point can split, and the child will have a random behavior, either to randomly walk, to seek out a random point that already exists, or to avoid a point that exists.
I also run a horizontal line across the middle of the generated map as a sort 'start' to the tunnel/map.

Heres an example map generated:



It makes nice maps, and playing with turning radii, lifetimes, branch chance and many other parameters make many different results.

You can play around with it here:

http://turncalliope.com/vide/

Control:
Arrows to move.
Space to fire.
Q to change weapons.
Double tap left/right to dodge.
Down -> Up to jump high (and break blocks)
Hold down while falling to accelerate and break blocks.
Hold Delete (Backspace?) to enlarge the minimap.
Logged
kamac
Level 10
*****


Notorious posts editor


View Profile WWW Email
« Reply #406 on: February 25, 2012, 05:30:45 AM »

I don't know if anyone has mentioned Malevolence: The Sword of Ahkranox here(?) but if not, have a look @ their blog:

http://swordofahkranox.blogspot.com/


It's an upcoming RPG, which has everything generated.

Everything includes:

World, Quests, Items, Cities

It's tottaly infinite. Worth to look at.
Logged

JobLeonard
Level 5
*****



View Profile
« Reply #407 on: February 25, 2012, 06:06:23 AM »

It makes nice maps, and playing with turning radii, lifetimes, branch chance and many other parameters make many different results.
Hey, that reminds me a lot of my own Growth simulations (which aren't about procedural generation at all, actually). Very neat way of generating maps!
Logged
TJChap2840
Level 0
*


View Profile
« Reply #408 on: March 20, 2012, 08:32:50 PM »

I've been looking for some comprehensive resources on using Perlin, Simplex or Midpoint Displacement to make height maps that I can apply to a 2D game. All the ones I have seen so far fall into two categories. 100% source code with barely any explanation, or purely mathematical explanation with some pseudo code.

For as popular as procedural generation has become, you'd think there would be many tutorials that are much easier to find. Am I just looking in the wrong place?

Also, it seems that most of the Chevy Ray stuff that people raved about is no longer available.

Basically I am just looking for some sort of reliable resource that can spell out what I need to do so that I can learn properly from it and apply it to my own projects. I'm getting pretty frustrated at this point because I have searched high and low on Google and I am continually met with disappointment.
Logged
Ashkin
Level 10
*****



View Profile
« Reply #409 on: March 20, 2012, 09:11:02 PM »

It's actually really simple. You know how to generate Perlin noise, right?
Just make the width of the noise equal to the width of the heightmap and the height of the noise one. Then, loop through all of the pixels in the noise, assigning the value of each pixel to the corresponding tile along the map. This should give you some smooth, rolling hills- though you might have to modify the values you get a little to smoothen them out.
Logged
TJChap2840
Level 0
*


View Profile
« Reply #410 on: March 21, 2012, 06:31:40 AM »

It's actually really simple. You know how to generate Perlin noise, right?
Just make the width of the noise equal to the width of the heightmap and the height of the noise one. Then, loop through all of the pixels in the noise, assigning the value of each pixel to the corresponding tile along the map. This should give you some smooth, rolling hills- though you might have to modify the values you get a little to smoothen them out.

I do to a certain extent. My problem with Perlin noise(and others) is that a majority of the people using source code to explain it don't know how it truly works, and the ones that do, can't create clean code to save their lives.

Thanks for the tip though. In my head, I knew it would be exactly that, but being so fed up with the internet while reading endless pages of [basically] useless info really kills my motivation.
Logged
baconman
Level 10
*****


Design Guru


View Profile Email
« Reply #411 on: March 21, 2012, 06:58:08 AM »

Perlin Noise produces a binary output, based on checking neighboring tiles or objects. My level chunker code uses that by checking for collisions:

+1 for Up
+2 for Left
+4 for Right
+8 for Down

Some more sophisticated PN also check diagonals, but you see how the binary progression works? It takes that and then determines the output (here, 0-15) and produces a result that corresponds with it. It's often used for auto-tiling, but it has other applications as well.

If I read correctly, Ashkin's suggesting you base heightmap relativity on the outcome here. And assuming you *want* smooth, flowing hills, it'll work. The only flaw with that I see is that sometimes terrain is *supposed* to have big, untraversable dropoffs, it's what keeps that sort of thing exciting. Just not inescapable holes as a result of it...

What kind of project are you creating this terrain for?
____________________

And actually, I've been watching Malevolence rather closely. Wink That's cool stuff they're building there.
Logged

TJChap2840
Level 0
*


View Profile
« Reply #412 on: March 21, 2012, 07:06:08 AM »

Perlin Noise produces a binary output, based on checking neighboring tiles or objects. My level chunker code uses that by checking for collisions:

+1 for Up
+2 for Left
+4 for Right
+8 for Down

Some more sophisticated PN also check diagonals, but you see how the binary progression works? It takes that and then determines the output (here, 0-15) and produces a result that corresponds with it. It's often used for auto-tiling, but it has other applications as well.

If I read correctly, Ashkin's suggesting you base heightmap relativity on the outcome here. And assuming you *want* smooth, flowing hills, it'll work. The only flaw with that I see is that sometimes terrain is *supposed* to have big, untraversable dropoffs, it's what keeps that sort of thing exciting. Just not inescapable holes as a result of it...

What kind of project are you creating this terrain for?
____________________

And actually, I've been watching Malevolence rather closely. Wink That's cool stuff they're building there.

I don't really have an idea for what the game will be like. I just know that I want a "random" map every time and "random" underground area. It will also be top-down isometric.

The project will be more of a learning project that I want to just keep extending on when I feel like there is something I want to learn, and right now, I want to learn procedural generation. Tongue
Logged
baconman
Level 10
*****


Design Guru


View Profile Email
« Reply #413 on: March 21, 2012, 08:36:56 AM »

Well, I don't get super into isometric usually, but IIRC, the only difference is that the 2D grid (which remains the same) is represented by graphics turned 45 degrees to the right, so it essentially works the same way. But it's a good start, at least I know you aren't going for a PGC platformer, which can help with the design a lot.

I would suggest you vary the tiles between 3 or maybe 4 different heightmapping variables, shape them according to their relativity (IE: can go +/- 1 "height" variable); and then vary their shading according to what they can't connect with (depending on what's higher).

Personally, I think isometric with variable heightmapping sounds kind of intimidating; but if you have previous experience with isometric perspectives, that will go a long ways.
Logged

thatshelby
Level 10
*****



View Profile WWW
« Reply #414 on: March 21, 2012, 09:11:00 AM »

The easiest way to do isometric with generated heightmaps, i think, would be a 3D game with an isometric projection.
Logged
TJChap2840
Level 0
*


View Profile
« Reply #415 on: March 21, 2012, 11:54:27 AM »

I guess I should clarify what I mean by isometric. It's as isometric as Gameboy games (re: Pokemon, Zelda, etc) are. I don't like to think of it as isometric, but I know some people consider it that.

It will probably end up being in the same graphical style because I don't really want to do anything toooo advanced on the graphics side, but I'd like a nice challenge.
Logged
baconman
Level 10
*****


Design Guru


View Profile Email
« Reply #416 on: March 21, 2012, 04:34:22 PM »

XD Ohhh, that's 3/4 (or bird's eye) view. "Isometric" is where it looks diagonally aligned, like Diablo:

Logged

st33d
Guest
« Reply #417 on: March 22, 2012, 02:16:06 AM »

Dammit. Now I want to play Diablo 2 again.  WTF
Logged
Xardov
Level 1
*


Game Developer


View Profile WWW Email
« Reply #418 on: April 04, 2012, 05:10:13 PM »

Links are dead. Sad
Logged

Beer!  Blog / Twitter / Google+  Beer!
David Pittman
Level 2
**


caffeine?? NO!!


View Profile WWW Email
« Reply #419 on: June 29, 2012, 08:02:42 PM »

Last Sunday, I wrote a post on procedural terrain generation for my action Roguelike game. http://www.dphrygian.com/wordpress/?p=9

It's similar to the approach described in this article from earlier in the procgen thread (http://accidentalnoise.sourceforge.net/minecraftworlds.html) but I hope the way I'm combining Boolean masks to generate buildings might be interesting to someone. It's quite different from the usual dungeon generators because of being constrained to a single pass.

Shortly after writing the post, I updated the procgen graph to use cellular (Worley/Voronoi) noise to create regularly spaced streets at odd angles.

Logged

Games: Davy - SecOrd - TKtics - GRO - Cutie - CC1984 - SV
Pages: 1 ... 26 27 [28] 29 30
Print
Jump to:  

Theme orange-lt created by panic