ID:155555
May 27 2011, 2:00 am
|
|
I'm trying to figure out a way to connect maps similar to the way the Pokemon games do (because Pokemon is the only game that comes to mind when I think of connected maps). Unfortunately, I can't figure out a way to even approach this. Can anyone point me in the right direction?
|
In response to Mr. Robert
|
|
No, I meant being able to go from 1 z-level to the next as if they were on the same z-level. I'm pretty sure I'd need to use screen overlays (or whatever they're called) and put the player on a fake z-level or something, but I don't know if there's a better way.
|
In response to SereneBluestone
|
|
You want to actually take them from one map to another, or do you want to "overlay" one map onto another?
|
In response to SereneBluestone
|
|
Is that how Pokemon worked? I always thought there was just one REALLY large world map that would be all of the towns and all of the trails and seas you would swim in. And then you would be transported to another Z level when you went inside of a house or into a cave to get from one route to another.
|
In response to Mr. Robert
|
|
Both, actually. Of course, that's complicated by the fact that BYOND makes all it's maps the same X and Y size, so I'd need to specify in the coding somewhere what each map was and what it's connected to.
|
In response to Moussiffer
|
|
That's how effective the system is: You never realize it's not one giant map until you mess around with it's internals.
|
In response to SereneBluestone
|
|
I assume you know the method for teleporting a person with an /area or some special /turf. One trick for a seamless map would be to have the teleport point a couple of /turf before the edge of a map and the continuing point after the edge of the starting point (with the same turf at the beginning so it looks the same).
If done correctly, people will know that's a teleporting site if another person was present which would not be duplicated at that position (there are ways to do so but why bother?) |
In response to GhostAnime
|
|
This is the reason, in all honesty, that most games simply have set area's that every player knows to walk into the be teleported elsewhere on the map. The only way to make maps seamless and still look good is to go about it like this:
The port location is several tiles away from the true edge of the map(slightly farther than the client.view). Over the port line is an exact copy of the place you wish to teleport to. When a player steps over the line to teleport to the other map, an EXACT copy of the player is created, that simply steps over the line without being teleported. The doppelganger moves with the player it's connected to. All Damage done to one is passed to the other. Every effect, overlay, buff, everything is passed between the child object and the parent client. This gives the illusion to anyone watching a player cross over this boundary, that he/she never teleported, but was still simply walking normally. This also mean that battles between players won't be interrupted because if the attacked player steps over the line, his clone is created, and the two players could literally battle it out on the edges of their maps, without even being on the same z-level. As an obvious side note, any player approaching the line, but hasn't crossed yet, will have a clone duplicated onto the other map as well. Giving the illusion to anyone waiting at the border, that someone is coming. I might be interested in creating a demo of this, simply to give a proof of concept. This is, in my opinion, the best way to handle a seemingly seamless(No pun intended) map that still allows interaction between players. |
As in, when a player is transported from one location to another x/y/z location you want a smooth transition?
If that's the case, you'll just want to re-locate the player's /mob to the new location and while that's happening, apply a screen-transition using screen_obj's and client.screen.