Page 1 of 1

working on DarkAge

PostPosted: Thu Sep 10, 2015 01:30
by blert2112
Ok, after changing DarkAge over to VoxelManip I was challenged by someone to attempt to convert it to register_ore. Here are some shots of what I have so far.

Original DarkAge generation...
Image

register_ore generation...
Image

Re: working on DarkAge

PostPosted: Thu Sep 10, 2015 01:32
by blert2112
Original DarkAge generation close up...
Image

register_ore generation close up...
Image

I tried to stay true to the original generation but it is difficult. I am going to continue tweaking it to see it I can get it closer. Notice in the last pic: You can see the bottom of a chunk in the distance. It is completely flat and I'm not really digging that. I think I can fix that but it is for tomorrow.
What do you think?

Re: working on DarkAge

PostPosted: Thu Sep 10, 2015 02:01
by Napiophelios
I think it looks great so far, but your right about the straight cutoff at the bottom;
needs to be more mixed up. The rest looks dead on. Is it faster this way?

Re: working on DarkAge

PostPosted: Thu Sep 10, 2015 02:12
by Don
I think an issue was submitted for sheet ore. It does not form the way it should. If you figure out how to make it generate nice please let us know how. Thanks

Re: working on DarkAge

PostPosted: Thu Sep 10, 2015 02:54
by Sokomine
The original version looks nicer. But - as this is some form of ore generation - that's not very important. The speed gain ought to be significant as you can skip reading and writing back voxelmanip data. Of course that process might already be so fast that it's hard to notice. But it does sum up if other mods do the same.

The distribution of the blocks in the version done by the engine looks a bit chaotic. It would be easier to mine the material if it where distributed more the way it was originally. Perhaps the engine can be changed? And: Thanks for trying! I'm sure the engine-based version will be good enough for most purposes. Even with that flat bottom. After all you're mining and hardly seeing the layers exposed in air in a normal playing environment.

Re: working on DarkAge

PostPosted: Thu Sep 10, 2015 22:25
by blert2112
I have to be honest... I am not really a big fan of the way the original generates. Since it is supposed to be a stratum layer, I feel that the clumps should be thinner (y) and larger (x,z). The original just seems unnatural to me. Anybody have any comments, one way or the other, on that?

I can't fix the flat bottoms. As far as I can see, register_ore sheet generation works just fine other than the bottoms being perfectly flat.

Image
Image

Re: working on DarkAge

PostPosted: Thu Sep 10, 2015 22:31
by blert2112
Holy crap! Could it be? The sheets are generating upside down.
Image
Think about it... Have you ever poured self-leveling concrete into a hole in the ground and then dug it up after it dried? The bottom will be rough and highly textured. The top will be relatively smooth and contoured. ... Much like you would expect from layers deposited on the Earth naturally?

Re: working on DarkAge

PostPosted: Thu Sep 10, 2015 23:58
by blert2112
More pics that show it is being generated upside-down...
Image
Image

Re: working on DarkAge

PostPosted: Fri Sep 11, 2015 00:02
by Don
Are you doing that with generate_ore?
I tried to get sheet to do that but couldn't.

Re: working on DarkAge

PostPosted: Fri Sep 11, 2015 00:12
by blert2112
Don wrote:Are you doing that with generate_ore?
I tried to get sheet to do that but couldn't.

yes

Re: working on DarkAge

PostPosted: Fri Sep 11, 2015 00:43
by blert2112
Or do you prefer this?...
Image
Image

Re: working on DarkAge

PostPosted: Fri Sep 11, 2015 01:19
by Don
I like the first one but both look great

Re: working on DarkAge

PostPosted: Sat Sep 12, 2015 23:52
by blert2112
I need assistance before I can continue with this section of the mod.

I have uploaded a test version of the mod...
https://github.com/blert2112/darkage.git
I inverted the minY/maxY so that everything spawns above ground in reverse (-31000 becomes 31000, etc). The higher you fly would correspond to digging down.

Create a new world with this mod enabled. For comparison, I have included a version of the old mapgen file with the same adjustments to minY/maxY. Open init.lua and enable ENABLE_OLD_MAPGEN, teleport to an undiscovered corner.

Please give me your feedback.

A few notes:
Register_ore sheet type does have a bug in it. I opened an issue on GitHub and paramat has expressed interest in fixing it.
Everything in the mod is disabled except for mapgen stuff. Feel free to re-enable if you like.
You may notice a lot of basalt. Google says basalt is the most common rock on the planet, therefore...

I'll go work on clay and silt whilst I wait for feedback.

Re: working on DarkAge

PostPosted: Sun Sep 13, 2015 00:43
by Don
Nice work.

Image

Edit - I was looking at your mapgen code. I love how nice you set it up. Great work.

Re: working on DarkAge

PostPosted: Sun Sep 13, 2015 01:02
by blert2112
Thanks, I very much appreciate it.
So, do you think it is generating too much? I tried (mostly) to balance out the thickness of the old gen with the thinner, more spread out, new gen.

Concerning mud and silt:
As far as I know, I can't use register_ore and still confine generation to the presence of water. If I am wrong please someone let me know. In other words... mud and silt can generate even if there is no water around. I'm going to have to put both generation methods in and use an option so that folks who care can use the method they wish.

Re: working on DarkAge

PostPosted: Sun Sep 13, 2015 02:00
by Don
I don't think you can use register ore to do mud and silt. When I have more time I will play with it and see if I can think of something different.

I think that having lots of blocks is great because it makes it easy to make nice buildings. On a mapgen I have been working on I made ores generate differently at different levels. From -100 to -500 it was far less generated. Then after that it increased every 200 to 300 down. After -2000 it all generated the same the rest of the way down. Just an idea.

Re: working on DarkAge

PostPosted: Sun Sep 13, 2015 02:22
by blert2112
It actually looks pretty good. I just can't confine it to the presence of water. Example: Find a open plain somewhere and dig down a node or two, you just might find mud under there. Silt could very well generate in a desert, after a bit of searching it seems there is precedence for this though.

Interesting idea!

Re: working on DarkAge

PostPosted: Sun Sep 13, 2015 04:00
by Napiophelios
I dont really mind the "bug" in the mapgen.
when mining its like finding scattered traces
and the deeper you go more and more of the "sheet" is revealed.
I guess it makes sense either way.

nice work, its good to see something new in Darkage mod :)

Re: working on DarkAge

PostPosted: Sun Sep 13, 2015 05:06
by hmmmm
Hi Blert2112,

The most recent version of Minetest has new sheet ore parameters that gives modders the power to create sheet ore exactly as in your mod.

Re: working on DarkAge

PostPosted: Sun Sep 13, 2015 05:15
by Don
Thanks hmmmm. I know you do a lot for minetest. Your work is appreciated.

Re: working on DarkAge

PostPosted: Sun Sep 13, 2015 05:56
by blert2112
Thank you hmmm, and thank you kwolekr!

I was just about to make a release of this mod in it's current state (which can be found on my GitHub). It's good for current builds. Now it's time to do some heavy modifying once I can get my hands on a new Windows build (my build procedure is no longer working, stupid Windows).

Sokomine wrote:... The speed gain ought to be significant as you can skip reading and writing back voxelmanip data. Of course that process might already be so fast that it's hard to notice. But it does sum up if other mods do the same. ...

I did a bit of testing with my version of the VoxelManip mapgen...
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
DARKAGE: total time : 1.899217 seconds
DARKAGE: total time without vm exchange: 0.008576 seconds
DARKAGE: total savings : 1.890641 seconds

New world, MT game, no other mods, seed DarkAgeSpeedTest. Spawned into the world, did not move but did look around full 360 degrees and up and down. After everything settled down the results were as above.
I left my old modified mapgen file in the download if you care to check my math. IF my math is correct those results are huge! 0.45% of the time was spent working out the nodes, the other 99.55% of the time was transferring VoxelManip data.? Such results make me doubt my math. Of course, this is not a comparision between one mapgen method and the other (I don't know how, or even if it is possible, to profile register_ore in this way. This only shows how much time it takes to perform VoxelManip with and without the exchanges back and forth from the engine to the DarkAge mapgen function.

Re: working on DarkAge

PostPosted: Sun Sep 13, 2015 15:40
by blert2112
Freakin' brilliant!
I fixed my build process. My wife doesn't work tonight so not sure if I will get much time to work on this today.

Re: working on DarkAge

PostPosted: Mon Sep 14, 2015 01:45
by blert2112
Fresh build is working nicely. I have modified the mod for the new options. Just testing and tweaking it up now. I will upload tomorrow I think.

edit:
Went ahead and put it up. It is in the "reg_ore-FIX" branch. You need a build of minetest from like today. You can get the one that works with previous minetest builds in the "master" branch.

Re: working on DarkAge

PostPosted: Tue Sep 15, 2015 15:33
by Sokomine
blert2112 wrote:IF my math is correct those results are huge! 0.45% of the time was spent working out the nodes, the other 99.55% of the time was transferring VoxelManip data.? Such results make me doubt my math.

No, it's consistant with what I've seen. If you set mg_villages.DEBUG_LEVEL = 100 in config.lua in mg_villages, you'll get detailed profiling information of the village generation steps measured using minetest.get_us_time(). Of course there are other steps which consume time as well, but the amount taken for getting and writing the data is considerable. That's why I'd prefer it to use the ore generation instead of shifting all the data to lua and back :-)

Re: working on DarkAge

PostPosted: Sat Sep 19, 2015 00:47
by blert2112
Any requests for changes or additions? Any problems?
My laptop ate itself the other day but I now have a new one on the way and will get back to fiddling with this in the coming week.

Re: working on DarkAge

PostPosted: Sat Sep 19, 2015 01:31
by Napiophelios
yes can you add group = {stick=1} to iron stick :)

also you can ditch several textures by using texture modifiers
Image
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.register_node( "darkage:cobble_with_plaster",  {
   description = "Cobble with Plaster",
   inventory_image = "darkage_chalk.png^([combine:16x16:0,4=default_cobble.png)",
   tiles = { "default_cobble.png^([combine:16x16:0,12=darkage_chalk.png)", "darkage_chalk.png^([combine:16x16:0,4=default_cobble.png)", "default_cobble.png^([combine:16x16:12,0=darkage_chalk.png)^[transformFX", "default_cobble.png^([combine:16x16:12,0=darkage_chalk.png)", "default_cobble.png", "darkage_chalk.png" },
   is_ground_content = false,
   sunlight_propagates = false,
   paramtype2 = "facedir",
   drop = "default:cobble",
   groups = {cracky=3},
   sounds = default.node_sound_stone_defaults()
})


you can also condense all the reinforced wood nodes into one node for each material using texture modifiers as well
Image Image
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
darkage = {}

darkage_creative = 0

darkage.register_reinforced = function( basename, texture, description, craft_from )
local group_def = {cracky=3, choppy=2, oddly_breakable_by_hand=1, not_in_creative_inventory = darkage_creative};

minetest.register_node("darkage:reinforced_"..basename, {
      description = description.." Reinforced",
  inventory_image = texture.."^darkage_reinforced_top.png",
      tile_images = {texture.."^darkage_reinforced_top.png", texture.."^darkage_reinforced_top.png", "("..texture.."^[transformFY)^(darkage_reinforced_side.png)", texture.."^[transformFX^(darkage_reinforced_side.png)^[transformFX", texture.."^darkage_reinforced_side.png^(darkage_reinforced_side.png^[transformFX)", texture.."^darkage_reinforced_side.png^(darkage_reinforced_side.png^[transformFX)" },
      groups = group_def,
      paramtype = "light",
      paramtype2 = "facedir",
   })

   --crafting--
   minetest.register_craft({
      output = "darkage:reinforced_"..basename.." 4",
      recipe = { { "default:stick", "", "default:stick" },
         {"", craft_from , ""},
         { "default:stick", "", "default:stick" },
      } });

end

--Default mod
darkage.register_reinforced( 'clay',        'default_clay.png',        'Clay',         'default:clay' );
darkage.register_reinforced( 'cobble',      'default_cobble.png',      'Cobble Stone',       'default:cobble' );
darkage.register_reinforced( 'stone',       'default_stone.png',       'Stone',        'default:stone' );
darkage.register_reinforced( 'wood',        'default_wood.png',        'Wood Planks',         'default:wood' );

--Darkage mod
darkage.register_reinforced( 'adobe',        'darkage_adobe.png',        'Adobe',         'darkage:adobe' );
darkage.register_reinforced( 'chalk',       'darkage_chalk.png',       'Chalk',       'darkage:chalk' );
darkage.register_reinforced( 'mud',       'darkage_mud_up.png',       'Dried Mud',       'darkage:mud' );




just some ideas
textures.png
textures.png (1.09 KiB) Viewed 6319 times

reinforced-condensed.png
reinforced-condensed.png (72.49 KiB) Viewed 6319 times

plasteredcobble.png
plasteredcobble.png (59.06 KiB) Viewed 6319 times

Re: working on DarkAge

PostPosted: Sun Sep 27, 2015 02:26
by Napiophelios
I think there is a problem with serpentine settings in the reg-fix mapgen.
whenever I get to -200 I get an error.

I changed maxY from -350 to -250 and the unhandled exception does not happen again.
It says maxY>minY.....sorry I accidentally deleted my log file

Re: working on DarkAge

PostPosted: Tue Sep 29, 2015 20:28
by blert2112
Napiophelios wrote:yes can you add group = {stick=1} to iron stick :)

Done.

Napiophelios wrote:I think there is a problem with serpentine settings in the reg-fix mapgen.
whenever I get to -200 I get an error.

I changed maxY from -350 to -250 and the unhandled exception does not happen again.
It says maxY>minY.....sorry I accidentally deleted my log file

Fixed. Thanks for pointing it out.
The reg_ore function for sheet types is very tricky. All the values need to agree with each other somehow. It seems the engine sometimes tries to put blocks above the maxY depending on the column_height variables. I probably could have gotten away with changing serpentine maxY to -340 but I went with -300 just to be safe. Let me know if there are any more problems.

I will work on reducing the texture amounts sometime in the near future.