ID:1290255
 
Resolved
link() between two worlds with the same skin was not seamless, showing a splash screen.
BYOND Version:499.1192
Operating System:Windows 7 Pro 64-bit
Web Browser:Chrome 27.0.1453.110
Applies to:Dream Seeker
Status: Resolved (499.1200)

This issue has been resolved.
tested on 499.1192 and every version since

Here's the code, link() isn't seamless as promised.

#define ADDRESS world.internet_address

area
server_transfer
var/server
icon = '_portal.dmi'
var/loc_tag = "" as text
layer = TURF_LAYER + 1

Entered(atom/movable/a)
if(istype(a, /mob))
var/mob/m = a
m.go_to_server(server, loc_tag)

mob/Write(savefile/F)
..()
F["icon"] << null
F["overlays"] << null
F["underlays"] << null

mob/var/last_x
mob/var/last_y
mob/var/loc_tag

mob/proc/go_to_server(t as text, loc_tag = "")
src.last_x = x
src.last_y = y
src.loc_tag = loc_tag
world << "[last_x],[last_y]"
var/savefile/F = new("players/[ckey].sav")
F << src
var/result = world.Export("byond://[ADDRESS]:[t]?ping")
world << "result was [result]"
if(result)
world.Export("byond://[ADDRESS]:[t]?transfer", F)
src << link("byond://[ADDRESS]:[t]")
else
src << "[ADDRESS]:[t] is not alive"
src << "The server you are on is [world.address]:[world.port]"

world/Topic(T, addr)
if(T == "transfer")
world.log << "importing a mob!"
var/savefile/F = new(world.Import())
var/mob/m = new
F >> m
return ..()

mob/Login()
..()
world << "[src] logs in"
if(last_x)
src.x = last_x
if(last_y)
src.y = last_y
if(loc_tag)
w = 0
a = 0
s = 0
d = 0
src.Transfer(locate(loc_tag))

mob/Logout()
world << "[src] logs out"
del(src)
..()


create portals with ports, host servers with said ports
Here's a nifty little test environment for you, to make it easier: http://files.byondhome.com/FIREking/realms_src.zip

Just change #define ADDRESS in realms.dm

Then host two servers, one with port 6505, and another with port 6506 and join the 6505 server. You must use these port numbers for the test to work properly.
I tested different combinations for ADDRESS

#define ADDRESS world.address //doesn't work with ec2 servers at all, link() fails
#define ADDRESS world.internet_address //provides proper ip address and transfer works, link() still not seamless
#define ADDRESS "x.x.x.x" //raw ip transfer works, link() still not seamless
#define ADDRESS "127.0.0.1" //works on local host, link() is seamless, obviously does not work on a network (sending client to 127.0.0.1)
Thanks for the good report. We'll see what we can find for the next release.
This is still messed up in 1196, please fix :D
It's best if you leave the version in the original bug report as-is; it's more useful to know when the bug started.
In response to Lummox JR
Lummox JR wrote:
It's best if you leave the version in the original bug report as-is; it's more useful to know when the bug started.

Ok, could you remind me which version you made the first link() change so I can go back and try another test? I'll walk forwards from there.
In response to FIREking
FIREking wrote:
Ok, could you remind me which version you made the first link() change so I can go back and try another test? I'll walk forwards from there.

I don't fully remember myself. This is why it's best to keep the original info intact; it helps remind me as well.
Ok I went back to 1186 where it started working, and here's the results

1186 = works
1187 = works
1188 = works
1189 = works
1190 = works
1191 = works
1192 = does not work
Still broken on 499.1197
Still broken on 499.1199
We'll take a look for the next version.
Lummox JR resolved issue with message:
link() between two worlds with the same skin was not seamless, showing a splash screen.
In response to Lummox JR
When you use the seamless link() feature (worlds with the same skin file), DreamSeeker stops recognizing mouse input on the bottom and right of the map (left and right click). Only the top left side works, as you can see from this gif: (On it, I'm constantly pressing the right click)

When you don't use the same skin file as the targeted linked world, the mouse input is working as intended.
In response to NSBR
Apparently since I didn't import the same image files the skin of the targeted world was using, it caused a problem with the Mouse Input (? I don't know why). Importing them fixed the issue. Once it was on the cache for the first world, I can remove it and compile again and it works either way.

I think I'm still seeing probless with the seamlessness (link transition). Will make a new post when I'm done with the testing and sure of the results.
In response to NSBR
This belongs in a new bug report, not a nine-year-old thread.