Page 1 of 2

[Mod] worldedge [worldedge]

Posted: Sun Dec 14, 2014 15:11
by Don
worldedge is a mod that teleports the player to the other side of the world when they reach the edge.

When the player walks past 30000 in any direction they will be teleported to the other side of the world as if they walked around the world.

Krock has made it so when you teleport to the other side you will be at ground height.

This mod was created by Amaz and modified by Krock.

License - DWYWPL
Dependencies - none
Download - worldedge
Github - worldedge

Tested on Minetest 0.4.10

Re: [Mod]worldedge

Posted: Sun Dec 14, 2014 16:09
by Napiophelios
oooh, I can use this to limit my worlds size?
I wanna trap my players to a smaller game area.

Re: [Mod]worldedge

Posted: Sun Dec 14, 2014 16:37
by Don
Napiophelios wrote:oooh, I can use this to limit my worlds size?
I wanna trap my players to a smaller game area.
Yes. Just edit init.lua change the first 2 lines to the size you want. Make the second a few smaller so they don't keep teleporting. It is not perfect but it works.

Re: [Mod]worldedge

Posted: Sun Dec 14, 2014 16:49
by Napiophelios
Nice it works well,
except I keep teleporting inside nodes.
I think its an easy fix tho.

Re: [Mod]worldedge

Posted: Sun Dec 14, 2014 16:52
by Don
Napiophelios wrote:Nice it works well,
except I keep teleporting inside nodes.
I think its an easy fix tho.
you get teleported to the same height as what you was at. If you can find a way to fix this I will added it.

Re: [Mod]worldedge

Posted: Sun Dec 14, 2014 22:09
by AMMOnym
Wow

Re: [Mod]worldedge

Posted: Sun Dec 14, 2014 23:05
by Don
AMMOnym wrote:Wow
Yes. Amaz is Amazing

Re: [Mod]worldedge

Posted: Mon Dec 15, 2014 00:25
by paramat
It's possible to use noise to precalculate terrain before it is generated, so that the player can be placed at the surface on teleportation, it's complex though, see my 'spawnplayer' functions in my recent mapgens for examples. I'm a bit busy at the moment to do this for this mod.

Re: [Mod]worldedge

Posted: Mon Dec 15, 2014 00:34
by Don
paramat wrote:It's possible to use noise to precalculate terrain before it is generated, so that the player can be placed at the surface on teleportation, it's complex though, see my 'spawnplayer' functions in my recent mapgens for examples. I'm a bit busy at the moment to do this for this mod.
Unfortunately I know nothing about mapgen. If you are about to do it I would be happy. I know you are very good with mapgen. Maybe you can put it on you "if I get bored" list. I think this mod could be really good but I do not have the skills to do it.

If anyone wants to improve this mod please do so.

Re: [Mod]worldedge

Posted: Mon Dec 15, 2014 16:25
by Hybrid Dog
paramat wrote:It's possible to use noise to precalculate terrain before it is generated, so that the player can be placed at the surface on teleportation, it's complex though, see my 'spawnplayer' functions in my recent mapgens for examples. I'm a bit busy at the moment to do this for this mod.
Would it keep the mgv6 look (caves, cliffs,…) at the map corners?

Re: [Mod]worldedge

Posted: Mon Dec 15, 2014 19:08
by Krock
https://github.com/DonBatman/worldedge/pull/1

I will add a terrain height detection when I've got time.

Re: [Mod]worldedge

Posted: Mon Dec 15, 2014 19:54
by Don
Krock wrote:https://github.com/DonBatman/worldedge/pull/1

I will add a terrain height detection when I've got time.
Thanks for that. It is now merged.

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 02:47
by TG-MyinaWD
I love this mod Don. Really use for when got a flat world. I might use this in my massive city. but First would need update the world a bit get work better.

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 03:00
by Don
Alt. Tester wrote:I love this mod Don. Really use for when got a flat world. I might use this in my massive city. but First would need update the world a bit get work better.
Thank Amaz. He wrote it. And Krock for his help.

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 05:57
by paramat
Don i never get bored hehe.
Hybrid Dog wrote:Would it keep the mgv6 look (caves, cliffs,…) at the map corners?
Yes there will be no change to the mapgen, the method would be similar to how player spawnpoint is chosen: use mapgen parameters and noise to precalculate the ground level at the teleport destination before that terrain is generated. You have to know exactly where to teleport to before teleporting.

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 14:35
by Hybrid Dog
paramat wrote:Don i never get bored hehe.
Hybrid Dog wrote:Would it keep the mgv6 look (caves, cliffs,…) at the map corners?
Yes there will be no change to the mapgen, the method would be similar to how player spawnpoint is chosen: use mapgen parameters and noise to precalculate the ground level at the teleport destination before that terrain is generated. You have to know exactly where to teleport to before teleporting.
ok, l thought that you would change the map at the other side, where the player becomes teleported at, that it looks exactly like the current place and so the player doesn't notice teleporting.

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 15:10
by Don
@paramat - if I had your skills I would not get bored either.

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 15:23
by paramat
Hybrid Dog wrote:ok, l thought that you would change the map at the other side, where the player becomes teleported at, that it looks exactly like the current place and so the player doesn't notice teleporting.
That could only possibly be done in a lua mapgen, with a core mapgen the terrain will always be different when you teleport.

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 15:42
by philipbenr
Actually, it would be cool if you were to make it so the magpen would wrap around. That way, there would be possiblilty to make the world wrap around.

Offtopic: That feature could also make it possible to have different world modes. You could have it so there would be a wrap around world, and an infinite flat world... Just some cool ideas that have been thought of.

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 16:24
by Hybrid Dog
philipbenr wrote:Actually, it would be cool if you were to make it so the magpen would wrap around. That way, there would be possiblilty to make the world wrap around.

Offtopic: That feature could also make it possible to have different world modes. You could have it so there would be a wrap around world, and an infinite flat world... Just some cool ideas that have been thought of.
some time ago l tried to make my own mg noises
viewtopic.php?f=3&t=156&p=158729#p158729
viewtopic.php?f=3&t=156&start=2625#p158957

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 16:27
by twoelk
paramat wrote:...
That could only possibly be done in a lua mapgen, with a core mapgen the terrain will always be different when you teleport.
I have always wondered wether such a transportation mod could not be combined with a restricted mapgen of sorts. This special "mapgen" could force a certain terrain along the predefined borders but leave all other parts of the map/world to what ever other mapgen is doing the job.

Such a border could be for example a broad stretch of desert that gradually draws to a certain hight that fits to the corresponding edge on the other side. My favourite version though would be a nice surrounding ocean of considerable depth and width. I guess other things such as a stretch of grassy plains or a high mountain ridge should also be possible. At least in theory. It might be usefull to restrict interaction in the borderlands to avoid people trying to build structures over the border.

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 16:35
by Hybrid Dog
twoelk wrote:
paramat wrote:...
That could only possibly be done in a lua mapgen, with a core mapgen the terrain will always be different when you teleport.
I have always wondered wether this could not be combined with a restricted mapgen of sorts. This special "mapgen" could force a certain terrain along the predefined borders but leave all other parts of the map/world to what ever other mapgen is doing the job.

Such a border could be for example a broad stretch of desert that gradually draws to a certain hight that fits to the corresponding edge on the other side. My favourite version though would be a nice surrounding ocean of considerable depth and width. I guess other things such as a stretch of grassy plains or a high mountain ridge or a deep forest should also be possible. At least in theory. It might be usefull to restrict interaction in the borderlands to avoid people trying to build structures over the border.
this:
Image

could be used as an approximate height map:
Image

for the whole world

Re: [Mod]worldedge

Posted: Tue Dec 16, 2014 17:12
by twoelk
lol
I had just edited out the forests as I don't think trees in the borderlands would work well :-D

Re: [Mod]worldedge

Posted: Wed Dec 17, 2014 00:03
by paramat
paramat wrote:That could only possibly be done in a lua mapgen, with a core mapgen the terrain will always be different when you teleport.
What i mean of course is it could be done in a new core mapgen as well.
Also yes a mod could add matching borderlands to a core mapgen.

Re: [Mod]worldedge

Posted: Wed Dec 17, 2014 01:28
by ArguablySane
Hybrid Dog wrote:<snip>
I have a better solution. Gradually blend your perlin noise values with the values on the opposite side of the world for chunks near the edge. Choose a distance which is large compared to the features in your terrain gen, then gradually blend from one side to the other over that distance. Blocks exactly on the edge should be a 50-50 mix of the terrain from each side.