Page 1 of 2

[RESOLVED] tmwserv Map Warp Points

Posted: 09 Feb 2008, 05:09
by leeor_net
Does tmwserv support switching between maps yet or is this something yet to be completed? How do I make it work? If it's not supported yet, how is it planned to work so I can at least get my maps ready for the change? :)

Thanks!

Posted: 09 Feb 2008, 10:55
by Matt
Should work. At least it works with the maps from trunk/tmw ;)

Posted: 09 Feb 2008, 12:32
by Crush
You have to add them by editing the map file with a text editor because Tiled doesn't allow to edit objects yet. It's an XML file. You add an objectgroup tag and then add warp objects like this:
http://rafb.net/p/slhKKA34.html

Check the map new_1-1.tmx from the trunk client repository for examples.

Posted: 09 Feb 2008, 23:17
by leeor_net
Awesome! Thank you so much for your replies! :D

Posted: 11 Feb 2008, 17:23
by Bjørn
Or use the development version of Tiled, which does support objects thanks to ElvenProgrammer. It's just a little rough around some edges, which is why it hasn't got a new release yet.

Posted: 11 Feb 2008, 22:02
by leeor_net
I think I'll try that. I don't mind programs that are a little rough around the edges, especially since they're development versions. Besides, this constant shuffling of files and copy/pasting object code is getting real old real fast... -_-

Anyway, thanks for the tip!

Posted: 12 Feb 2008, 16:18
by zick
how fast does the client switch from one map to another? just curious? would it ever be able to instantly switch? I had an idea for a map effect for a specific area that would be nice to have an instant switch ...

Posted: 12 Feb 2008, 16:43
by Crush
The client needs some time to load the next map file and its tilesets when there are any new ones. This usually takes less than a second.

Posted: 12 Feb 2008, 17:18
by zick
could there be an addition to the server to tell the client to preload a new tileset and map whenever you're a tile away from a waypoint? i guess this belongs in feature requests ...

Re: tmwserv Map Warp Points

Posted: 16 Feb 2008, 16:53
by leeor_net
Precaching tilesets and map data would [probably] ultimatly not be that beneficial. The load times is trivial on modern systems and the technical requirements for the game are not very high so older machines should see no really noticable lag from loading.

I would suggest, however, a better transition between maps, e.g., quick fade-out, fade-in. I don't know if this is planned, has been tested and rejected or whatnot so I just thought I'd throw it in there... :)

Re: tmwserv Map Warp Points

Posted: 17 Feb 2008, 00:43
by zick
I had an idea for a maze type map that would be awesome to have a new map display instantly when you step on a warp tile ... that's why I made the suggestion for preloading the next map, that way you just appear instantly on the next map. But the effect would be lame if there was lag or loading time IMHO.

Re: tmwserv Map Warp Points

Posted: 17 Feb 2008, 18:21
by Crush
Note that warping around on the same map does not require any loading time.

Re: tmwserv Map Warp Points

Posted: 17 Feb 2008, 22:26
by zick
It would be different maps (hence the maze effect), but would look like the same map. Here's an example, pardon the crudity (stars are walls, dashes are the viewable area, X is a connected waypoint between maps):

Code: Select all

MAP A                                           MAP B
=====                                           =====
****************                                           *****************
               *                                           *
************   *                                           *   *************
           *   *                                           *   *
-----------*---*-                               -----------*---*-
|     ******   *|                               |     ******   *|
|     * X      *|                               |     * X      *|
|     ******   *|                               |     ******   *|
-----------*---*-                               -----------*---*-
           *   *                                           *   *
           *   ***********                                 *   *
           *                                               *   *
           ***************                                 *   *
So what you see when you warp will be the exact same thing, but once you move outside the original viewport, it's completely different ...
This is just one example of how to use this, I have a couple others, but I would like to keep those on the down low for now. The tile before the X would issue a command (all client side, no need to involve the server) that would preload the next map, that way its an instant switch.

Re: [RESOLVED] tmwserv Map Warp Points

Posted: 21 Feb 2008, 20:18
by Modanung
Like Crush said you don't need to preload anything if you don't switch maps. This by warping from one location on the map to another. And these A and B can be on the same map, eventhough they are only connected through a warp.

Re: [RESOLVED] tmwserv Map Warp Points

Posted: 22 Feb 2008, 20:41
by zick
I could do that I guess ... I was kinda hoping that MAP A and MAP B would be bigger (like the max. size) hence needing separate maps but like the Rolling Stones say, "You can't always get what you want, but if you try sometimes you get what you need."