[Game] Fractured [0.01] [WIP]

User avatar
12Me21
Member
 
Posts: 873
Joined: Tue Mar 05, 2013 00:36
Location: (Ignore all of my posts before 2018)
GitHub: 12Me21

Re: [Game] Fractured [0.01] [WIP]

by 12Me21 » Thu Mar 05, 2015 00:39

There should be some lava near the split (larger amount of lava caves than usual, and higher up), to make it riskier to mine there
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Thu Mar 05, 2015 01:03

jojoa1997 wrote:it is WAY bigger than what I was thinking.

I wanted it to be big enough to fall across the fracture.

WHICH brings up a point on why I might want to still do this procedurally. With current code, the server admin (or single player) can pick the fractures width, and the tower can be automatically adjusted to match. Using schematics, that might be more difficult. But not impossible. I could generate a bunch of different sized levels for the tower as schematics, and then put them together procedurally depending on the width of the fracture. Hmmm, interesting.

jojoa1997 wrote:Once this headache is fixed I wanted to start working on biomes a bit. Where you thinking of any specific biomes?

I've got a question on that. With the new biome api, can biomes be made compatible with both mapgen v7 and mapgen v5?

Biomes in the east should be more normal, pastoral, tame. fields, prairies and wooded lands, pine covered mountains, probably snow biomes. With deserts probably existing, but rare.
Biomes in the west should be ruined, wild, or odd. Lava biomes, burnt, desert, dry dirt, clay, but also various kinds of jungles, and odd things like mushroom, something like ethereal's crystal biome, that kind of thing.

I'm really open to lots of ideas on biomes. I don't see any disadvantage to having LOTS of different kinds of biomes, and making some of them very rare.

12Me21 wrote:There should be some lava near the split (larger amount of lava caves than usual, and higher up), to make it riskier to mine there

I completely agree.
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
Location: Hawaii
GitHub: HeroOfTheWinds
IRC: WindHero

Re: [Game] Fractured [0.01] [WIP]

by HeroOfTheWinds » Thu Mar 05, 2015 03:15

Kilarin wrote:
HeroOfTheWinds wrote:I can easily write the code in about 10 minutes, too.

that would be greatly appreciated.
IF you had time to EXPLAIN how the perlin noise code works, that would be even better. But I know that may be too much time. :)
Octaves, persists, spread, scale?


This post is how I learned much about perlin noise:
viewtopic.php?f=9&t=9439#p143874

To summarize a few unmentioned points:
perlin noise generates a 2D or 3D "map" of values, between the ranges determined by octaves and persist. (See above post.) By checking these values at each coordinate, one is able to do special operations when it is within a certain range of values. So, for example, if you want to hollow out random areas in a contiguous way, you can check when it's at one or both ends of the spectrum:
Code: Select all
if nvals_myperlin[index_x_y_z] > 0.8 then
     data[vi] = c_air
end

Note that you need to use get_perlin_map() and assign it to a variable first to reference it this way. Look at the fracrift code for how to define perlin.

scale determines how large areas of a particular value are going to be. A relatively small scale means that values will shift rapidly over short distances, while a huge scale could end up having tens or hundreds of nodes in a row with the same perlin value. You can also "stretch" or "squish" certain axes of the scale to make the noise seem more stretched in some direction or another. (imagine a cumulus cloud compared to a stratus cloud). Really, noise is a lot like clouds...

A lot more can just be found by experimenting. The most frustrating part of mapgen development is spending hours tweaking perlin noise parameters and test conditions until you get the result "just right".

I see your point about dynamically scaling the tower... don't do schematics then. It's more trouble than it's worth, and someone will always push it past the point where you stopped making bigger schems. (They have size limits too...)
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Thu Mar 05, 2015 03:22

Thank you VERY much Hero, that should help!

Wow, the ruination code is pretty simple! this should be great.

Now, I have realized I need to do something odd. It would help if I knew the ground level on both sides of the canyon before building ruined tower. But the fracture can be very wide, and almost certainly is not all loaded in one chunk.

Is there any way I can force a series of chunks to load along a specific axis, and then AFTER they are loaded, determine the ground level and build my structure?

If that is too complicated, I can do it simpler, but if I know the ground level on both sides, I could actually construct the tower so that is is leaning from one side to the other, which I think might be cool.

Again, thank you everyone for all of your help! I couldn't be getting anywhere on this project without the assistance.
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
Location: Hawaii
GitHub: HeroOfTheWinds
IRC: WindHero

Re: [Game] Fractured [0.01] [WIP]

by HeroOfTheWinds » Thu Mar 05, 2015 03:56

No problem.

Hmm... That is a problem I wish I could say "yes" to, but sadly, no, you can't force gen chunks. Besides, it is a headache to make slanting structures in mapgen. Since you're only using 2 axes, it isn't a problem, but with 3, the math involved is crazy. In any case, your best alternative is to merely simulate the tower being buried in the ground on either side. You can also tell it not to overwrite non-air nodes. Alternately, make a crater around each end, to simulate the impact of the fall. :3

Also, I may have a more effective algorithm for ore thinning that keeps it much thinner up to a point, then grows quickly before capping out at a maximum (100%). However, I need to know how far you think people should travel before ore starts becoming abundant. if you want it, let me know.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Thu Mar 05, 2015 05:23

HeroOftheWinds wrote:That is a problem I wish I could say "yes" to, but sadly, no, you can't force gen chunks.

Oh well.

HeroOfTheWinds wrote:, but with 3, the math involved is crazy.

Actually, for this particular problem I thought I had figured out a very simple solution. but no need to work on it if I can't preload the ground level. So, back to simple. :)

HeroOfTheWinds wrote: I may have a more effective algorithm for ore thinning that keeps it much thinner up to a point, then grows quickly before capping out at a maximum (100%). However, I need to know how far you think people should travel before ore starts becoming abundant. if you want it, let me know.

I was using a simple linear distribution, and I suspect that a linear distribution will turn out best in play testing, but only suspect it. a non-linear distribution is certainly worth trying, so pass it on and we'll see what it looks like!

OreThinning could always have multiple options available and let the player/server admin pick. Choice is GOOD. :)
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
Location: Hawaii
GitHub: HeroOfTheWinds
IRC: WindHero

Re: [Game] Fractured [0.01] [WIP]

by HeroOfTheWinds » Thu Mar 05, 2015 06:47

Alright, I made a pull request, and explained the code both there and inside the file. Basically, it's a distribution using the natural exponential function, making a nice smooth curve that keeps ore thin by the world's center but quickly populates more after a certain point. Makes it a lot easier to tell that thinning is going on.

I also took paramat's advice and moved it back to incrementing vi rather than calculating area:index on every pass.
You mentioned the water border problem, so I patched that too.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Thu Mar 05, 2015 15:21

HeroOfTheWinds wrote:I also took paramat's advice and moved it back to incrementing vi rather than calculating area:index on every pass.

We can use every small increment in speed we can get. thank you.

HeroOfTheWinds wrote:You mentioned the water border problem, so I patched that too.

It was kinda pretty, but unless they fix the water bug, I guess we need to keep the leaks out. so thank you again!

HeroOfTheWinds wrote:it's a distribution using the natural exponential function, making a nice smooth curve that keeps ore thin by the world's center but quickly populates more after a certain point.

Which is too fast for my taste, ore distribution is near maximum at about 2000 nodes out from spawn. BUT, I can see where other people might really prefer a faster increase. So what I've done is turned the ore thinning adjustment into a function. For right now there is my linear function and your exponential function, but we can add more if people come up with other algorithms they like. The player or server admin just selects the function they want in the init.lua:

Code: Select all
--thins linearly over the whole range to maxdist
function orethin_adj_linear(dist)
  return dist/orethin_maxdist
  end
 
--algorithm by HeroOfTheWinds that heavily thins for the
--first 1000 nodes before rapidly becoming abundant.
function orethin_adj_exponental(dist)
  return (orethin_maxdist/(1+(orethin_maxdist-1)* math.exp(-.0075*dist))) / orethin_maxdist
  end   
         
--chose the algorithm for ore thinning (comment out all others)
local orethin_adj_algorithm=orethin_adj_linear
--local orethin_adj_algorithm=orethin_adj_exponental


And so again, thank you very much!

New code is available in github...
https://github.com/Kilarin/fractured/archive/master.zip
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Sun Mar 08, 2015 21:50

world stone tower is NOT ready, by any means. but I committed my work so far because I could probably use some help fine-tuning the perlin noise damage.
https://github.com/Kilarin/fractured

some pics:
Image
Image
Image

I'm hoping for results more like the first and 3rd, damaged but intact. but still getting occasional results like pic #2, where huge swaths of the tower are missing. That may be an inevitable result of using random noise, and it may not really be a problem.
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Sun Mar 08, 2015 23:01

perhaps an improvement in the noise?
Image
Image

and here is an example of how to FAIL at setting your perlin noise. :)
Image
 

User avatar
paramat
Developer
 
Posts: 3357
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: [Game] Fractured [0.01] [WIP]

by paramat » Sun Mar 08, 2015 23:32

I was about to post, your tower damage noise needs a much smaller 'spread', the spread is the rough size of the largest holes. if you want the holes to be elongated along the x direction then the spread x value should be larger than the y, z values, or the opposite for holes squashed in the x direction. I would start with all 3 values equal.
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Mon Mar 09, 2015 00:14

paramat wrote:your tower damage noise needs a much smaller 'spread',

Then I was working in the right direction! right now I'm using:
Code: Select all
-- 3D noise for tower damage
local np_dmg = {
   offset = 0,
   scale = 1,
        spread = {x=15, y=5, z=5},
   seed = 133742, --a LEET answer to life, the universe, and everything
   octaves = 3,
   persist = 0.67
}
local wst_dmg_lvl=0.7


which gives the elongated holes/cracks seen above. wst_dmg_lvl determines at what level the algorithm places air (damage) instead of the proper wall/floor material. More improvements probably still needed.

Question on the seed, if I'm using the same seed every time, why am I not getting the same noise every time? Should I seed it with the world's seed?

Eventually I need to add a transitional material, some kind of damaged node that would appear around the edges of the holes/cracks. And, of course, I need to be generating the remains of stairs and stairways... lots of work to be done, but thanks to all of your help its coming along!
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
Location: Hawaii
GitHub: HeroOfTheWinds
IRC: WindHero

Re: [Game] Fractured [0.01] [WIP]

by HeroOfTheWinds » Mon Mar 09, 2015 01:34

The reason you aren't getting the same noise every time is because the seed gets "added" to the world's seed. Hence, it will be the same if you keep BOTH seeds the same, but changing one affects the other.

I'm trying to toy with a few ideas... One thing I noticed is that your tower size isn't directly related to the gap's width. Consider making the gap width in fracrift global, then referencing it from worldstonetower.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

User avatar
paramat
Developer
 
Posts: 3357
Joined: Sun Oct 28, 2012 00:05
Location: UK
GitHub: paramat
IRC: paramat

Re: [Game] Fractured [0.01] [WIP]

by paramat » Mon Mar 09, 2015 01:52

Yeah most seeds in MT are actually 'seeddiffs' added to the world seed.

Code: Select all
if math.abs(nvals_dmg[nixyz]) > wst_dmg_lvl then
    data[vi] = c_air
elseif math.abs(nvals_dmg[nixyz]) > wst_trans_lvl then
    data[vi] = wst_material_wall_trans
else
    data[vi] = wst_material_wall
end

Where wst_trans_lvl is a little lower than wst_dmg_lvl. Perhaps around 0.5 to 0.6.
Ideally you should have c_ before any node name to show they are content ids.
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Mon Mar 09, 2015 02:39

HeroOfTheWinds wrote:I'm trying to toy with a few ideas

Ideas MOST welcome!

HeroOfTheWinds wrote: Consider making the gap width in fracrift global,

Oh, absolutely! Just hadn't stopped to do that until I figured out better how to actually MAKE the tower.

paramat wrote:Ideally you should have c_ before any node name to show they are content ids.

that makes sense, gotta learn the standards. :)

Thank you both very much for th education!
 

User avatar
HeroOfTheWinds
Member
 
Posts: 470
Joined: Wed Apr 23, 2014 23:16
Location: Hawaii
GitHub: HeroOfTheWinds
IRC: WindHero

Re: [Game] Fractured [0.01] [WIP]

by HeroOfTheWinds » Mon Mar 09, 2015 03:33

I just made a commit (and pull request) that automatically scales the tower based on the fracture's width, as set in facturerift's init.lua. Here's an example of how it looks with width set to 180:

Image

I also cleaned up some of the content references to use the c_ prefix.
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Mon Mar 09, 2015 12:13

Merged. And thank you all again so very much for the help and the education! I'm learning a LOT!
 

User avatar
12Me21
Member
 
Posts: 873
Joined: Tue Mar 05, 2013 00:36
Location: (Ignore all of my posts before 2018)
GitHub: 12Me21

Re: [Game] Fractured [0.01] [WIP]

by 12Me21 » Mon Mar 09, 2015 12:28

Why is the tower sideways? If it fell, then why is the base on one side of the fracture?
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Mon Mar 09, 2015 13:14

12Me21 wrote:Why is the tower sideways?

Because it fell!

If it fell, then why is the base on one side of the fracture?

Because if it had fallen INTO the fracture, which is bottomless, it would be pretty useless. So I went with the rather less probably idea that it was knocked to one side when the world split.

I am considering moving it down so that it will look like it was stuck part way down and angled up, to the other side. but that will:
a: be less useful for people wanting to get across
b: quite probably will look funny since trying to build cylinders on an angle is possible, but funky in a voxel based world.

but, despite those issues, I'll probably be trying it sometime in the future here.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

Re: [Game] Fractured [0.01] [WIP]

by jojoa1997 » Mon Mar 09, 2015 14:25

What about simulating an explosion like TNT but way bigger. Side problems could be solved that way.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
12Me21
Member
 
Posts: 873
Joined: Tue Mar 05, 2013 00:36
Location: (Ignore all of my posts before 2018)
GitHub: 12Me21

Re: [Game] Fractured [0.01] [WIP]

by 12Me21 » Mon Mar 09, 2015 15:35

Kilarin wrote:
12Me21 wrote:Why is the tower sideways?

Because it fell!

If it fell, then why is the base on one side of the fracture?

Because if it had fallen INTO the fracture, which is bottomless, it would be pretty useless. So I went with the rather less probably idea that it was knocked to one side when the world split.

I am considering moving it down so that it will look like it was stuck part way down and angled up, to the other side. but that will:
a: be less useful for people wanting to get across
b: quite probably will look funny since trying to build cylinders on an angle is possible, but funky in a voxel based world.

but, despite those issues, I'll probably be trying it sometime in the future here.


Maybe make the bottom part of the tower (inside the fracture) still standing, and have small pieces of the rest scattered around the blast area, like it was destroyed in an explosion.
 

Baggypants
Member
 
Posts: 30
Joined: Mon Aug 25, 2014 17:42
GitHub: Baggypants

Re: [Game] Fractured [0.01] [WIP]

by Baggypants » Mon Mar 09, 2015 16:41

Kilarin wrote:
12Me21 wrote:Why is the tower sideways?

Because it fell!

If it fell, then why is the base on one side of the fracture?

Because if it had fallen INTO the fracture, which is bottomless, it would be pretty useless. So I went with the rather less probably idea that it was knocked to one side when the world split.

I am considering moving it down so that it will look like it was stuck part way down and angled up, to the other side. but that will:
a: be less useful for people wanting to get across
b: quite probably will look funny since trying to build cylinders on an angle is possible, but funky in a voxel based world.

but, despite those issues, I'll probably be trying it sometime in the future here.

Nah, easier to change the story, make the world stone fall out of a window and cause the fracture next the tower causing it to topple. Princesses are always mooning about on balconies anyway.
 

Kilarin
Member
 
Posts: 746
Joined: Mon Mar 10, 2014 00:36

Re: [Game] Fractured [0.01] [WIP]

by Kilarin » Tue Mar 10, 2015 13:06

Thank you 12ME21 and Baggypants. Some interesting suggestions which I will consider!

Slowly but surely making progress.
https://github.com/Kilarin/fractured/archive/master.zip

New version committed with the following changes:
BlastRadius changed, now levels down to 0 and gradualy steps up or down to meet environment. The result is a much more crater like blast area.

Image

Areas by shadowninja and markers by Sokomine added.
https://forum.minetest.net/viewtopic.php?id=7239
https://forum.minetest.net/viewtopic.php?f=11&t=8175

AND, areas will not protect in west! Turned out to be SUPER easy to change that. Unlike no pvp in west, that is HARD. But, there is hope. The roadmap for Mintest version 0.5 includes a way to detect who punched something, I have high hopes for that.


I like the markers mod, but have some changes in mind for it. I want players to be able just mark two corners of an area. And I don't want players to have to put the markers in an exact rectangle. The mod should create an exact rectangle out of the extremes from the markers placed.

I also added my mods: compassgps, bridgetool, explorertoolsall. I will be adding a LOT more mods than this later, of course, just stuck those in because I know I want them and they were handy. :)
https://forum.minetest.net/viewtopic.php?f=11&t=9373
https://forum.minetest.net/viewtopic.php?f=11&t=9126
https://forum.minetest.net/viewtopic.php?f=11&t=9050

I'm experiancing some VERY slow map generation times. Going to have to work on code efficency.

Code: Select all
[fracrift_ure_gen] chunk minp (-32 48 128)
[fracrift_ure_gen] 1290 ms
[wst_gen] chunk minp (-32 48 128)
[wst_gen] 1189 ms
[newspawn_gen] chunk minp (-32 128 48)
[newspawn_gen] 185 ms
[blast_gen] chunk minp (-32 128 48)
[blast_gen] 208 ms
[wst_gen] chunk minp (-32 128 48)
[wst_gen] 1037 ms
[blast_gen] chunk minp (-32 128 -112)
[blast_gen] 277 ms
 

User avatar
12Me21
Member
 
Posts: 873
Joined: Tue Mar 05, 2013 00:36
Location: (Ignore all of my posts before 2018)
GitHub: 12Me21

Re: [Game] Fractured [0.01] [WIP]

by 12Me21 » Tue Mar 10, 2015 13:52

Be careful with the markers mod. If you place all 4 markers in on top of each other, it will crash the game. It might have the same problem, with 2 markers, but then it would be easier to do.
 

User avatar
Krock
Developer
 
Posts: 4246
Joined: Thu Oct 03, 2013 07:48
Location: Switzerland
GitHub: SmallJoker

Re: [Game] Fractured [0.01] [WIP]

by Krock » Tue Mar 10, 2015 20:04

The result of those complex structures is mostly a longer generation time but it makes the world amazing.
>> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

PreviousNext

Return to WIP Games



Who is online

Users browsing this forum: No registered users and 1 guest

cron