mt-mods / jumpdrive

Minetest jumpdrive mod

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow y-rotation of jump area

tuedel opened this issue · comments

Rotation about the y-axis should work with most mods; x and z would probably break mesecons and the likes.

Possibly related: #16

Possibly related: #16

You guessed right: this needs to happen first...

I don't see why Y-rotation would require a single-step jump

I don't see why Y-rotation would require a single-step jump

It needs to be stored temporarily because you are writing in your own area while rotating

It ? needs to be stored temporarily because you are writing ? in your own area ? while rotating ?

Ambiguity/unclear pronouns

please clarify?

The jump is currently performed as a sequence of individual steps (see https://github.com/mt-mods/jumpdrive/blob/master/move.lua):

  1. Copy all nodes to the target area
  2. Copy/move metadata to the target area
  3. Execute compatibility code for specific mods
  4. Move objects (including players) to the target area
  5. Clear the source area

To perform an in-place rotation, the ship/area which is being jumped has to be written to the same area it is occupying before the jump. Thus, a complete copy of the ship/area (including metadata) would need to be stored somewhere else before starting to jump/writing anything to the map - otherwise the jumpdrive would overwrite parts of the ship/area before even reading them.
Single-step/overlapping jumps pose a similar (but not identical) problem.

The important part here is in-place, which has never been specified explicitly in this issue. 😉
Rotating the ship while performing a jump to another non-overlapping area should be possible independently of #16.

Ambiguity/unclear pronouns

Sorry about that, i was in a hurry :)
Thanks @tuedel

Single-step/overlapping jumps pose a similar (but not identical) problem.

What does "single-step jump" actually mean?

commented

What does "single-step jump" actually mean?

Single step jump is overlapping jump where you move whole jumprive area only +1 node to some direction.
There you cant place things to target location before source location is saved beforehand because those areas overlap.

In other words, at beginning of jump your jump target coordinates are inside your current engine radius.