Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Elentor
Dec 14, 2004

by Jeffrey of YOSPOS

Galaxander posted:

Sweet. I too had thought it was self-evident until I played Starbound haha.

I worked on this yesterday, figured you'd like it. So, to demonstrate the general gist of terrain gen, I wanted to produce some sand dunes.

There are many ways to create sand dunes. But the way we're going to create them is through getting a simple gradient, like this:



And performing operations on it to translate or offset that gradient. Again, there are many ways: One of my first demos involved doing very simple dunes by using a simple sine wave modified by a generic hash. It was two lines of code, in contrast with this.

If we take a horizontal noise like this one:



We can use it to modify the first gradient, like this:



Applying a threshold operation (If color > 0.5, air, otherwise terrain) should yield a terrain you're more familiar with. Even though this is a 2D cutout, these mountain shapes should look very much like stuff you've seen in 3D time and time again.



In fact, if we add more octaves to a noise, it should look like this:



If the noise is bidimensional, it should look like this instead, and will be used for 3D mountain heightmaps:



I'll leave to your imagination figuring out how it looks, but in general if you're thinking "3D mountains that look filled with spikes on the top" you're right.

So what do we do for dunes? Well, dunes have a direction: The wind is blowing forming a long slope, and as the particles falls off it creates the slip face. Now, I don't want to post any image without due permission, but a bunch of diagrams should be easy to see here:

https://www.google.com/search?q=dune+slip+face&source=lnms&tbm=isch

For effect, we're going for a very curvy look. So here's some graphics of how it should go






In order to prevent harsh breaks in the terrain, the dunes are pulled down a bit. The slip curves should naturally end up being slightly shorter because of that. The derivative map looks somewhat flat, kinda like this:



At this point the dune algorithm is effectively done.



We can add a vertical translation in the wind direction to make the wind slope longer and the slip face smaller. Also, since most dunes diagrams show wind from left to right, let's flip it and see how it looks:



Now since we still have the derivative map, we can do something pretty cool with it. It won't be as striking in the foreground (because lighting will occlude it) but it can be used to create some cool effects with background blocks. We take the derivative map, store it, and create a stretched noise like this one:







This gives us a very nice noise that can be used to create some shadowy effect on one of the sides of the dune.



This can all be prototyped pretty quickly in Unity with the current Noise Visualizer tool, which allows me to stack and perform these operations in real-time without having to recompile anything.



So, there are many optimizations and improvements that can be made, but you can see how this turned out:



Anyway that's it, sorry for the long post. Hope you enjoyed!

Adbot
ADBOT LOVES YOU

Magmarashi
May 20, 2009





Elentor posted:

I worked on this yesterday, figured you'd like it. So, to demonstrate the general gist of terrain gen, I wanted to produce some sand dunes.

There are many ways to create sand dunes. But the way we're going to create them is through getting a simple gradient, like this:



And performing operations on it to translate or offset that gradient. Again, there are many ways: One of my first demos involved doing very simple dunes by using a simple sine wave modified by a generic hash. It was two lines of code, in contrast with this.

If we take a horizontal noise like this one:



We can use it to modify the first gradient, like this:



Applying a threshold operation (If color > 0.5, air, otherwise terrain) should yield a terrain you're more familiar with. Even though this is a 2D cutout, these mountain shapes should look very much like stuff you've seen in 3D time and time again.



In fact, if we add more octaves to a noise, it should look like this:



If the noise is bidimensional, it should look like this instead, and will be used for 3D mountain heightmaps:



I'll leave to your imagination figuring out how it looks, but in general if you're thinking "3D mountains that look filled with spikes on the top" you're right.

So what do we do for dunes? Well, dunes have a direction: The wind is blowing forming a long slope, and as the particles falls off it creates the slip face. Now, I don't want to post any image without due permission, but a bunch of diagrams should be easy to see here:

https://www.google.com/search?q=dune+slip+face&source=lnms&tbm=isch

For effect, we're going for a very curvy look. So here's some graphics of how it should go






In order to prevent harsh breaks in the terrain, the dunes are pulled down a bit. The slip curves should naturally end up being slightly shorter because of that. The derivative map looks somewhat flat, kinda like this:



At this point the dune algorithm is effectively done.



We can add a vertical translation in the wind direction to make the wind slope longer and the slip face smaller. Also, since most dunes diagrams show wind from left to right, let's flip it and see how it looks:



Now since we still have the derivative map, we can do something pretty cool with it. It won't be as striking in the foreground (because lighting will occlude it) but it can be used to create some cool effects with background blocks. We take the derivative map, store it, and create a stretched noise like this one:







This gives us a very nice noise that can be used to create some shadowy effect on one of the sides of the dune.



This can all be prototyped pretty quickly in Unity with the current Noise Visualizer tool, which allows me to stack and perform these operations in real-time without having to recompile anything.



So, there are many optimizations and improvements that can be made, but you can see how this turned out:



Anyway that's it, sorry for the long post. Hope you enjoyed!

This is cool as gently caress more long posts please these details are always incredibly fascinating!

Zoig
Oct 31, 2010

ya know, the mild color variation was just something at first that i thought was kinda cool, but that desert is probably one of the best looking 2d deserts I have ever seen, even though it clearly needs a little smoothing out. I'm loving all these little neat details and that explanation was actually really easy to follow.

Galaxander
Aug 12, 2009

Fascinating post as always Elentor.

Nalesh
Jun 9, 2010

What did the grandma say to the frog?

Something racist, probably.
How well would the engine handle slope blocks?(1x1 and 2x1 probably?) I feel like that'd just perfect the sand dunes look

Rhopunzel
Jan 6, 2006

Stroll together, win together

Nalesh posted:

How well would the engine handle slope blocks?(1x1 and 2x1 probably?) I feel like that'd just perfect the sand dunes look

it can and will, they’re just planned at a later stage

Telum
Apr 17, 2013

I am protector of the innocent! I am the light in the darkness! I am truth! Ally to good! Nightmare to you!

Elentor posted:

Anyway that's it, sorry for the long post. Hope you enjoyed!

Don't apologize for these, they're wonderful!

Ichabod Tane
Oct 30, 2005

A most notable
coward, an infinite and endless liar, an hourly promise breaker, the owner of no one good quality.


https://youtu.be/_Ojd0BdtMBY?t=4
Hype about those proposed NPC / crew ideas! What's the spaceship component going to be like? Starbound style where it's a static thing that brings you to different areas or ... ?

Zet
Aug 3, 2010
That desert looks amazing! Love the explanation too

TaintedBalance
Dec 21, 2006

hope, n: desire accompanied by expectation of or belief in fulfilment

Rhopunzel posted:

Somewhere between Terraria and RimWorld. We're planning for NPCs to have unique design/item pools (so for instance one gunmaker NPC might have a range of really good assault rifles, but poor pistols and everything else, and so on), routines (eating, sleeping, entertainment), requirements (needing X facility/add-on to construct Y content). They'll also have your basic needs like happiness/hunger/etc. It won't be as complex as RimWorld's ultra deep personality system but it's what I'm striving for. I definitely want to avoid the glorified dollhouse behavior some other games do.

That sounds like a good balance to be aiming for, RimWorld in particular goes too far in certain simulation directions without giving you the tools to actually be able to deal with some of the nastier possibilities outside of just executing/banishing a colonist (never accept a pyro or an addict in the base game because they will just gently caress your run without mods as an example).

Related to different NPCs having different specializations, does this mean that ultimately the best gear is gonna come from NPCs? I find a common problem in games with these general design structures is that the best gear often ends up being drops, which means that investment is actually pointless and the best path forward is whatever lets you do runs as fast and safely as you can.

The other side of this problem is if crafted gear is the best, if you have unique NPCs, people are going to try and find out how to roll NPCs as fast as possible and only recruit the best ones outside of maybe a starting one to get things off the ground. The most obvious solution from my perspective is having a semi-randomized NPC structure with investment, that then requires more rare/interesting resources so that you are building a positive loop between exploration and investment.

I'm rambling a bit at this point, but I've seen more projects and features derailed by not properly asking and interrogating the question of "how does power work in this game?" than I'd like, and its the central question to how any gear based progression structure works. How deep are you all on this question so far? Seems like you're more concentrated on making the core action loop feel good, which I think is the correct thing to be doing, but the core progression loop has a nasty habit of coming up to bite you in the rear end if you aren't thinking about it constantly.

Mycroft Holmes
Mar 26, 2010

by Azathoth
wait, theres going to be biotech in this? can't wait to resident evil this up.

Rhopunzel
Jan 6, 2006

Stroll together, win together

Mycroft Holmes posted:

wait, theres going to be biotech in this? can't wait to resident evil this up.

Stuff like cybernetic and prosthetic limbs are planned. The sprite sheet actually has each limb isolated so you can replace whatever limb you want and it'll reflect visually.

I'm aiming for SS13 levels of fuckery - it's planned for them to need players to be operated on by either another player on an NPC to implant things. So if you wanted you could give your buddy two peg legs instead of cybernetic legs

CATTASTIC
Mar 31, 2010

¯\_(ツ)_/¯
Can I give my buddy a peg head?

Rhopunzel
Jan 6, 2006

Stroll together, win together

QUACKTASTIC posted:

Can I give my buddy a peg head?

I hadn't considered this but now I have a really funny image of having your guy's head dismembered and kept in a jar by another player, but the game's perspective stays with it until you respawn.

Probably wildly infeasible, but it's a funny idea.

The Lone Badger
Sep 24, 2007

Rhopunzel posted:

I hadn't considered this but now I have a really funny image of having your guy's head dismembered and kept in a jar by another player, but the game's perspective stays with it until you respawn.

Probably wildly infeasible, but it's a funny idea.

Can I do this and carry the head with me, defeat an alien warmech miniboss, then install the head?

E-Tank
Aug 4, 2011
Are you guys looking for QA testers? Or a writer? Sorry for the repeated question, it looked like you missed it.

Johnny Joestar
Oct 21, 2010

Don't shoot him?

...
...




being able to swap out limbs like in IVAN is a very exciting prospect

Rhopunzel
Jan 6, 2006

Stroll together, win together

E-Tank posted:

Are you guys looking for QA testers? Or a writer? Sorry for the repeated question, it looked like you missed it.

Sorry, didn't see!

We're accepting QA testers but there won't be a lot to test until later this year.

Writers I'm open to, but I'm looking for a very specific type of writing style, so I'd need to see examples.

Send me a PM and I can invite you to our discord for a chat.

E-Tank
Aug 4, 2011

Rhopunzel posted:

Sorry, didn't see!

We're accepting QA testers but there won't be a lot to test until later this year.

Writers I'm open to, but I'm looking for a very specific type of writing style, so I'd need to see examples.

Send me a PM and I can invite you to our discord for a chat.

I would, but I am poor and cannot buy PMs. Sorry. I could still provide samples here if you're interested?

Rhopunzel
Jan 6, 2006

Stroll together, win together

E-Tank posted:

I would, but I am poor and cannot buy PMs. Sorry. I could still provide samples here if you're interested?

Do you have a twitter or anything else I could DM you through?

Babe Magnet
Jun 2, 2008

I wanna swap out my hands with someone else's hands and then when I beat another person to death in multiplayer it says the first guy did it

E-Tank
Aug 4, 2011

Rhopunzel posted:

Do you have a twitter or anything else I could DM you through?

https://twitter.com/Edward_TankX

Rhopunzel
Jan 6, 2006

Stroll together, win together

Added! I'll shoot you a DM when you follow me back.

Elentor
Dec 14, 2004

by Jeffrey of YOSPOS
Thanks for the feedback re: my post, I'm glad you folks enjoy reading it.

Also, here's a blooper from the desert dunes. It should be identifiable what this piece of abstract art is :v:

Zereth
Jul 9, 2003



Elentor posted:

Thanks for the feedback re: my post, I'm glad you folks enjoy reading it.

Also, here's a blooper from the desert dunes. It should be identifiable what this piece of abstract art is :v:


... A neat cave system? I hope you saved whatever generated that for use elsewhere!

Elentor
Dec 14, 2004

by Jeffrey of YOSPOS

Zereth posted:

... A neat cave system? I hope you saved whatever generated that for use elsewhere!

This was the derivative map from the dunes over-distorted.




Before tuning down the whole thing got super stretched, generating that cool image.

Ichabod Tane
Oct 30, 2005

A most notable
coward, an infinite and endless liar, an hourly promise breaker, the owner of no one good quality.


https://youtu.be/_Ojd0BdtMBY?t=4

Elentor posted:

Thanks for the feedback re: my post, I'm glad you folks enjoy reading it.

Also, here's a blooper from the desert dunes. It should be identifiable what this piece of abstract art is :v:



Didn't expect Giygas from Earthbound in this game but pleasantly surprised.

Elentor
Dec 14, 2004

by Jeffrey of YOSPOS
"Not snow. Salt."



For those who always wanted their own Uyuni salt flats to mount their rebel base.








Also for those interested, I'm starting a new series about Noise here: https://forums.somethingawful.com/showthread.php?threadid=3830322&pagenumber=14#post497153588 - Feel free to check out!

Elentor fucked around with this message at 22:38 on Jul 31, 2019

OwlFancier
Aug 22, 2013

So does the sky light move around with the time of day?

If so that'd make for some neat visual effects with glass roofs.

Rhopunzel
Jan 6, 2006

Stroll together, win together

OwlFancier posted:

So does the sky light move around with the time of day?

If so that'd make for some neat visual effects with glass roofs.

No. It's not practical for a number of reasons.

OwlFancier
Aug 22, 2013

Ah so it shines down at that partial angle then?

Rhopunzel
Jan 6, 2006

Stroll together, win together

OwlFancier posted:

Ah so it shines down at that partial angle then?

As far as I know, it comes from directly above, but it "creeps" around apertures to create that effect so that everything isn't perfectly perpendicular.

Ichabod Tane
Oct 30, 2005

A most notable
coward, an infinite and endless liar, an hourly promise breaker, the owner of no one good quality.


https://youtu.be/_Ojd0BdtMBY?t=4
Any plans for other spacefaring cultures etc. Or is this more of a humans only universe and you're pushing the boundaries / frontiers?

(Hope this made sense)

Magmarashi
May 20, 2009





Rhopunzel posted:

Stuff like cybernetic and prosthetic limbs are planned. The sprite sheet actually has each limb isolated so you can replace whatever limb you want and it'll reflect visually.

I'm aiming for SS13 levels of fuckery - it's planned for them to need players to be operated on by either another player on an NPC to implant things. So if you wanted you could give your buddy two peg legs instead of cybernetic legs

turning your butt into a robot confirmed

Rhopunzel
Jan 6, 2006

Stroll together, win together

Glenn Quebec posted:

Any plans for other spacefaring cultures etc. Or is this more of a humans only universe and you're pushing the boundaries / frontiers?

(Hope this made sense)

Taken directly from the world bible:



Short answer: No, you're mostly alone.

Long answer: I'm not opposed to eventually introducing other cultures, but I feel like it's such a valuable opportunity for creativity and storytelling that it'd be a waste to squander it on unoriginal bullshit like monkey/bird/plant/fish people. I'd want to be a lot more careful and come up with something interesting that's compelling and fits the universe.

Zereth
Jul 9, 2003



What is the overall tech level of Earth origin stuff planned to be, anyway? If you wanted bird people are uplifted Earth animals within reach?

EDIT: For that matter would robots be possibly part of the "Earthling" culture?

OwlFancier
Aug 22, 2013

Rhopunzel posted:

As far as I know, it comes from directly above, but it "creeps" around apertures to create that effect so that everything isn't perfectly perpendicular.

Ah cool, that'd still make skylights very practical and mirrors light diffusion a bit. Neat!

Ichabod Tane
Oct 30, 2005

A most notable
coward, an infinite and endless liar, an hourly promise breaker, the owner of no one good quality.


https://youtu.be/_Ojd0BdtMBY?t=4

Rhopunzel posted:

Taken directly from the world bible:



Short answer: No, you're mostly alone.

Long answer: I'm not opposed to eventually introducing other cultures, but I feel like it's such a valuable opportunity for creativity and storytelling that it'd be a waste to squander it on unoriginal bullshit like monkey/bird/plant/fish people. I'd want to be a lot more careful and come up with something interesting that's compelling and fits the universe.

Great answer. Something being utterly, categorically Other is always more interesting than a human-but-a-carp bipedal.

Rhopunzel
Jan 6, 2006

Stroll together, win together

Zereth posted:

What is the overall tech level of Earth origin stuff planned to be, anyway? If you wanted bird people are uplifted Earth animals within reach?

EDIT: For that matter would robots be possibly part of the "Earthling" culture?

This one's a bit difficult to explain.

We're not really planning on tying the game's humans to "Earth" strictly, it'll mostly be left unexplained exactly who you are, but in the game's universe humanity is experiencing the equivalent of a Space Industrial Revolution. FTL has just been discovered but it's unstable, dangerous and not widely available. This leads to a huge explosion of humanity across the galaxy, so there'll be a wide cross section of cultures, but generally the cutting edge of human technology would be something akin to Caprica from Battlestar Galactica - basically what you'd imagine humanity being a few centuries from now - a bit more advanced than where we're at now, with space travel, but nothing approaching total mastery over technology.

Adbot
ADBOT LOVES YOU

Dandywalken
Feb 11, 2014

Hell yeah

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply