[Game] Fractured [0.01] [WIP]

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

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

by Kilarin » Tue Mar 03, 2015 13:26

12Me21 wrote:It would be cool if the land on the west looked different, like if it had more caves, more rugged terrain, maybe darker somehow

firefox wrote:the diffent landscapes could be made by defining a different set of biomes for both sides

definitely in the plans.
 

User avatar
12Me21
Member
 
Posts: 826
Joined: Tue Mar 05, 2013 00:36

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

by 12Me21 » Tue Mar 03, 2015 16:16

It should generate destroyed buildings near the blast area, and inside there could be some stuff in chests, like random metals, magic items, etc. And on the west, there could be monsters that spawn in the houses.
 

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

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

by Kilarin » Tue Mar 03, 2015 16:45

12Me21 wrote:It should generate destroyed buildings near the blast area, and inside there could be some stuff in chests, like random metals, magic items, etc. And on the west, there could be monsters that spawn in the houses.

Yes, ruins are an important part of the plan. I hope to link some quests to them. AND monsters, of course. Most people were killed in the blast, or worse...
 

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

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

by jojoa1997 » Tue Mar 03, 2015 17:05

Do you know how to set the static spawn. I want to mess around with a spawn mod that I would add but the api docs have me lost. Minetest. Set_setting("static spawn", {x=0, y=1,z=0}) doesn't work. Also I typed this from memory so it is probs wrong but I copied and pasyted in the code.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

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

by rubenwardy » Tue Mar 03, 2015 18:28

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.setting_set("static_spawnpoint", "0, 1, 0")


lua_api.html for setting_set
minetest.conf.example line 342
 

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

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

by jojoa1997 » Tue Mar 03, 2015 21:00

rubenwardy wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
minetest.setting_set("static_spawnpoint", "0, 1, 0")


lua_api.html for setting_set
minetest.conf.example line 342

Ah I see thanks.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

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

by Kilarin » Tue Mar 03, 2015 23:11

jojoa1997 wrote:I want to mess around with a spawn mod that I would add

So, what are you thinking of? I didn't know there was a way to set the spawn from a mod. That brings up a very interesting possibility. my newspawn mod has some serious drawbacks. A BIG improvement would a mod that allows you to specify an area, and it searches for the surface, builds a usable spawn there, then sets the spawn in a file so it can be reset each time the game (or server) starts. hmmmm.
 

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

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

by jojoa1997 » Wed Mar 04, 2015 00:50

Kilarin wrote:
jojoa1997 wrote:I want to mess around with a spawn mod that I would add

So, what are you thinking of? I didn't know there was a way to set the spawn from a mod. That brings up a very interesting possibility. my newspawn mod has some serious drawbacks. A BIG improvement would a mod that allows you to specify an area, and it searches for the surface, builds a usable spawn there, then sets the spawn in a file so it can be reset each time the game (or server) starts. hmmmm.

I was thinking of creating a tower in the middle of the fissure. The only problem was i couldn't change the spawn. Now maybe having a 200 block wide fissure would be great. Also there is the possibility of having a spawn town in the east.
Edit: I have made the player spawn on an obsidian block at 0,0,0 https://github.com/Kilarin/fractured/pull/2
also as i was falling i noticed a lot of good ore along the side of the fracture. I think the ore needs to be near to nill at the fracture because 1)atm it is easy access to diamonds and I even found an esem ore and 2)It would make the players want to spread out more.
Edit2: I added more to the pull request. I made the ore a better scarcity where the spawn isnt overwhelmed by all the exposed ore and also changed the rift size to 115 because 150 was too large after more testing. Also This picture is what could be just a temp spawn bridge so you can cross in survival. Also I think all trees within the blast radius should be removed.
Image
Attachments
screenshot_23521070.png
screenshot_23521070.png (713.12 KiB) Viewed 3960 times
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

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

by HeroOfTheWinds » Wed Mar 04, 2015 06:18

You might find my Apollo Module spawn point generator in Moontest useful as an example for what you are trying. It's not perfect, but it gets the job done. At least it'll give you an idea of how it's done.
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
 

Dartmouth
Member
 
Posts: 121
Joined: Sat Dec 06, 2014 14:39
IRC: pilino1234

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

by Dartmouth » Wed Mar 04, 2015 17:00

The newspawn mod should find a spawn point after the rift has been generated. I was playing around with this game yesterday and on spawning I started falling down the rift because the modified worldgen removed the node I spawned on :P
 

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

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

by jojoa1997 » Wed Mar 04, 2015 17:08

Dartmouth wrote:The newspawn mod should find a spawn point after the rift has been generated. I was playing around with this game yesterday and on spawning I started falling down the rift because the modified worldgen removed the node I spawned on :P

Take a look at the changes I made in the newspawn mod. This creates the spawn and kinda fixes the falling problem. https://github.com/Kilarin/fractured/pull/2
Though the problem I found is that the player enters the world, it is generated and any changes take too long.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

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

by Kilarin » Wed Mar 04, 2015 17:15

I've implemented jojoa1997's idea of setting the static spawn point from within newspawn. this eliminates the risk of newspawn and minetest.conf being out of sync. A great improvement.

For right now I'm leaving the default canyon width at 80, a little easier to see across, but its easy for anyone to change, and I may consider widening it in the future.

I prefer to have the spawn point in the east, so I'm not going to use the section that puts a player spawning at 0,0, BUT, I do intend to add a structure going across the fracture at that point, so jojoa's pull was headed in the same direction I am, but I'm not quite there yet. Will get there soon.

One note here though, in testing, I thought the on_generated function for the obsidian block in jojoa's code resulted in some strange behavior. It meant you could destroy the block, and it would remain gone, until you went into new territory, then it would be regenerated. I think I will need to build the fallen tower out of something invulnerable instead of having it regenerate like that. BUT, I wouldn't have learned that without watching how this code behaved, so again, thank you jojoa1997!

Dartmouth wrote:The newspawn mod should find a spawn point after the rift has been generated

I agree. I've temporarily reduced this problem by moving the default spawn point further east. Once jojoa1997 showed me that I could set the spawn point from within newspawn I realized that newspawn needs to be modified to find a good spawn point based on what was generated, build it out a bit perhaps, (eventually with ruins), and set the static spawn to that new point.

HeroOfTheWinds wrote:You might find my Apollo Module spawn point generator in Moontest useful as an example for what you are trying

Will look, thank you very much. I don't think its EVER going to be perfect, just need it closer than what I've got. :)

I am REALLY stumped on the pvp code.
Tenplus1 suggested that I add automatic healing based on area, similar to the 3darmor code. Which would work, BUT, I don't see how to determine where the damage came from, so that would turn off ALL damage in the east. No falling damage, no starvation, no suffocation, no mob attacks at all. I want to turn off player damage, not ALL damage in the east.
My son suggested going at it from the other direction, trying to disable punching another player. I'm looking to see if that is possible.
Any suggestions on solving the pvp problem are MOST welcome. I HOPE I can do it through lua and don't have to try and dig into the c code to add a new option to the API. :)
 

TeTpaAka
Member
 
Posts: 131
Joined: Sat Dec 28, 2013 21:54

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

by TeTpaAka » Wed Mar 04, 2015 18:46

Looking forward to this.
 

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

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

by jojoa1997 » Wed Mar 04, 2015 20:42

Kilarin wrote:One note here though, in testing, I thought the on_generated function for the obsidian block in jojoa's code resulted in some strange behavior. It meant you could destroy the block, and it would remain gone, until you went into new territory, then it would be regenerated. I think I will need to build the fallen tower out of something invulnerable instead of having it regenerate like that. BUT, I wouldn't have learned that without watching how this code behaved, so again, thank you jojoa1997!

Yes. I was thinking that structures spawned in the rift needed to be indestructible. The reason i used obsidian was because to me it seems like the hardest block and also I was too lazy to write a test node for that. Also about having a way to tell direction(directional signpost at spawn) would help a lot. I had to use the ores to see the difference.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

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

by Kilarin » Wed Mar 04, 2015 21:27

jojoa1997 wrote:Yes. I was thinking that structures spawned in the rift needed to be indestructible.

At least some of them.

jojoa1997 wrote:Also about having a way to tell direction(directional signpost at spawn) would help a lot. I had to use the ores to see the difference.

Debug has a built in compass now, tells you not just your yaw, but whether you are going N, S, E, or W. I fully intend to implement compassgps in this world, of course.

jojoa1997 wrote:The reason i used obsidian was because to me it seems like the hardest block and also I was too lazy to write a test node for that.

Same reason I'm using it for my test world stone tower. :) Well, actually obsidian brick in this case, but still same reason.

Speaking of that tower, here is a "bridge" that was created from a series of bugs in my tower code. Doesn't look half bad for something made out of glitches. :)

Image
(also reveals that current fracture code is occasionally leaking water. :) Gotta look at that.

And here is the crashed tower with fewer bugs. (the torches were placed by hand)
Image
Image
Image
Code just generates a cylinder out of specified material with specified radius and length at specified location.
LONG way to go, but it is a cylinder, that is something. :)

Needs to find the edge of the fracture and base its y coord off of that, and needs to be more of a crashed tower and less of a perfect cylinder. broken parts, missing chunks, windows, internal floors, steps, decorations, etc.
 

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

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

by HeroOfTheWinds » Wed Mar 04, 2015 23:20

Lookin' good. :)

You might consider spawning the tower with a schematic. Build it separately, upright, then use WorldEdit to rotate it 90 degrees on the x-axis. Mine out some stuff to make it ruined, save the schem, then place it on_generated(). It's a bit more complicated than that, though.... Alternatively, do the really tough way, which I did for the Apollo module: generate it with LVM. But that's like advanced/expert level LVM code, so... I could write it if given a tower, however.

In the meantime, tapering the tower at one end isn't hard. Also, you can use perlin noise to randomly eat holes out of it. If you want me to code that, I could...
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: 649
Joined: Mon Mar 10, 2014 00:36

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

by Kilarin » Wed Mar 04, 2015 23:41

HeroOfTheWinds wrote:In the meantime, tapering the tower at one end isn't hard.

Oh man, I was already there, but I have been doing it procedurally. the HARD way.
Image
Image

tower tapering, floors generating, was trying to figure out how to put in doors and stairs and a roof, was going to ask you how to use perlin noise to improve my cracks and holes. And now I find out I could just build the whole thing.
I feel STUPID.

Can you point me to an example of how to put a "schematic" in? :)
 

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

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

by HeroOfTheWinds » Thu Mar 05, 2015 00:00

This is the ABM version, but it's not too much different to do the same within on_generated():
https://github.com/HeroOfTheWinds/minet ... r/abms.lua

However, you must choose carefully whether to call it before or after doing all your LVM stuff. If you do it before, the terrain will eat away parts of the structure where it intersects with the ground. (So the chasm generator would cut a swathe straight through the tower.) If you do it after, you can choose whether or not to overwrite already-existing nodes (That is the last bool in the function call). Note that schematics are placed by their corner, so you need to offset by half its length and by half its width, e.g. (pos={x=-10, y=-10, z=-30}) (Just change the numbers to it's radius for the first two and its height/2 for the third.) If you're calling this from a function outside fracrift, make it depend on fracrift, because then the rift will be generated before trying to place the schem.
Also, the parameter in quotes ("random") refers to rotation of the schem. "Random" is obvious, but use 0 unless you accidentally built it rotated the wrong way. It only accepts multiples of 90 from 0 to 270.

Also, consider the possibility of still letting perlin "ruin" the tower. Then, the ruins will look different for different map seeds! I can easily write the code in about 10 minutes, 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: 649
Joined: Mon Mar 10, 2014 00:36

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

by Kilarin » Thu Mar 05, 2015 00:23

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?
But I love the seed. :)
HeroOfTheWinds wrote: seed = 133742, --a LEET answer to life, the universe, and everything
 

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

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

by jojoa1997 » Thu Mar 05, 2015 00:36

Nice work on the tower. Though it is WAY bigger than what I was thinking. Good Job so far. Once this headache is fixed I wanted to start working on biomes a bit. Where you thinking of any specific biomes?
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
12Me21
Member
 
Posts: 826
Joined: Tue Mar 05, 2013 00:36

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: 649
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
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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 649
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
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: 649
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
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: 649
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:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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: 649
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: 649
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
 

PreviousNext

Return to WIP Subgames

Who is online

Users browsing this forum: No registered users and 26 guests

cron