Map API / Mumble Mashup

Map API / Mumble Mashup

in API Development

Posted by: Cliff Spradlin.3512

Cliff Spradlin.3512

Lead Programmer

Next

I just read a post on reddit where someone suggested a great idea that I had never thought of. I just wanted to post it here so that you guys can see it and get some more information about it.

The idea is to use the mumble link plugin protocol to get your character’s position from the game client, which could then be used to plot your character’s position on a map.

Guild Wars 2 supports mumble’s 3d-positional voice chat, which means that GW2 mumble users will hear other players relative to their positions in the game world.

The protocol is described here: http://mumble.sourceforge.net/Link . An app would simply need to create or open the memory mapped file described in the protocol, and GW2 would automatically write the character’s position to that file.

Some implementation notes:

  • The coordinate system used by mumble is slightly different than the game. GW2 uses inches (don’t ask), but mumble uses meters. So you’ll need to convert the coordinates back to inches for use with the map API.
  • The game currently supplies the current map ID inside the ‘context’ binary blob. However, it doesn’t currently supply which floor the character is on or which interior the character has entered.

I’m not sure how the mumble server protocol works, but theoretically you could tap into the mumble client to get the positions of everyone else on your mumble server too.

(edited by Cliff Spradlin.3512)

Map API / Mumble Mashup

in API Development

Posted by: Bushido.2184

Bushido.2184

This sounds truly amazing.

Leet Hacker (War) | Linüx (Necro) | Linúx (Ele)
Quit to play my 2 favorite competitive fps and moba games ported to my favorite OS.

(edited by Bushido.2184)

Map API / Mumble Mashup

in API Development

Posted by: Bear on the job.6273

Bear on the job.6273

This is making my brain bubble with ideas…

So with this, you could potentially create a site/app where people go, and can see all other players on their current map (as long as those players are using mumble). You could also add the ability for commanders to select players on that map, and give them orders to go to a location and perform an action.

So in theory, you could almost provide a RTS interface for commanders to coordinate WvW gameplay. I’m a software dev myself, and I’m gonna spend the weekend investigating this…

Map API / Mumble Mashup

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Excellent! Thank you!

This sounds like what we need in conjunction with the events api so we can grab the events based on the map location the character is on.

(edited by DarkSpirit.7046)

Map API / Mumble Mashup

in API Development

Posted by: Nabrok.9023

Nabrok.9023

They have to be using mumble and have sending location turned on, which in my experience, most do not have on.

It is great when somebody says “over here” and it actually means something though!

“I’m not a PvE, WvW, or PvP player – I am a Guild Wars 2 player”
Tarnished Coast – Dissentient [DIS]
All classes

Map API / Mumble Mashup

in API Development

Posted by: Bear on the job.6273

Bear on the job.6273

Actually, you wouldn’t even need mumble. From what I understand, GW2 is following the generic plugin API for mumble, which is just to open a memory mapped file with a specific identifier, and start writing position updates to it. You could write a custom app that doesn’t use mumble at all, but accesses the same memory map GW2 is writing to.

With that, you could effectively create your own overlay app that would show an additional map over the GW2 game screen. That overlay app could also sync with a server and allow each user of the app to send commands another user, and share waypoints. Also, it looks like the positional audio API includes camera position and vectors, so you could actually draw a waypoint marker on the player’s screen to show them where to go.

But just to ask, what is the policy on a 3rd-party app like this? Effectively, something that would give you an alternate in-game map, with all player locations on the map, as well as the ability to issue waypoints and commands to other players.

Map API / Mumble Mashup

in API Development

Posted by: multivira.7925

multivira.7925

I would love to make something like this for WvW so we can see where the different guilds are operating. Would this be ‘legal’ to make? Just positions for our allies.

Twirling – Pie Eating Guardian – MM – Gunnar’s Hold

Map API / Mumble Mashup

in API Development

Posted by: Bear on the job.6273

Bear on the job.6273

I got a small app working today that accesses the memory mapped file, and I can extract the character data from it (position, camera direction, and character name). This is without mumble, just with a small custom app.

Is there more info in the context blob though? You say the map ID is stored in the blob, but is there anything else?

Map API / Mumble Mashup

in API Development

Posted by: Varonth.5830

Varonth.5830

Hmm, it has potentional, but it does always require some native code (couldn’t for example make something work in Java without JNI code) running on the client machine.

Websites would definitely require some plugins, and I don’t know if this kind of plugin would actually work in every browser.

Map API / Mumble Mashup

in API Development

Posted by: Killer Rhino.6794

Killer Rhino.6794

Where is the memory mapped file GW2 is writing to?

Map API / Mumble Mashup

in API Development

Posted by: Varonth.5830

Varonth.5830

Where is the memory mapped file GW2 is writing to?

Afaik it is just a shared memory object.
In that case, somewhere deep within the RAM :P

Native windows code should be able open it via
HANDLE hMapObject = OpenFileMappingW(FILE_MAP_ALL_ACCESS, FALSE, L"MumbleLink");

Map API / Mumble Mashup

in API Development

Posted by: Killer Rhino.6794

Killer Rhino.6794

Where is the memory mapped file GW2 is writing to?

Afaik it is just a shared memory object.
In that case, somewhere deep within the RAM :P

Native windows code should be able open it via
HANDLE hMapObject = OpenFileMappingW(FILE_MAP_ALL_ACCESS, FALSE, L"MumbleLink");

I see that now. It’s right there in the link Cliff pasted.

bad killerrhino

Creator of GW2Kit

Map API / Mumble Mashup

in API Development

Posted by: Cliff Spradlin.3512

Previous

Cliff Spradlin.3512

Lead Programmer

Next

I would love to make something like this for WvW so we can see where the different guilds are operating. Would this be ‘legal’ to make? Just positions for our allies.

Yes. I discussed this scenario with the WvW team, and they’re totally OK with this usage of our APIs.

Their only requirement is that player positions should not be posted publicly, since obviously it would then be used by opposing teams.

Map API / Mumble Mashup

in API Development

Posted by: multivira.7925

multivira.7925

I would love to make something like this for WvW so we can see where the different guilds are operating. Would this be ‘legal’ to make? Just positions for our allies.

Yes. I discussed this scenario with the WvW team, and they’re totally OK with this usage of our APIs.

Their only requirement is that player positions should not be posted publicly, since obviously it would then be used by opposing teams.

It would probably be shared on a password protected site or client shared between different guilds so we can better organize our movements. Thanks for answering, this should be fun

Twirling – Pie Eating Guardian – MM – Gunnar’s Hold

Map API / Mumble Mashup

in API Development

Posted by: Khisanth.2948

Khisanth.2948

This could also be useful for bounties. With >5 going after a target, saying “found target at my location” in guild chat is not very useful to the people not in your party but if this was linked up with a map you can see the position of everyone instead of being limited to 5.

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Knowing the format of the context blob would be great.

I just brute force it into uint32 and get map ID at the 7th and world ID at the 9th position (counting from 0, of course :P), though I’m sure some of that is utterly wrong.

Edit:
How to turn fAvatarPosition[3] into map coordinates (or the rough idea thereof):

fAvatarPosition[3] contains x, a, y position, a being altitude, because kitten.
context[256] contains the map ID, somewhere, see above.

For some reason you have to negate y.

Multiply x, y by 39.3701 to convert from meters to inches. You now have your chatacter’s position within map_rect for the given map.

Resize and translate this point to fit into continent_rect (that’s the easy part) and boom, you can slap it onto the map.

http://i.imgur.com/ULRQjyd.jpg

Sort of. Dunno, I’m no asura. I just slap them pieces together until they break or through some miracle actually work.

(edited by zeeZ.5713)

Map API / Mumble Mashup

in API Development

Posted by: Mikaye.3548

Mikaye.3548

Here is a small Python script to obtain the raw X, Y and Z values (in meters from the center of the map) : http://www.pasteall.org/43417/python

Map API / Mumble Mashup

in API Development

Posted by: smiley.1438

smiley.1438

Resize and translate this point to fit into continent_rect (that’s the easy part) and boom, you can slap it onto the map.

http://i.imgur.com/ULRQjyd.jpg

Thats awesome!

Now make it so that it sends a POST request with the map_id/coords to a given URL (preferrably via https)…

(edited by smiley.1438)

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

https://gist.github.com/zeeZ/1fbad280c600d56f41be

And here are the icons, because kitten gist. https://dl.dropboxusercontent.com/u/6664141/icons.tar.gz

That’s as far as it’ll go, I guess.

Map API / Mumble Mashup

in API Development

Posted by: Healix.5819

Healix.5819

Here’s a .NET (2.0) C# example to read the coordinates.

Note that they negated the Z coordinate so that Z>0 is above while Z<0 is below. The actual Z coordinate, which is also what the API uses, is the opposite, where Z>0 is below.

X and Y are the same, where X>0 is east, X<0 is west, Y>0 is north and Y<0 is south from the central point (0, 0) which is usually the center of the zone.

Attachments:

Map API / Mumble Mashup

in API Development

Posted by: Parthis.2091

Parthis.2091

I would love to make something like this for WvW so we can see where the different guilds are operating. Would this be ‘legal’ to make? Just positions for our allies.

Yes. I discussed this scenario with the WvW team, and they’re totally OK with this usage of our APIs.

Their only requirement is that player positions should not be posted publicly, since obviously it would then be used by opposing teams.

… and the impact of an overlay that allows users to send data to other users (allies) stating “blob of 80 XX here”, “20 at my position”, etc etc in WvW? Essentially, a ‘spotting mechanic’ externalised from GW2?

Lots of potential here. Will we see a mechanism that is supported by the API or the client natively? Particularly these app ideas are allowed?

Commander Amayasu Gerani, Guardian.
Leader of [JDGE] on Gandara EU.
A GW2 API for Objective-C – http://tinyurl.com/durmandpriory

(edited by Parthis.2091)

Map API / Mumble Mashup

in API Development

Posted by: multivira.7925

multivira.7925

I would love to make something like this for WvW so we can see where the different guilds are operating. Would this be ‘legal’ to make? Just positions for our allies.

Yes. I discussed this scenario with the WvW team, and they’re totally OK with this usage of our APIs.

Their only requirement is that player positions should not be posted publicly, since obviously it would then be used by opposing teams.

… and the impact of an overlay that allows users to send data to other users (allies) stating “blob of 80 XX here”, “20 at my position”, etc etc in WvW? Essentially, a ‘spotting mechanic’ externalised from GW2?

Lots of potential here. Will we see a mechanism that is supported by the API or the client natively? Particularly these app ideas are allowed?

HAI JDGE

you know we want it.

Definitely gonna have some fun with this and see how we can make it work for us :P

Twirling – Pie Eating Guardian – MM – Gunnar’s Hold

Map API / Mumble Mashup

in API Development

Posted by: Killer Rhino.6794

Killer Rhino.6794

Having trouble getting this working in OS X. Cliff, can you verify that the Mac client is writing values to the shared memory object just as the PC version does during its update loop?

If I have Mumble open on my Mac, I’m able to at least get an empty linker object. I didn’t think having Mumble was necessary, but either way, the linker object isn’t being updated with any game values.

Creator of GW2Kit

Map API / Mumble Mashup

in API Development

Posted by: Cliff Spradlin.3512

Previous

Cliff Spradlin.3512

Lead Programmer

Having trouble getting this working in OS X. Cliff, can you verify that the Mac client is writing values to the shared memory object just as the PC version does during its update loop?

If I have Mumble open on my Mac, I’m able to at least get an empty linker object. I didn’t think having Mumble was necessary, but either way, the linker object isn’t being updated with any game values.

It definitely won’t work on the Mac, unless you can hook into the transgaming win32 layer somehow. That’s probably very difficult to do, if it’s possible at all.

Map API / Mumble Mashup

in API Development

Posted by: Varonth.5830

Varonth.5830

Couldn’t we just get a socket based connection in the future? :P

Could either be a TCP socket from the client listening on port X, and when a new TCP connection got established it will send the position data once per frame/second/movement…
What would be cool aswell would be an UDP socket, which we you send a small packet with informations about our programms UDP socket and perhaps a name, and from that moment on, the client just sends the movement update to that UDP socket, until either a stop from our side got send or the GW2 client is closed.

That would be so great, and should also work with the transgaming layer (I really hope that this emulator will allow socket based connections on localhost between emulated and native programm, but I could be wrong as I don’t have a Mac to test this).

Map API / Mumble Mashup

in API Development

Posted by: Terrasque.8735

Terrasque.8735

Got a bit inspired by this reddit thread and wrapped a simple C# component for reading this data in a configurable HTTP POST’er.

I also quickly (and with bad code I might add) made an example webserver that uses the data (was mostly for being sure that it actually works..)

Link : https://dl.dropboxusercontent.com/u/2401158/GW2%20Position%20Updater.zip – just edit the server.ini file to point at your project, read POST “data” form field, json decode, and off you go.

Map API / Mumble Mashup

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Couldn’t we just get a socket based connection in the future? :P

…advertising through Bonjour

This should support Android, iPhone/iPad, Windows, as well as Mac, over an established Zeroconf standard.

http://stackoverflow.com/questions/8354450/can-android-support-zeroconf-bonjour-over-bluetooth-how-about-tcp-ip

(edited by DarkSpirit.7046)

Map API / Mumble Mashup

in API Development

Posted by: Varonth.5830

Varonth.5830

Bonjour isn’t pre-installed on windows machines afaik.

And I would guess 95%+ of this userbase is running windows.
And you don’t have to search the network for most of the applications afaik.
That isn’t something I would call well established.

In over 90% of the cases I would say that the connection is to be found is on ‘localhost’.

Having a small TCP connection, which you can connect to shouldn’t be that hard to implement. It could use the exact same data the MumbleLink object has, just well, send over TCP/IP.

API documentation would then just has to include the amount of bytes per information packet, and which bytes are which data (assuming wchat_t = char16_t):

  • Byte 0-3 -> UINT32: packetLength
  • Byte 4-5 -> UINT16: packetType
    • In case of a packet type “MumblePosition”
    • Byte 6-9 -> UINT32 : uiVersion
    • Byte 10-13 -> DWORD : uiTick
    • Byte 14-17 -> float : fAvatarPosition[ 0 ]
    • Byte 18-21 -> float : fAvatarPosition[ 1 ]
    • Byte 22-25 -> float : fAvatarPosition[ 2 ]
    • Byte 26-29 -> float : fAvatarFront[ 0 ]
    • Byte 30-33 -> float : fAvatarFront[ 1 ]
    • Byte 34-37 -> float : fAvatarFront[ 2 ]
    • Byte 38-41 -> float : fAvatarTop[ 0 ]
    • Byte 42-45 -> float : fAvatarTop[ 1 ]
    • Byte 46-49 -> float : fAvatarTop[ 2 ]
    • Byte 50-X-> wchat_t : name[ 0-255 ]

Over such a connection they could send all sort of data, which could be pretty easily deserialised, because we would know how many bytes we have to read and what those bytes represent.
In case of a chararray we could just read in bytes (or 2 bytes in case of char16_t, 4 in case of char32_t) until we encounter a null (yeah definition of a null-terminated string).
We just have to check if 4 bytes are available. If so, we got the packet length.
Then we check if there are packetLength – 4 bytes available. If that is the case, then we know the packet is complete (could need some additional cases when the receivebuffer is full, but I want to keep it simple in this example).
So check the next to bytes to see what sort of packet we have.
Then just proceed to deserialise the packet depending on the packettype.

The connection setup is the least problem in our case^^

Map API / Mumble Mashup

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Bonjour isn’t pre-installed on windows machines afaik.

That should not matter as developers can package their apps with free Bonjour redistributables under the Apache 2.0 license.

https://developer.apple.com/softwarelicensing/agreements/bonjour.html

Not sure if that would be a problem for ArenaNet as I am not a legal expert, but it seems ok on the surface.

The problem with just using TCP on a user machine to serve out information, without something like Bonjour, is that you do not know for sure if a particular port that you want to use, is available. For example, if I am already running my own web server there would be a conflict with apps such as GWLink that expects port 80 to be free. And not all users are technical enough to reconfigure their own servers and ports.

(edited by DarkSpirit.7046)

Map API / Mumble Mashup

in API Development

Posted by: rodadams.5963

rodadams.5963

One thing this thread made me think about:

There’s also some data being exported to the Logitech G13 (and other Logi Devices), such as char name, map name, and map completion. Not 100% certain on what all is there, since I don’t own one, and am judging based on poorly filmed youtube videos.

However, if there’s useful info in there, one would think it could be extracted in a similar fashion. (Note: I’ve not looked at the G13’s API).

Just tossing the idea out there.

Map API / Mumble Mashup

in API Development

Posted by: Varonth.5830

Varonth.5830

Bonjour isn’t pre-installed on windows machines afaik.

That should not matter as developers can package their apps with free Bonjour redistributables under the Apache 2.0 license.

https://developer.apple.com/softwarelicensing/agreements/bonjour.html

Not sure if that would be a problem for ArenaNet as I am not a legal expert, but it seems ok on the surface.

The problem with just using TCP on a user machine to serve out information, without something like Bonjour, is that you do not know for sure if a particular port that you want to use, is available. For example, if I am already running my own web server there would be a conflict with apps such as GWLink that expects port 80 to be free. And not all users are technical enough to reconfigure their own servers and ports.

In case of a TCP connection that would be less of a problem.
First and foreall, nothing should require your port 80 unless you really install a webserver on it (how many users run a webserver on their machine o_o).

Port 80 is a well-known port and should just be used for the HTTP.
You should take a port from the range of 1024-49151. Those are registered ports and chances are, that they are not taken by any other application on a user machine.

Some of them are registered, so just take one from which isn’t listened here:
https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt

Once a new client tries to establish a new TCP connection to localhost:port the TCP handshake will establish a connection on one of the ephemeral ports anyway.

Bonjour helps the user on the configuration side when running in a network.
A service can put their service information up, and with that comes the IP address etc.
If another device now looks for services within that network, it just has to check the services available via Bonjour.
That will return a list of all sorts of services in that network, from printers to streaming services etc.
Yes GW2 could register a service there aswell, that way a user doesn’t have to configure the IP address etc.
And if the IP address changes, then the user doesn’t have to reconfigure all the data, because once the service starts, it will register with the most recent configuration, which gets deleted everytime the service shuts down.
As I said, this is mostly useful for applications running on other devices, like a secondary computer, a tablet or smartphone within the same network.
If the application is running on the same computer, then localhost or 127.0.0.1 will just do the trick perfectly fine.
The only upside of bonjour in that case would be, that the GW2 client could choose a free port from basically all available ports and register the service on that port.
Bonjour doesn’t seem to offer any help with that task (just took a quick look, and at least the port number must be defined when you register the service, which makes sense).
So in that case, Bonjour doesn’t help you if that port isn’t free. It helps you to configure all devices/service users in case that you have to switch your service port.
But if the only reason to use Bonjour is to make this particular thing of port configuration of a single application which will connect to localhost, then using such a massive system is oversized to say the least.
You know, in that case, a simple .txt file which gets generated once the listening port is established, which includes just the port number would essentially do the same.

Map API / Mumble Mashup

in API Development

Posted by: DarkSpirit.7046

DarkSpirit.7046

Bonjour isn’t pre-installed on windows machines afaik.

That should not matter as developers can package their apps with free Bonjour redistributables under the Apache 2.0 license.

https://developer.apple.com/softwarelicensing/agreements/bonjour.html

Not sure if that would be a problem for ArenaNet as I am not a legal expert, but it seems ok on the surface.

The problem with just using TCP on a user machine to serve out information, without something like Bonjour, is that you do not know for sure if a particular port that you want to use, is available. For example, if I am already running my own web server there would be a conflict with apps such as GWLink that expects port 80 to be free. And not all users are technical enough to reconfigure their own servers and ports.

In case of a TCP connection that would be less of a problem.
First and foreall, nothing should require your port 80 unless you really install a webserver on it (how many users run a webserver on their machine o_o).

Port 80 is a well-known port and should just be used for the HTTP.
You should take a port from the range of 1024-49151. Those are registered ports and chances are, that they are not taken by any other application on a user machine.

Some of them are registered, so just take one from which isn’t listened here:
https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.txt

Once a new client tries to establish a new TCP connection to localhost:port the TCP handshake will establish a connection on one of the ephemeral ports anyway.

Bonjour helps the user on the configuration side when running in a network.
A service can put their service information up, and with that comes the IP address etc.
If another device now looks for services within that network, it just has to check the services available via Bonjour.
That will return a list of all sorts of services in that network, from printers to streaming services etc.
Yes GW2 could register a service there aswell, that way a user doesn’t have to configure the IP address etc.
And if the IP address changes, then the user doesn’t have to reconfigure all the data, because once the service starts, it will register with the most recent configuration, which gets deleted everytime the service shuts down.
As I said, this is mostly useful for applications running on other devices, like a secondary computer, a tablet or smartphone within the same network.
If the application is running on the same computer, then localhost or 127.0.0.1 will just do the trick perfectly fine.
The only upside of bonjour in that case would be, that the GW2 client could choose a free port from basically all available ports and register the service on that port.
Bonjour doesn’t seem to offer any help with that task (just took a quick look, and at least the port number must be defined when you register the service, which makes sense).

That is the problem with ports isn’t it? Every dev thinks that chances are, it would be unused and hardcode their apps to use the same ports.

Not to mention the ugliness of dealing with ip addresses if you want to run your app on a different machine.

So in that case, Bonjour doesn’t help you if that port isn’t free. It helps you to configure all devices/service users in case that you have to switch your service port.
But if the only reason to use Bonjour is to make this particular thing of port configuration of a single application which will connect to localhost, then using such a massive system is oversized to say the least.
You know, in that case, a simple .txt file which gets generated once the listening port is established, which includes just the port number would essentially do the same.

EDIT:
Now that I am back in my hotel, I can type more on my laptop than I could when I was on my iphone.

With Bonjour, if the port is not free, the server simply increments the port number until it finds a free port. The Bonjour service would be used to report to the client what the updated port number would be so the client can still find the service regardless of the service port number which can differ each time. I may not have a web server running before installing the ArenaNet service, but I may still decide to install a web server in the future and as a user, I don’t want to have to resolve any port conflicts ever. Bonjour is designed to do away with such unneeded limitations.

Requiring apps to run on the same machine is not acceptable as that would exclude mobile devices like Androids, iPhones/iPads, etc from running apps to interface with the proposed ArenaNet service. Excluding ArenaNet services from the huge and ever growing mobile space would defeat the purpose of them releasing APIs in the first place.

(edited by DarkSpirit.7046)

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

One thing this thread made me think about:

There’s also some data being exported to the Logitech G13 (and other Logi Devices), such as char name, map name, and map completion. Not 100% certain on what all is there, since I don’t own one, and am judging based on poorly filmed youtube videos.

However, if there’s useful info in there, one would think it could be extracted in a similar fashion. (Note: I’ve not looked at the G13’s API).

Just tossing the idea out there.

As far as I remember it just provides images with the information on it, no machine readable data.

Map API / Mumble Mashup

in API Development

Posted by: barrucadu.3168

barrucadu.3168

HAI JDGE

you know we want it.

Definitely gonna have some fun with this and see how we can make it work for us :P

Have you started working on this? A WvW overlay would be a really useful tool, and I’d love to make such a thing.

Here are some thoughts for an initial implementation:

- Website (easier to implement) which shows the map of interest and the positions of all players, updated every second or so.
– Such displays (“rooms”) have a name and are password protected. Players run a small client where they enter the room name and password, and it proceeds to stream their position to the server.
– A player can create a new room by simply joining one which doesn’t yet exist.
– Checkbox in the client which a player can toggle to display a commander icon over their position on the online map (unless commander status could be extracted from the game in an allowed way, somehow)

Further developments after this:

- In-game overlay
– Support for non-WvW maps
– Support for multi-map rooms
– Display events happening on the map

For the client-side part, I’d suggest a C# program, as that’s obviously made for graphical Windows stuff. For the server, Python, as it makes a lot of things very simple – although, the server itself should be fairly small, little more than a registry of player positions with a pretty JavaScript front-end. To encourage participation from more people, development should be done via GitHub, and the de facto styles for each language followed (so, PEP8 for Python).

(edited by barrucadu.3168)

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Here’s my very crude implementation of the whole thing, in Python:
https://github.com/zeeZ/gw2-location

Stuff “compiled” into executables:
https://dl.dropboxusercontent.com/u/6664141/gw2/location_dist.zip

My current version of the map:
http://dl.dropboxusercontent.com/u/6664141/gw2/map.html

If you point the sender at local.ctrl-alt-chainsaw.net port 8888 it should show up, unless I shut it down or it crashed :P


Should probably explain this a little more:

location_sender prepares and attempts to read link data from memory. Once it finds something, it takes position, face direction, map and character name, converts position to world map coordinates based on a json call and face direction to degrees, and tries to send that data as a base64 ecnoded JSON string to a WebSocket server.

location_distributor provides the WebSocket for that information, makes sure it’s a little bit sane, and provides another WebSocket that keeps pushing a json list of everyone’s location data

The map as linked above subscribes to that and, hopefully, shows where everyone is.

Problems right now:

  • sender doesn’t reconnect on its own, does no check if the game is still updating data (uiTick) and will just keep sending forever.
  • distributor doesn’t do a lot of sanity checking besides stripping anything but the information we want from the json it receives. Players are only removed once the sender disconnects, even if it stops sending updates
  • map is very basic and hackish.

I welcome anything you can tell me about my code

(edited by zeeZ.5713)

Map API / Mumble Mashup

in API Development

Posted by: Ohlala.4205

Ohlala.4205

I’m working on a Guild bounty map which includes bosses paths and real time position for your guildies. It’s a WIP.

You just have to download a small program which will transfer your position to the map here : http://gw2.maximeloizeau.fr/
The program : http://gw2.maximeloizeau.fr/GW2Link.zip
It’s made by another person, you can find the code here : https://github.com/Blaaguuu/GW2Link/tree/master/GW2Link

Coming features:
- Tags : you specify a tag (with or without a password) and you can see everyone with that tag (useful for a guild)
- Notifications : I was thinking of notifications when, for example, you’re next to a jumping puzzle
- Events

There’s also a desktop app just showing the app, but it’s an early early alpha : http://gw2.maximeloizeau.fr/GW2BountyOverlay.zip

Note: I’m going to release the code sometimes but for now it’s quite ugly.
Note²: It’s in french because I was showing it to my guildies, international version will come.

I’m looking for advices, suggestions, etc, so don’t hesitate !

Map API / Mumble Mashup

in API Development

Posted by: barrucadu.3168

barrucadu.3168

Perhaps we could all collaborate on a really great player/event/guild tracking and monitoring system using a combination of this data and the GW2 API. GW2Link looks like a nice client-side tool which we can use, and so the bulk of the work would be in making a nice website/overlay.

edit: Actually, a really nice starting point would be to make an API where you can request the (optionally password-protected) map and coordinates of a named character. If such an API were publicly accessible and fairly standardised (as GW2Link seems to be becoming the standard client-side tool), we’d solve a massive problem of interoperability and data access.

Don’t have time to work on this now, but I’ll look into it later.

(edited by barrucadu.3168)

Map API / Mumble Mashup

in API Development

Posted by: thebigredone.1269

thebigredone.1269

Perhaps we could all collaborate on a really great player/event/guild tracking and monitoring system using a combination of this data and the GW2 API. GW2Link looks like a nice client-side tool which we can use, and so the bulk of the work would be in making a nice website/overlay.

edit: Actually, a really nice starting point would be to make an API where you can request the (optionally password-protected) map and coordinates of a named character. If such an API were publicly accessible and fairly standardised (as GW2Link seems to be becoming the standard client-side tool), we’d solve a massive problem of interoperability and data access.

Don’t have time to work on this now, but I’ll look into it later.

I agree that we should have more people work together for one awesome project instead of several less awesome ones.

I would love to help out! Have a server available which should be able to handle the development stages at least.

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

I’m updating my implementation:
location_sender sends its updates to websocket /publish/key
map connects to websocket /players.json/key and will receive location updates for anyone using key

I’m using that inconsistency so I don’t get confused between the two :P

Here’s my very crude implementation of the whole thing, in Python:
https://github.com/zeeZ/gw2-location

Stuff “compiled” into executables:
https://dl.dropboxusercontent.com/u/6664141/gw2/location_dist.zip

My current version of the map:
http://dl.dropboxusercontent.com/u/6664141/gw2/map.html

If you point the sender at local.ctrl-alt-chainsaw.net port 8888 it should show up, unless I shut it down or it crashed :P

(edited by zeeZ.5713)

Map API / Mumble Mashup

in API Development

Posted by: KhailaSulyn.9620

KhailaSulyn.9620

When testing to see that my calculations with the Mumble coordinates were correct, I noticed that some maps have offsets. For example, I went to a waypoint in Kessex hills, and the Mumble coordinates were the same as the waypoint coordinates. In Lion’s Arch, I was somewhat east of the waypoint coordinates (even though I was standing on top of the waypoint in game), and in Caledon Forest I was northeast of the coordinates. Within a zone, the offset seems to be consistent, so I can easily write a translation map for each zone, but I’m curious if other people have noticed the same?

Map API / Mumble Mashup

in API Development

Posted by: zeeZ.5713

zeeZ.5713

Within a zone, the offset seems to be consistent, so I can easily write a translation map for each zone, but I’m curious if other people have noticed the same?

I think most location translation is going on here

I notice Dredghaunt Cliffs and Caledon Forest are way off using that formula, but all other maps I visited were spot on. Either way I think we should split discussions out of this a bit

Map API / Mumble Mashup

in API Development

Posted by: Gronfir.6170

Gronfir.6170

The original Mumble idea sound great and should also be possible for TeamSpeak3 and Ventrilo using the position data.
A TS3 plugin should be relatively easy using its 3d-sound toolset in the TeamSpeak3 plugin API and I believe there is a similar thing for Ventrilo.

I’m definitely going to look into i when I get the time. Finaly no more conversations like:
I’m downed. Where. Here. Where is Here. Here!

Map API / Mumble Mashup

in API Development

Posted by: Wothor.4781

Wothor.4781

I’m having that in closed beta since a while in my ts3plugin and it will be released very soon. Takes a short while to get used to it, but then it becomes natural There is no plugin API for vent afaik.

(edited by Wothor.4781)

Map API / Mumble Mashup

in API Development

Posted by: Gronfir.6170

Gronfir.6170

Had a glimpse at it in the morning, the reference plugin is a bit of an overkill, but it looks fairly simple. Feel free to share your work wish me anytime
As a little side questions is GW2 only mapping your characters position or also those of your teammates? Because as far as I can see every single player needs to adjust the other players relative to him, so you would otherwise need to share the positions between the players.

Map API / Mumble Mashup

in API Development

Posted by: barrucadu.3168

barrucadu.3168

I agree that we should have more people work together for one awesome project instead of several less awesome ones.

I would love to help out! Have a server available which should be able to handle the development stages at least.

Excellent! I also have a server we can use. I haven’t had time to start working on this yet, but should be able to do so this weekend. I’ve figured out how best to implement an API to request player positions (which third-party tools can then build off), and hope to have a working prototype by the end of the week.

Had a glimpse at it in the morning, the reference plugin is a bit of an overkill, but it looks fairly simple. Feel free to share your work wish me anytime
As a little side questions is GW2 only mapping your characters position or also those of your teammates? Because as far as I can see every single player needs to adjust the other players relative to him, so you would otherwise need to share the positions between the players.

This position-sharing is exactly the problem I plan to tackle. I have in mind an API where you can request the position of a player, the positions of all players (running the client, ofc) on a map, and the positions of all players with a given tag (which may be a guild tag). Players will optionally be able to make their data password-protected.

Map API / Mumble Mashup

in API Development

Posted by: Wothor.4781

Wothor.4781

Which is why the ts plugin code went not-so-simple very fast However, it’s stable and just hasn’t been in public yet since I’m sorta paranoid about my personal QA’ing with the limited time I have for this. In this context however a server is already available (with new funny stuff to work around like flood protection setting), the ts server, sorta putting it out of the equation for now.

I’m not that big on all those fancy new webtech yet, but I had a glimpse on meteor js for another project, could imagine it might be attractive for this, looking at the parties example.

(edited by Wothor.4781)

Map API / Mumble Mashup

in API Development

Posted by: Urrid.4593

Urrid.4593

I am not a huge fan of VOIP programs but this would change WvW overnight.

Coral -Mesmer- Omnomnivore and TC’er.

Map API / Mumble Mashup

in API Development

Posted by: smiley.1438

smiley.1438

GW2 uses inches (don’t ask)

Y U NO USE METRIC SYSTEM?

(sorry, i couldn’t resist…)

Map API / Mumble Mashup

in API Development

Posted by: smiley.1438

smiley.1438

€: huh, the post i replied to is gone… :o well you could figure what the complaint was ;D

Where exactly is the difference between being in mumble or teamspeak with 50 people and/or seeing them on the map. Do you think everyone who plays serious (cough) wvw would reveal his position to the enemy? I’m working on a tool for exact this case: when you’re in a given guild or ally, you’ll see your members positions – you won’t see the enemy and the enemy won’t see you.

(edited by smiley.1438)

Map API / Mumble Mashup

in API Development

Posted by: Wothor.4781

Wothor.4781

Considering I was sure such would be coming in february, it took quite a while^^