[mod] Random spawning with spawn sharing [rspawn]

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [mod] Random spawning with spawn sharing [rspawn]

by taikedz » Post

Sorry I haven't worked on this for a while. I started this project and the server it was tailored for, in Xmas 2018, and spent around 3 months doggedly maintaining it. I burned out and am still recuperating :-(

This is my sad tale of Minetest presence - a massive flurry of activity, and then a long hiatus because of burnout... has happened 3 times already....

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [mod] Random spawning with spawn sharing [rspawn]

by FreeGamers » Post

taikedz wrote:Causes players to receive a spawn point anywhere on the map. Players will likely spawn veeery far from eachother into prisitine areas.

This is primarily intended to be a server mod, to encourage the independent creation of communities across the map - let players create their own cities, and trek across the map to find eachother!

Features
  • * Player is assigned randomized spawn point on joining
    - * Player will respawn at their spawn point if they die.
    -- * If `beds` spawning is active, then beds can be used to reset the players' spawn point.
    * Players will not spawn in spaces that are protected.
    * Players can open their spawn to be visited by all - effectively making custom spawn towns
    * Commands
    - * Players can return to their spawn point with the `/spawn` command if they have `spawn` privilege.
    - * Players can request a new spawn point by typing `/newspawn` if they have the `newspawn` privilege.
    - * Players can set their spawn point by typing `/setspawn` if they have the `setspawn` privelege.
    - * Players can assign a new random spawn for another player using `/playerspawn` if they have the `spawnadmin` privilege.
A `/spawn add <guestplayer>` command allows a player visit someone else's spawn using '/spawn visit <hostplayer>'. In this way, collaborative towns centred around spawns can arise!

A customizable levvy can be configured to optionally prevent uncontrolled gathering around a spawn. By default, the cost of inviting a player to your spawn is 10 cobblestones. Cheap-o.

A `/spawn town open` command allows players to open their spawn up to everybody (no levvy), so any player can visit their spawn. Any explicitlly invited guests can help manage town guests with `/spawn town <ban/unban> <town name>`.
  • * License: LGPLv3
    * Source: Github
    * Download ZIP: Zip download
    * Depends: optional: beds
I may give this a test soon, it has a lot of features. Right now I'm using https://github.com/NathanSalapat/random_spawn for my survival server.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [mod] Random spawning with spawn sharing [rspawn]

by taikedz » Post

jeremyweston wrote:I may give this a test soon, it has a lot of features. Right now I'm using https://github.com/NathanSalapat/random_spawn for my survival server.
Most welcome to :-)

I hadn't realized Nathan had had a go at this.

`rspawn` (mine) actually does the spawn point generation in advance, so players don't have to wait whilst the server emerges and searches for an adequate space.

The towns part was implemented at the request of players on Not So Simple Server ; in principle though I expect that once I get my rear in gear, I'll split those features out to a separate mod.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [mod] Random spawning with spawn sharing [rspawn]

by Sokomine » Post

taikedz wrote: This is my sad tale of Minetest presence - a massive flurry of activity, and then a long hiatus because of burnout... has happened 3 times already....
Hm, yes, that may happen pretty easily. I do work on my mods with gaps of months or years apart depending on time and ideas.

Guess it's all fine as long as you keep comming back :-)
A list of my mods can be found here.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [mod] Random spawning with spawn sharing [rspawn]

by texmex » Post

Once a modder, always a modder. The only way to stop is if you find a nicer game to mod instead. :D

Btw, if I haven’t said this already: this mod is great. Currently I especially appreciate the spawn_block feature which makes it a breeze to place spawn schematics via the node’s on_construct. The pre-generation feature also turns out to be crucial for a feature I’ working on.

User avatar
paramat
Developer
Posts: 3700
Joined: Sun Oct 28, 2012 00:05
GitHub: paramat
IRC: paramat
Location: UK

Re: [mod] Random spawning with spawn sharing [rspawn]

by paramat » Post

It's a great concept. Having players spawn scattered across a world makes the evolution of a server so much more interesting and creates new possibilities. I might add such an option to MTG or the engine.

User avatar
FreeGamers
Member
Posts: 650
Joined: Sat May 25, 2019 00:15
GitHub: is proprietary I use NotABug
Location: United States
Contact:

Re: [mod] Random spawning with spawn sharing [rspawn]

by FreeGamers » Post

paramat wrote:It's a great concept. Having players spawn scattered across a world makes the evolution of a server so much more interesting and creates new possibilities. I might add such an option to MTG or the engine.
I personally dislike spawning in survival servers that have huge towns already established. Sometimes it can take 20-30 minutes to even find an empty area with a tree to punch. Usually, you're directed to a specific area for new players which feels like a ghetto for newbies. I also dislike spawning in servers with tons of protected areas around spawn (owned by offline players) that make it so I can't interact with anything until I trek out of town. Often these towns give out free resources like food and access to safe mines to new players, which takes a lot of the struggle out of the game.

I want players to discover established communities by exploration or to have them be invited by other players to rendezvous and cooperate if they choose to. I use random spawn with a mod that limits the distance that the playertag appears in the world as well to maintain an isolation effect for newcomers. My server is still very new so I'll see if this is indeed how things manifest over time.

A random spawn should ensure that players are more scattered and are given a more traditional "in-the-wild" challenging survival experience. It also gives new players a bit of a buffer to get their own homestead and area setup for themselves. The only problem I forsee using a random spawn mod is that co-op friend players won't initially spawn together. This is alleviated with some simple communication and coordination between the players, so I don't see it as a big deal. This particular mod address that with some commands for collaboration. (I personally don't like enabling /home or /spawn commands to remove the ability to insta-teleport to safety, going deep underground should bring risk and danger to build suspense and heighten the fun of exploring and spelunking)

This type of spawning isn't for everyone. I notice some players just leave my server after spawning and being killed in the wild by mobs a few times, or by dying of thirst or hunger. Thats fine by me. The players that stick around in my server tend to be more cooperative after struggling to get setup. I think it weeds out some noobies a bit too. Its not a philosophy for everyone, but I don't like the game to be too easy or structured in the beginning. Eventually, optional peer-to-peer teleportation technology is available to players who get to mese and obsidian level of ore.
FreeGamers.org has moved to MeseCraft.net | FreeGamers on this forum is now MeseCraft

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [mod] Random spawning with spawn sharing [rspawn]

by taikedz » Post

paramat wrote:It's a great concept. Having players spawn scattered across a world makes the evolution of a server so much more interesting and creates new possibilities. I might add such an option to MTG or the engine.
Glad you like it :-) I need to whittle this down back to its core, I think it grew arms and legs a bit... I want to isolate the spawn randomizer as much as possible to its own thing, and put the town-making in a different mod... I'd be happy to redo this with a view to MTG inclusion, following the coding style an guidelines?

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [mod] Random spawning with spawn sharing [rspawn]

by taikedz » Post

jeremyweston wrote: Sometimes it can take 20-30 minutes to even find an empty area with a tree to punch. (...) tons of protected areas around spawn (owned by offline players) that make it so I can't interact with anything until I trek out of town.
I know how you feel... I actually made this mod simply because I wanted to explicitly avoid making a spawn town at all (more for lazy reasons initially!) - and also because of the problems that come with having a single spawn town... everything you outlined...
jeremyweston wrote: (I personally don't like enabling /home or /spawn commands to remove the ability to insta-teleport to safety, going deep underground should bring risk and danger to build suspense and heighten the fun of exploring and spelunking)
Yes I did note that this could be an issue for some. Ability to turn off the /spawn command itself is perhaps something I'd add.
jeremyweston wrote: The players that stick around in my server tend to be more cooperative after struggling to get setup. I think it weeds out some noobies a bit too.
This was another concern I had with my old server. I paired this with a chat mod to prevent long-distance chatting so that people who joined and started begging for free stuff would have no real option other than to either fend for themselves or go to another server.

It was an artificial way of "raising the bar." Once I implemented "towns" though, it was possible to entirely subvert that ; but the mechanism currently in the mod allows the owner of the opened spawn to moderate their space on their own. No admin required :-)

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [mod] Random spawning with spawn sharing [rspawn]

by texmex » Post

I’m back on the issue of (forced) distribution of new players between existing spawn points. Any ideas on how to proceed? I’m thinking new players should be put on spawns with fewer members to even out the population but at the same time the spawn point would need online players to welcome the new player. I sense that herein would be a conflict because the more spawn points the higher demand on players being online…

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [mod] Random spawning with spawn sharing [rspawn]

by taikedz » Post

Part of the idea was to allow "self-managing spawn towns" ("spowns"??) -- so demands on players to manage their own spawn towns is not so bad.

For the distribution... I'd nearly say that would be an entirely different mod (made for compatibility with this one, perhaps). One could try tracking which spowns have the most regularly-returning players and choosing from that list (heuristic to be defined). Or, a new player could be offered a choice of which spown to join on first joining the server.

Or simply distribute evenly -- then, "spowns" are defined by the presence of a "spown stone" which players can use to jump between them. They can manually choose to join a different spown once, after which changing spown costs, some admin-defined price (idk, say, 10 mese blocks).

Mechanisms abound. I'd even go so far as to add hooks to this mod for other people to implement the distribution logic separately...

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [mod] Random spawning with spawn sharing [rspawn]

by taikedz » Post

Yeah. Spowns. Bite me.

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: [mod] Random spawning with spawn sharing [rspawn]

by texmex » Post

taikedz wrote:I'd even go so far as to add hooks to this mod for other people to implement the distribution logic separately...
That sounds very good :)

mcaygerhard
Member
Posts: 129
Joined: Tue Mar 05, 2019 17:37
GitHub: mckaygerhard
IRC: mckaygerhard
In-game: mckaygerhard

Re: [mod] Random spawning with spawn sharing [rspawn]

by mcaygerhard » Post

UPDATE: all issues were solved upstream

i installed the mod, start a server and everythinhg is fine.. before anything the hardware are 8 cores xeon, 8G RAM and SSD disk, remove AWS server with debian 9 powered, at subs.fusilsystem.com (yes is the sub nasa no rulez server, only for braves)

finally after months of use we had to remove this mod because a poor behaviour performance.. After a while, if the area is small it is exhausted to find free points in the area for a new spawn point, and if it is very large the server is unable to handle the memory for the lua engine https://github.com/taikedz-mt/rspawn/issues/6

Code: Select all

Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: [Server]: [rspawn] DEBUG : Trying somewhere around (0,0,0)
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: [Server]: [rspawn] DEBUG : Searching (-96,0,-96) to (96,192,96)
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: ServerError: AsyncErr: environment_Step: Runtime error from mod 'rspawn' in callback environment_Step(): ...ib/games/minetest/games/venenux/mods/rspawn/init.lua:74: find_nodes_in_area(): area volume exceeds allowed value of 4096000
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: stack traceback:
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: #011[C]: in function 'find_nodes_in_area'
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: #011...ib/games/minetest4/games/venenux/mods/rspawn/init.lua:74: in function 'newspawn'
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: #011...minetest4/games/venenux/mods/rspawn/lua/pregeneration.lua:33: in function 'func'
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: #011/usr/share/minetest4/builtin/common/after.lua:18: in function </usr/share/minetes4t/builtin/common/after.lua:4>
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: #011/usr/share/minetest4/builtin/game/register.lua:420: in function </usr/share/minetest4/builtin/game/register.lua:400>
Oct 10 17:53:39 venenux-server minetestserver: 2021-10-10 17:53:39: ERROR[Main]: stack traceback:
Oct 10 17:57:30 venenux-server minetestserver: 2021-10-10 17:57:30: [Main]: Automatically selecting world at [/var/lib/games/minetest/worlds/venenuxharcore]
1. of course the excees value of area is cos we try to enhanced the size of the area.. but the mod does not take in consideration that when minetest uses database for auth, still there are a txt files that defines old map and auth, so setting still are cached or something i dont known
2. after removes the mod there's no more crash of the server around memory exausted

i will post this at the github issues but in more details

mcaygerhard
Member
Posts: 129
Joined: Tue Mar 05, 2019 17:37
GitHub: mckaygerhard
IRC: mckaygerhard
In-game: mckaygerhard

Re: [mod] Random spawning with spawn sharing [rspawn]

by mcaygerhard » Post

@taikedz updated the mod and nows is most performed! well a quite bit

git was updated: changelog:

* fix for CONTENT_IGNORE errors cos try to replace already defined node with nil
* prevent infinite recursion in set_newplayer_spawn
* fix the big area search by limit the altitude due it multiplies twice and generated a big area

In human beings words.. this changes fixed some errors like a custom block below the player when respawns, if ws not defined, generated a error in server that in some circumstances crash the hole server, it also solves a performance hit due a big area generation when search for places to respawn and set a new spawn request in big servers..

This mod performs very well in normal mid to little servers, still this mos must be high tested in big servers but for the moment in my very big one VenenuX sub.nasa-g0v it not crash anymore!

User avatar
taikedz
Member
Posts: 698
Joined: Sun May 15, 2016 11:11
GitHub: taikedz
IRC: DuCake
In-game: DuCake
Location: Scotland, UK
Contact:

Re: [mod] Random spawning with spawn sharing [rspawn]

by taikedz » Post

mcaygerhard wrote:
Wed Oct 27, 2021 15:29
@taikedz updated the mod and nows is most performed! well a quite bit

git was updated: changelog:

* fix for CONTENT_IGNORE errors cos try to replace already defined node with nil
* prevent infinite recursion in set_newplayer_spawn
* fix the big area search by limit the altitude due it multiplies twice and generated a big area

In human beings words.. this changes fixed some errors like a custom block below the player when respawns, if ws not defined, generated a error in server that in some circumstances crash the hole server, it also solves a performance hit due a big area generation when search for places to respawn and set a new spawn request in big servers..

This mod performs very well in normal mid to little servers, still this mos must be high tested in big servers but for the moment in my very big one VenenuX sub.nasa-g0v it not crash anymore!
Thanks for posting and updating 😊

mcaygerhard
Member
Posts: 129
Joined: Tue Mar 05, 2019 17:37
GitHub: mckaygerhard
IRC: mckaygerhard
In-game: mckaygerhard

Re: [mod] Random spawning with spawn sharing [rspawn]

by mcaygerhard » Post

taikedz wrote:
Wed Oct 27, 2021 22:57
Thanks for posting and updating 😊
update the main first post.. curently i has several problems for the auth redux mod.. got an error in db.lua.. the migration of the data spected some values that seems corrupted .. i will lost my user base snif sniff ..

mcaygerhard
Member
Posts: 129
Joined: Tue Mar 05, 2019 17:37
GitHub: mckaygerhard
IRC: mckaygerhard
In-game: mckaygerhard

Re: [mod] Random spawning with spawn sharing [rspawn]

by mcaygerhard » Post

taikedz wrote:
Wed Oct 27, 2021 22:57
Thanks for posting and updating 😊
hi @taikedz i upgraded adn change the rspawn way of the mod.. try many ways and debug with more than 20 players at time.. including cheaters.. at the sub nasa gov.. i finally get to work stable and its pretty well

https://t.me/s/venenux_games/141 and taikedz i have two PR if you have some time to i can close it and made new one.. with my working changes .. tomorrow i wil update the code to improve the block spawn (able to do not use by settings, it makes dirty the spawn already build XD )

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests