Page 1 of 1

[abandoned mod] Sq2 Mapgen [sq2]

PostPosted: Wed Nov 29, 2017 07:18
by duane
Note: I'm no longer working on this mod.

Sq2 is a world dominated by ruined cities. The terrain is based on two-dimensional perlin noise for speed and simplicity. It's very similar to Squaresville_c, but all done in lua. It's based on singlenode, so no matter what mapgen you pick, you get Sq2. For those who've seen my earlier mods, this mod incorporates most of Geomoria, Fun Caves, Zigg, Exeter, Passages, Chaos, Loud Walking, and Big Trees.

At the moment, it produces some nice wilderness with rivers, roads, and an occasional ragged grid of streets with ruins scattered about. There are passages, dungeons, and pyramids to explore. The cave system is unusual -- it generates large, horizontally open spaces with small and large speleothems and a variety of biomes. I plan on supplementing this with cave geomorphs in the future.

There is a chaos dimension, accessible with the Trump of Chaos, full of familiar terrain twisted into bizarre shapes, including little "planets" with soil and vegetation and "stars".

Using the geomoria-based geomorph system, you can add any sort of ruin or dungeon you can imagine with simple lua code. You can also modify or create new cave biomes as easily as surface biomes. (See the init file for the biome table.)

Note: Because of the way minetest handles multiple processors, you should set "num_emerge_threads = 1" in your minetest.conf file when using Sq2 (or any lua mapgen). This will significantly increase the terrain generation speed, and avoid any issues with overgeneration.

This is a work in progress.

+ Spoiler


The source is available on github.

Code: LGPL2, textures: CC-BY-SA and CC0

Mod dependencies: default, beds, doors, flowers, stairs

Download: https://github.com/duane-r/sq2/archive/master.zip

Problems

PostPosted: Wed Nov 29, 2017 07:19
by duane
Problems:
  • Since I'm using shaded grass, lots of normal grass features are altered or broken.
  • There's no treasure in geomoria yet. I'm not sure how to handle this...

Not Problems (won't fix):
  • Cities are still basically flat despite being covered by terrain.
  • It's slow. (Actually it's pretty fast considering everything's happening in lua.)
  • Jungles don't look right. (They look fine.)
  • Land rises up to meet the roads. (By design.)
  • No floating islands (Don't like 'em.)
  • Rivers are flat and slop out near ruins.

Planned:
  • better biomes
  • space pods

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Wed Nov 29, 2017 14:56
by the_raven_262
But why switching from a C mapgen to a LUA one?

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Wed Nov 29, 2017 17:09
by Inocudom
the_raven_262 wrote:But why switching from a C mapgen to a LUA one?

A C++ mapgen has to be compiled, which some users might not like.

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Wed Nov 29, 2017 17:33
by the_raven_262
Inocudom wrote:
the_raven_262 wrote:But why switching from a C mapgen to a LUA one?

A C++ mapgen has to be compiled, which some users might not like.

Well, I prefer compiling over lag. But whatever, I guess compiling minetest on other operating systems might not be as easy as on Linux.

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Thu Nov 30, 2017 01:24
by v-rob
the_raven_262 wrote:Well, I prefer compiling over lag. But whatever, I guess compiling minetest on other operating systems might not be as easy as on Linux.


Yes it is. Compiling on Windows is pretty hard, but I don't have much experience (and as it is, I likely won't get any experience ;-) ).

So from what I gather, the geomorphs in Squaresville are all going to be added to this version? I really like the geomorphs in Squaresville.

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Thu Nov 30, 2017 03:08
by duane
the_raven_262 wrote:But why switching from a C mapgen to a LUA one?


I like working with lua. I hate working with C -- I'll do it when necessary, but it's never fun, and this is a game -- fun's kind of the point. I don't know about all this lag people complain about, but I don't run any public servers, so I don't see a lot of the problems.

However, I will point out that because minetest doesn't properly thread lua, your voxelmanip mods will run slower for every map generation thread you add. When the game breaks a chunk into two threads, your lua on_generated callbacks do everything twice. Set your num_emerge_threads to one for best results with lua mapgens (which are the extreme case).

v-rob wrote:So from what I gather, the geomorphs in Squaresville are all going to be added to this version? I really like the geomorphs in Squaresville.


I'm putting at least as much of geomoria into this as is in squaresville_c. I'm thinking about making the caves geomorphic as well. They won't look as rough as noise-based caves, but they could benefit from being hand-crafted. The current cave system is just randomly placed spheroids.

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Fri Dec 01, 2017 19:45
by azekill_DIABLO
Noice! Lika that we ca test it more easely!

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Sat Dec 02, 2017 07:24
by duane
I've got most of geomoria, and the passages working, as well as the water decorations that were missing. In fact, the dungeon decorations work better in this version, since I don't have to depend on callbacks to place them.

Image

More Screenshots

PostPosted: Sun Dec 03, 2017 06:56
by duane
+ Spoiler

More Screenshots

PostPosted: Sun Dec 03, 2017 06:58
by duane
+ Spoiler

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Sun Dec 03, 2017 12:32
by azekill_DIABLO
+1 duane

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Thu Dec 07, 2017 07:41
by duane
Chaos is more or less in place.

Image

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Tue Dec 12, 2017 13:41
by AlexD975
It look awesome, but when I try to generate world with sq2 mod, minetest crashed.

And, I no have any idea why it happened! I add "num_emerge_threads = 1" in minetest.conf, but game is still crash when I try use sq2.
Image

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Tue Dec 12, 2017 14:44
by AlexD975
Okay I make some experiments with fork and other generators... Nothing!

Then I change render distance to 20, and then it work, I see gray void and after this my computer is crashed...
What the hell?!

I guess this mod is really heavy, but... Why?! IDK!

Maybe I try it again later, but I think this mod needs VirtualBox.

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Tue Dec 12, 2017 15:00
by AlexD975
I did another experiment, turn off all programs on my PC, call "task dispather" with Ctrl+Alt+Del. Also I turn off all graphics in minetest. And then run the game with mod.

I look, how work minetest and I notice how he used all possible RAM in my pc, after 5,7 gb my computer totally freezes.

I don't know how, but look like, this mod is really heavy, and it needed very powerfull PC.

Fun fact, but Squaresville no have this problems, and work fine.

Well, thanks for attention, and good luck in mod development!

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Wed Dec 13, 2017 02:38
by duane
AlexD975 wrote:It look awesome, but when I try to generate world with sq2 mod, minetest crashed.

And, I no have any idea why it happened! I add "num_emerge_threads = 1" in minetest.conf, but game is still crash when I try use sq2.
Image


I'm not sure what to tell you. I don't even own a windows box, so I can't give you much advice. On linux, I can run minetest 0.5 and all my mods (including sq2, of course) in about 10-15% of my 8Gb of memory. I tried constraining minetest to 2Gb maximum of memory, and I still get no crashes.

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Wed Dec 13, 2017 16:55
by azekill_DIABLO
Ah linux...

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Fri Dec 15, 2017 14:23
by AlexD975
duane wrote:
AlexD975 wrote:It look awesome, but when I try to generate world with sq2 mod, minetest crashed.

And, I no have any idea why it happened! I add "num_emerge_threads = 1" in minetest.conf, but game is still crash when I try use sq2.
Image


I'm not sure what to tell you. I don't even own a windows box, so I can't give you much advice. On linux, I can run minetest 0.5 and all my mods (including sq2, of course) in about 10-15% of my 8Gb of memory. I tried constraining minetest to 2Gb maximum of memory, and I still get no crashes.


Minetest 0.5? But last version is 0.4.16, or I don't notice something?
About OC, I have Windows 8.1 on my laptop, and it easily run Serious Sam 3 BFE. My laptop easily works with Cityscape and Squaresville. So, I think, there may be only one solution: Waiting next release of Minetest.

Also I may try to do something with Fork of Squaresville C... But I no have any idea how to work with it! XD

Anyway, I wanna say big thank you for Cityscape and Squaresville! It's very interesting mods, I like them very much! Even though I also have problems with them. But I'll talk about them later.

Re: [mod] Sq2 Mapgen [sq2]

PostPosted: Sun Dec 17, 2017 05:36
by duane
I've made some changes to schematic handling that may help some folks. It won't reduce the overall memory footprint -- in fact it increases it -- but it will reduce the amount of memory churn. If your lua garbage collector isn't up to snuff, it might help.