[mod] water_life - mobs for mobkit - V171020[water_life]

MisterE
Member
Posts: 102
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [mod] water_life - mobs for mobkit - V250720[water_life]

by MisterE » Post

Gundul wrote:
Mon Aug 03, 2020 17:15
MisterE wrote:
Mon Aug 03, 2020 05:58
You might too, Gundle.
Anyone knows that person ? X)
oops, sorry

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V250720[water_life]

by Gundul » Post

The poll is over and 80% voted for spawn eggs.

But reading the numbers clearly:

In ten days of time and almost 400 times the topic water_life was opened only
10 people casted a vote. One of them was me, so 9 left :)

That is everything else than high importance :D

I will focus on the new models MisterE was so nice to provide and will do
spawneggs when there should be some extra free time or my boss fires me XD

In the meanwhile please use /spawnentity water_life:xxxx
My servers: Jungle, Lilly in the valley, 3xile

Bastrabun
Member
Posts: 120
Joined: Mon Nov 04, 2019 19:48

Re: [mod] water_life - mobs for mobkit - V250720[water_life]

by Bastrabun » Post

I voted yes! Can you get me the phone number of your boss? :D

Meanwhile:

Code: Select all

 water_life:                                             |       548 |    261331 |     19227 |   0.0 |  98.1 |  53.8
  - on_step[2] ........................................  |        38 |     45519 |      1437 |   0.0 |  32.3 |   2.1
  - on_activate[15] ...................................  |        29 |        54 |        41 |   0.0 |   0.2 |   0.1
  - on_activate[10] ...................................  |        12 |       191 |        44 |   0.0 |   3.7 |   0.2
  - on_step[15] .......................................  |        44 |     39334 |       266 |   0.0 |  75.3 |   1.0
  - on_activate[9] ....................................  |        39 |        39 |        39 |   0.1 |   0.1 |   0.1
  - on_step[9] ........................................  |         1 |     16111 |         4 |   0.0 |  21.1 |   0.0
  - on_step[16] .......................................  |       212 |    226869 |     16603 |   0.0 |  94.2 |  44.5
  - globalstep[1] .....................................  |         1 |     17159 |        41 |   0.0 |  62.9 |   0.1
  - on_activate[4] ....................................  |        28 |        53 |        38 |   0.0 |   0.5 |   0.2
  - on_activate[3] ....................................  |        16 |        17 |        16 |   0.0 |   0.0 |   0.0
  - on_step[4] ........................................  |        30 |     23241 |       522 |   0.0 |  50.9 |   2.1
  - on_activate[16] ...................................  |        36 |       158 |        57 |   0.0 |   0.4 |   0.1
  - on_punch[16] ......................................  |         3 |         6 |         4 |   0.0 |   0.1 |   0.0
  - on_step[10] .......................................  |        65 |     50759 |      1560 |   0.0 |  66.8 |   5.4
  - on_step[3] ........................................  |        27 |     18548 |       216 |   0.0 |  52.2 |   0.8
If I read that correctly, water_life causes 53.8% of the lag on the server? is there something I can do about it? I do run the latest version.

I already reduced the number of waterlife mobs to 20.

I also reduced ABR to 1.

I don't even see too many wl_obejcts in the area. Nor are my players anywhere near the ocean.

One of them explored a previously uncharted area, thus generating a lot of new mapblocks. Is it possible the spawn takes taht much performance? Especially since we have ethereal and some other stuff?

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V250720[water_life]

by Gundul » Post

Bastrabun wrote:
Tue Aug 04, 2020 22:44
I voted yes! Can you get me the phone number of your boss? :D
No problem if you want to pay me in the future :)
Bastrabun wrote:
Tue Aug 04, 2020 22:44
Meanwhile:


- on_step[16] ....................................... | 212 | 226869 | 16603 | 0.0 | 94.2 | 44.5

If I read that correctly, water_life causes 53.8% of the lag on the server? is there something I can do about it? I do run the latest version.
most is used by this on_step function. Try to comment out the seagulls in init.lua and try again.
Not lag, but cpu time. What means when you have other processes suddenly needing much cpu time, lag can
happen depending on your machine.
Bastrabun wrote:
Tue Aug 04, 2020 22:44
One of them explored a previously uncharted area, thus generating a lot of new mapblocks. Is it possible the spawn takes taht much performance? Especially since we have ethereal and some other stuff?
generating new terrain on a server is the most cpu consuming task which can happen, exspecially when you already have a bigger mapfile and more than just the usual biomes.
The spawning function does not use much.
The other thing I am experiencing on my server Lilly is, that there might be problems running the two mob apis together: mobs_redo and mobkit. But I do not know details yet. What helps so far is doing a server restart once a day.
My servers: Jungle, Lilly in the valley, 3xile

Bastrabun
Member
Posts: 120
Joined: Mon Nov 04, 2019 19:48

Re: [mod] water_life - mobs for mobkit - V250720[water_life]

by Bastrabun » Post

I believe my machine is not too bad (Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz, 6 cores and 24 GB memory), I have no idea how you can run water_life on a raspberry pi. In the example I posted, water_life caused 19 seconds of lag/cpu_busy_time

Of course, other processes need the CPU, too. On my machine, water_life mobs are bugged backwards when those performance spikes happen.

Generating new terrain does consume a lot of CPU, but that still does not explain those 19 seconds from the profiler. I can send you any amount of profiler saves to investigate, so that you can also see the other mods using way less CPU time in their on_generate (which is not exact, some, like darkage, seem to not use the on_generate for generating terrain).

Yes, I also use mobs_redo. In what way can they collide? Those issues happen right after server restart when someone goes exploring, the issue sems to be tied to this exact player behaviour. If you want, I can show you on my server. In the petz-thread I also show some heavy lag/CPU time, maybe this is tied to mobkit? While I very much like water_life, I can't have my server lag by that much, players/testers start complaining :P

It's especially strange since you already use a 10 second timer for spawns. Is there anything I can do (like insert some echo debugging or use your debugging methods) to see what's going on/wrong? Until then I will try to disable seagulls, but the problem didn't suddenly appear when they got introduced

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V250720[water_life]

by Gundul » Post

Bastrabun wrote:
Fri Aug 07, 2020 22:28
I believe my machine is not too bad (Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz, 6 cores and 24 GB memory), I have no idea how you can run water_life on a raspberry pi. In the example I posted, water_life caused 19 seconds of lag/cpu_busy_time

Of course, other processes need the CPU, too. On my machine, water_life mobs are bugged backwards when those performance spikes happen.
On a machine like that you should not have issues. You run it as a desktop pc ?
For example my server ZombieTest runs on a Rasberry Pi 2. Lilly on a vps with single core and 2GB Ram.
World size is reduced on both to prevent using cpu for terrain generation. Also on Lilly spawning of mobs_redo
is disabled.

Bastrabun wrote:
Fri Aug 07, 2020 22:28
Generating new terrain does consume a lot of CPU, but that still does not explain those 19 seconds from the profiler. I can send you any amount of profiler saves to investigate, so that you can also see the other mods using way less CPU time in their on_generate (which is not exact, some, like darkage, seem to not use the on_generate for generating terrain).
Water_life does need cpu, no question. These are mobs constantly (usually once a second) checking what is happenening around them and taking action. No dumb mobs just hanging around. :)
And what should be also kept in mind is: who profiles the profiler :) Does minetest terrain generations shows up
in the mod profiler ? I guess not. So what does the profiler data can tell you ? Only a fragment image of what is
happening in your minetest world.
Minetest says water_life uses 19 sec of cpu time. But relating to what ? Did you ever added all cpu times used
by all your mods ? So what was it in total ?
Bastrabun wrote:
Fri Aug 07, 2020 22:28
Yes, I also use mobs_redo. In what way can they collide? Those issues happen right after server restart when someone goes exploring, the issue sems to be tied to this exact player behaviour.
Exploring is the cpu and harddisk killer. That is what I said :D
Tenplus1, maker of mobs_redo, also desincourages from using other mob apis alongside. You can read somewhere in the Readme or forum I remember. If you ask me exploring is your server issue, not water_life.
Bastrabun wrote:
Fri Aug 07, 2020 22:28
It's especially strange since you already use a 10 second timer for spawns. Is there anything I can do (like insert some echo debugging or use your debugging methods) to see what's going on/wrong? Until then I will try to disable seagulls, but the problem didn't suddenly appear when they got introduced
The mobs using the most calculations in water_life are the whale and the gulls. Try disabling them or disable the whole mod to see if it is better.
My servers: Jungle, Lilly in the valley, 3xile

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by Gundul » Post

Update 080820


CrocBags :)
Image

Hunt crocodiles and use their skin leather to craft croc bags.
This adds a soft dependency on unified_inventory. Use the croc
bag in a bag slot of your unified_inventory. Same space as a large
bag.
My servers: Jungle, Lilly in the valley, 3xile

Bastrabun
Member
Posts: 120
Joined: Mon Nov 04, 2019 19:48

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by Bastrabun » Post

No, it's a rented VPS. I have a MT testserver on the same hardware as the live one. I can disable a mod, then try to recreate what the user does. If I disable water_life and generate new terrain, there's way less lag than with it.

I disabled the seagulls, will do so with the whales, too. Only for testing, because I like both :D

As far as I know, the profiler only profilers the lua part of MT. Engine mapgen is handled differently. Yes, lua mods that spring into action when new terrain is generated show up there. They also add to the lag and I need to find a way to tune that down, too.

Afaik TenPlus1 discouraged using two mob engines on one mob. You think mobs_redo does something, even though it does not show up in the profiler? Maybe, I don't know :D I can try to disable mobs_redo on the testserver and see if that solves the problem.

The 19 seconds seems to stand in relation to how much delayed server actions are. Like when you have a lag of 19, send a text message and roughly 19 seconds after it gets displayed to the others. I can send you the whole profiler save and many more if you want to, so you can see for yourself.

I kicked xocean in favor of water_life. There's no way I am going back to dull mobs doing nothing! But I also can't have the server delay a player action by 19 seconds :D

User avatar
runs
Member
Posts: 1802
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by runs » Post

...
Last edited by runs on Sat Aug 08, 2020 14:26, edited 1 time in total.
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1802
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by runs » Post

Bastratun do you use a dedícate server?
Day 42 of the quarantine

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by Gundul » Post

That would be pretty expensive if it would be dedicated XD
And it wouldn't be virtual anymore :)

Finding the source of lag can be a time consuming task. It depends on so many
things, like amount of players, your harddisc, your mapfile, your mods, with how many
other people in your vps the virtual hardware is shared with....

In the first days of Jungle that could nearly drove me crazy. Specially on weekends.
Changing the company providing the vps finally made it much better. But that is only
one possibility. I would not rely too much on that profiler info. BuckarooBanzay used
to have a tool for monitoring servers. So you can see cpu usage together with #players, lag and
so on. But it is the same like with the profiler. What measures the use of the measurement tool :)
My servers: Jungle, Lilly in the valley, 3xile

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by Gundul » Post

Try this maybe.

viewtopic.php?f=14&t=22473


and read what sofar wrote:

viewtopic.php?p=306898#p306898
Last edited by Gundul on Sat Aug 08, 2020 16:03, edited 1 time in total.
My servers: Jungle, Lilly in the valley, 3xile

User avatar
runs
Member
Posts: 1802
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by runs » Post

Gundul wrote:
Sat Aug 08, 2020 14:57
That would be pretty expensive if it would be dedicated XD
And it wouldn't be virtual anymore :)

Finding the source of lag can be a time consuming task. It depends on so many
things, like amount of players, your harddisc, your mapfile, your mods, with how many
other people in your vps the virtual hardware is shared with....

In the first days of Jungle that could nearly drove me crazy. Specially on weekends.
Changing the company providing the vps finally made it much better. But that is only
one possibility. I would not rely too much on that profiler info. BuckarooBanzay used
to have a tool for monitoring servers. So you can see cpu usage together with #players, lag and
so on. But it is the same like with the profiler. What measures the use of the measurement tool :)
Thats the problem. It is like to try to drive a Ferrari in a dirty country road. You would need a highway at least. I mean the mob mods amount.

I am planning a server. But it ís delayed cos I want it dedicated. And of course only one mob mod, just one.

Mobs are time consuming. Even in a player local game is a pain. I remember playing a Minecraft game, with a mob mod, terrible. And a online Minecraft with only 4 players and no mob mods, terrible too.

Bastratun you have to cut your mob mods list. Your server is not enought to handle it. Choose only one, I do not mean between mobs_redo or mobkit but futhermore, even do limit what mobs_redo or mobkit mods to use.
Day 42 of the quarantine

User avatar
runs
Member
Posts: 1802
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by runs » Post

...
Day 42 of the quarantine

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by Gundul » Post

runs wrote:
Sat Aug 08, 2020 15:26

Bastratun you have to cut your mob mods list. Your server is not enought to handle it. Choose only one, I do not mean between mobs_redo or mobkit but futhermore, even do limit what mobs_redo or mobkit mods to use.
That is a true word. Your world is overpopulated.
What could help a bit is what I did in Lilly's. Disable the mobs_redo spawning and use only spawners.
My servers: Jungle, Lilly in the valley, 3xile

Bastrabun
Member
Posts: 120
Joined: Mon Nov 04, 2019 19:48

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by Bastrabun » Post

It's not a dedicated, but a virtual private server, all on SSD. I had hoped it was more on the ferrari and highway side of things than on the dirt road one. At least compared to a raspberry pi, right?

I did as you suggested and added the monitoring thingy: https://monitoring.minetest.land/d/YUpo ... =your-land

Neither petz nor water_life nor mobs_redo can be responsible for the lag. Because when I try them in singleplayer, no other mods activated, they do fine. I don't know what exactly causes them to show up in the profiler that high. Maybe I read it wrong somehow.

I'll disable all mods one by one, with water_life and petz active. As soon as there's no more lag when emerging blocks, I found my culprit. Then I only have to see why this lag source does not show up in the profiler. I'll start with mobs_redo, even though it doesn't show up in the profiler as being responsible for a lot of load.

Looks like lag-hunting drives me crazy as well. I hope the tool you linked me helps me see what's going on, at least I can see a separate graph for mapgen in there.

Thankyou runs and gundul for helping me not only with the mods of yours, but also with basic minetestery like reading profiler logs properly :D

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V250720[water_life]

by Gundul » Post

Bastrabun wrote:
Fri Aug 07, 2020 22:28
I believe my machine is not too bad (Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz, 6 cores and 24 GB memory),
You did not mention the harddisk. Everything slower than SSD should not be considered.
Imagine how many read/write you have on the map with each player connecting.
For a virtual system like this you would pay in Europe on serious hosters between 25 and 35€, including like 20TB traffic.
Cheaper hosters usually share the hardware with more people. That makes it difficult, especially on weekends
when everybody has time to play. So with Ferraris it is also important to look inside it. Is it really the same engine X)
Some hosters sell Ferraris, but when you open the hood, it is a Fiat engine XD
My servers: Jungle, Lilly in the valley, 3xile

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by Gundul » Post

Preview: coming up next - Rattlesnake

with a Model/Texture from MisterE

Image

So far snakes spawn in water and on land,
in deserts and savannahs.
They can live in both but prefer the land.
This is still wip, not all animations and
and behaviors are already implemented.

They will warn you if you come too near with
sound and their rattle. Do not ingnore or they
attack. They will only warn you once because
they can remember your smell. Next time they
will attack instantly.

Want to try ?
https://github.com/berengma/water_life/tree/snake
My servers: Jungle, Lilly in the valley, 3xile

MisterE
Member
Posts: 102
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by MisterE » Post

Does each individual snake have an individual memory of the player, or does each player only get one warning for all snakes, from then on all snakes attacking without warning?

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by Gundul » Post

Each animal is an individuum with it's own memory :)
My servers: Jungle, Lilly in the valley, 3xile

MisterE
Member
Posts: 102
Joined: Sun Feb 16, 2020 21:06
GitHub: MisterE123
IRC: MisterE
In-game: MisterE

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by MisterE » Post

Well, it looks like its coming along well. I will be able to learn alot about how to use mobkit from these. I cant make any promises, but what do you think about a seahorse for the next one? That one would be a small file, and simple coding, I expect, cause they like to hang out near reeds and move around slowly, that all.

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V080820[water_life]

by Gundul » Post

Oh yes, I like seahorses. But I will be still busy a while finishing the snake and adding the gecko and the beaver :)
My servers: Jungle, Lilly in the valley, 3xile

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V160820[water_life]

by Gundul » Post

Update 160820: Rattlesnakes
(ContentDB also updated)

they live in savannah and desert biomes but >15 degree celsius
spend a lot of time sleeping in the sun
can live in water and on land, but prefers land
will do nothing as long as not disturbed or provoked
will not spawn in protected areas, only in the wild
My servers: Jungle, Lilly in the valley, 3xile

Gundul
Member
Posts: 1022
Joined: Thu Aug 27, 2015 10:55
GitHub: berengma
IRC: Gundul
Location: Europe/Asia

Re: [mod] water_life - mobs for mobkit - V210820[water_life]

by Gundul » Post

Update 210820:

more believable rattlesnake behavior: warn, bite, run
when you been bitten by a snake you get poisoned and
will lose every 20 sec one heart until you drink the antiserum
an icon in your hud will show you if you're poisoned or not
to craft the antiserum catch three snakes with a bugnet (rightclick on them, chance of 33%)
a snake can smell if you are poisoned by snake bite, all will run from you until you are cured.

Image
My servers: Jungle, Lilly in the valley, 3xile

Adnunano
Member
Posts: 26
Joined: Thu Feb 13, 2020 09:28

Re: [mod] water_life - mobs for mobkit - V210820[water_life]

by Adnunano » Post

I think you are the first modder to add a mob that gives status effect.Congratulations.
NfAPhpmGaVphBjK8NIr9Mit5xNW2emD2

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests