[Mod] Landscape Redo [0.1.1] [landscape]

User avatar
Hamlet
Member
 
Posts: 625
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

[Mod] Landscape Redo [0.1.1] [landscape]

by Hamlet » Fri Apr 27, 2018 21:30

Image

Image

Turns dirt with grass' sides into full grass sides.
BlockMen had released a beta version: viewtopic.php?f=11&t=5190

Settings used for the map' screenshots:
mgv7_spflags = nomountains, noridges, nofloatlands, caverns
seed = 2614029718620983620

Version: 0.1.1
Source code's license: GPLv3

Dependencies: default (found in Minetest Game)

Usage
Settings -> Advanced Settings -> Mod -> Landscape

LBM (active by default) = Changes the actually loaded map chunk's nodes.
NOTE: deactivate it if you're using a test map: nodes get already changed on map blocks' generation, leave it active if you're using a preexisting map.
ABM (active by default) = If daytime, changes the active map blocks' nodes that might need it (e.g. former dirt nodes which have turned to dirt_with_grass).
Landscape profiler = Shows on console the required computation times (every 5mins).
Landscape remover = Reverts the changed nodes to their original state.

Some profiling stats:
+ Spoiler


Archives: .zip .tar.gz
Source code: GitHub



Installation

Unzip the archive, place the folder in
../minetest/mods/

If you only want this to be used in a single world, place it in
../minetest/worlds/WORLD_NAME/worldmods/

GNU+Linux - If you use a system-wide installation place it in
~/.minetest/mods/

For further information or help see:
https://wiki.minetest.net/Help:Installing_Mods
Last edited by Hamlet on Fri Nov 08, 2019 19:22, edited 5 times in total.
 

Astrobe
Member
 
Posts: 239
Joined: Sun Apr 01, 2018 10:46

Re: [Mod preview] Landscape Redo [0.1.0] [landscape]

by Astrobe » Sat Apr 28, 2018 17:10

It looks really nice, but having default nodes replaced with custom nodes (landscape:dirt_with_grass etc.) looks scary, because it seems it could break some mods.
 

User avatar
TumeniNodes
Member
 
Posts: 2827
Joined: Fri Feb 26, 2016 19:49
Location: in the dark recesses of the mind
GitHub: TumeniNodes
IRC: tumeninodes
In-game: TumeniNodes

Re: [Mod preview] Landscape Redo [0.1.0] [landscape]

by TumeniNodes » Sat Apr 28, 2018 19:57

Looks nice Hamlet, I recall the original.

Astrobe wrote:It looks really nice, but having default nodes replaced with custom nodes (landscape:dirt_with_grass etc.) looks scary, because it seems it could break some mods.

I don't think you have anything to worry about.
Ich mag keine grünen Eier und Schinken, ich mag sie nicht Sam I Am
 

User avatar
Hamlet
Member
 
Posts: 625
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod preview] Landscape Redo [0.1.0] [landscape]

by Hamlet » Sat Apr 28, 2018 20:07

Astrobe wrote:It looks really nice, but having default nodes replaced with custom nodes (landscape:dirt_with_grass etc.) looks scary, because it seems it could break some mods.


Legit concern, however consider that it doesn't replace every dirt node, just some of them; I've taken this screenshot to show which ones:

Image

TumeniNodes wrote:Looks nice Hamlet, I recall the original.


Thank you, just a "proof of concept" so far, I'm working to trim the code and improve compatibility with as many nodes as possible.
Attachments
replaced_nodes.png
(475.86 KiB) Not downloaded yet
 

User avatar
Hamlet
Member
 
Posts: 625
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod preview] Landscape Redo [0.1.1] [landscape]

by Hamlet » Sat May 05, 2018 12:55

Released v.0.1.1

- Added ABM, improved the profiling ability, minor tweaks.

Check the first post for more informations.
 

Astrobe
Member
 
Posts: 239
Joined: Sun Apr 01, 2018 10:46

Re: [Mod preview] Landscape Redo [0.1.1] [landscape]

by Astrobe » Tue May 15, 2018 16:22

Landscape has generated a lot of "Lua OOM" crashes today while I was flying around to test other things. This error usually happens once when I do that kind of thing (even before I installed Landscape), but today I had repeated crashes. The ABM was disabled.
 

User avatar
Hamlet
Member
 
Posts: 625
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod preview] Landscape Redo [0.1.1] [landscape]

by Hamlet » Tue May 15, 2018 17:41

Astrobe wrote:Landscape has generated a lot of "Lua OOM" crashes today while I was flying around to test other things. This error usually happens once when I do that kind of thing (even before I installed Landscape), but today I had repeated crashes. The ABM was disabled.


Landscape only uses memory in four cases:
- map generation (voxel manipulator) [ran just once]
- preexistent map loaded block (lbm) [ran just once]
- preexistent active map block (abm) [ran every X secs]
- calculating the elapsed times of the above operations, storing/parsing them and printing them.

So, excluding the ABM which you said it was turned off, the worst possible case I can think of is:
- Voxel Manipulator active
- LBM active
- profiler active
- the above when map is being generated

That is:
map generation +
voxel manipulator +
loaded block manipulator (useless, since the VoxelManip has already been ran) +
profiler collecting and elaborating elapsed times

If this is the case then I am not surprised that you get Out Of Memory crashes, at least deactivate the LBM; and given that you already had OOM crashes without Landscape running, I would suggest to turn off the profiler as well.

This would leave active the VoxelManip only, drastically reducing the chance of OOM crashes.
EDIT ^^^^^ Last famous words! See the next post.
Last edited by Hamlet on Thu Aug 02, 2018 12:50, edited 1 time in total.
 

User avatar
Hamlet
Member
 
Posts: 625
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod preview] Landscape Redo [0.1.1] [landscape]

by Hamlet » Thu Aug 02, 2018 12:48

Astrobe wrote:Landscape has generated a lot of "Lua OOM" crashes today while I was flying around to test other things. This error usually happens once when I do that kind of thing (even before I installed Landscape), but today I had repeated crashes. The ABM was disabled.


I believe that I've found the cause of the OOMs.
Quickly: multiple huge voxelmanip tables.

Thoroughly:
+ Spoiler


However, while working on my other mods I've learned better ways to achieve the same things with less code (e.g. "for" cycles).
Moreover I plan to remove the custom nodes (i.e. "landscape:dirt_with_*") and to redefine the default nodes; the idea is to change "default:dirt_with_*" 's textures depending on neighbors, instead of replacing the node itself.

Underlying idea:
+ Spoiler


The above should drastically cut the code's lenght and the number of required computations, while ensuring compatibility with other mods.

I don't have an ETA, but this mod isn't dead nor abandoned.
Sidenote: I'll probably switch to the MIT license, because I want my code to be "CC-BY-SA" without forcing people to document which changes they've done.
 

Astrobe
Member
 
Posts: 239
Joined: Sun Apr 01, 2018 10:46

Re: [Mod preview] Landscape Redo [0.1.1] [landscape]

by Astrobe » Fri Aug 03, 2018 15:57

I actually ended up redefining dirt_with... nodes so that there's the same texture on all faces, which achieves mostly the same thing. I didn't mention it because I assumed that Minecraft/Minetest started up like that, but people found it bad and the side textures were introduced, so doing that would be a regression to most people.

It has drawbacks though, like you can't tell the difference between dirt_with_snow and snow blocks and the bottom face should be dirt (that one is just my laziness).

If I understand it correctly, your new method should look nicer with stacks of dirt hanging on cliffs - you'll get a stack of green dirt_with_grass nodes instead of one grass on top and N dirt nodes below it. TBH as far as I'm concerned I'm not sure it's worth the extra calculations though.

One thing I'm not sure about your new method is that if you keep the default node, then the ABM that converts grass nodes that are covered into dirt nodes might get in your way.
 

User avatar
Hamlet
Member
 
Posts: 625
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet

Re: [Mod preview] Landscape Redo [0.1.1] [landscape]

by Hamlet » Sat Aug 04, 2018 09:56

Astrobe wrote:One thing I'm not sure about your new method is that if you keep the default node, then the ABM that converts grass nodes that are covered into dirt nodes might get in your way.


You are right, that is surely going to happen; the outcome would look weird.
I'll have to figure how to get the two abms get along.
Perhaps I could simply turn off the abm that converts covered dirt_with_grass nodes into dirt nodes, if possible - and make my abm handle that duty as well.
 

User avatar
Hamlet
Member
 
Posts: 625
Joined: Sat Jul 29, 2017 21:09
Location: Lombardy, Italy
GitHub: h4ml3t
IRC: H4mlet
 


Return to WIP Mods



Who is online

Users browsing this forum: Kilarin, MSN [Bot] and 2 guests