How to Improve Mesmer portals: Add Arrows!
Being a closed source game, it is near impossible for those not directly involved with its development to know what type of beast we would be dealing with. To say “All you have to do is X, and you will see Y as a result” would be ill-advised, and I will not be doing that. I will, however, be speculating and offering general ideas about potential implementation/integration.
Let’s begin some speculation!
I believe that when a portal is placed down, it copies the coordinates of the player who dropped it at the time the skill is activated. The portal location is stored on the server for a limited time using an instruction set of either a quaternion/Euler equation (a mechanic used to represent coordinates on a 3D/4D plane, rotation, angle, in a free-floating space) or a much simpler XYZ coordinate type system. (I used to believe the latter was the choice of implementation, but over time, I found more evidence supporting the prior). During this time, this information is passed to all of the clients that meet the criteria for being able to view it.
Once the other side of the portal is placed, similar information is stored, and then sent, and a passage is created letting players traverse through these two portals. “But wait, what happens behind the scenes?” I believe it can be one of two things:
1. Point A (creation point) and point B (exit point) are linked and flagged in the system with a label. The information of their locations are stored in memory and sent to eligible clients. In this case, the information is broadcasted to qualified clients before activation.
2. Point A (creation point) and point B (exit point) are linked and flagged in the system with a label. The information of their locations are stored in the server’s memory and wait for a player to press F to use them. In this case, after they are used, their new location becomes known and the user is teleported.
In scenario 1, overlaying arrows onto portals would most likely be easiest. Scenario 2, it might not ever happen at all. The client must know the information before it can draw the arrow in the proper heading.
I’d like to talk about implementation. “Oh yeah, point A, point B, this shouldn’t be too hard to do” you might say. Although it doesn’t sound like much to implement, there are changes that would need to be made to existing systems before it could work. Referring back to my scenarios above, number 1 makes it easier to implement, but easier doesn’t necessarily mean easy. The existing method of determining placement of the portals greatly governs what math needs to be used to calculate the heading of portals.
I’ve mentioned quaternions and Euler angles, and chances are that if you needed to google what they are, then it only reinforces what I am about to say. Quaternions are… complicated. If this is the system currently used by the movement/positioning systems, then my proposal might fall flat based on complexity alone. I also mentioned a simpler XYZ axis positioning system might be used. If this is the system used, it’s easier.
For the sake of keeping what little readers of this post I still have left, I will go into the math of quaternions and Euler angles later on. I’ll be sure to clearly label it so you can skip over it if you so choose. I might use spoilers; this is yet to be determined. So, in the meantime, let’s talk XYZ!
XYZ, (properly named the Cartesian coordinate system) gives you values to represent a location on a 3 dimensional plane. First, we need to determine the location of where a portal is on a map. Later we’ll talk about the connecting portal. For arguments sake, let’s say we’re only interested in X and the Y, because having a scenario where an arrow pointing straight up might be intrusive (no matter the size) and having it pointing straight down might…umm… not work out too well. Inherently, having the lack of the Z coordinate adds a bit of mystery….ghostly “oOoOOoooOoOOoO” sounds. Not to mention adding a Z coordinate changes the formula entirely, complicating things.
How do we determine the heading between two separate X and Y coordinates? The day after I left college (last year), I’ve lost a lot of my math skills (those useless, useless, math skills), but I believe to get the heading from point A to point B (and back again) you would apply this formula:
Inverse Tan((y2 – y1)/(x2 -x1))
This formula will output the angle which the two points bear.
(I may or may not be able to add more details later, elaborating on further functions and utilization of this information, my schedule is super SUPER crazy. I appreciate any and all input or comments about this, ranging from “You’re wrong, here’s what you do” to “I like where your head is at, but here is a suggestion”. No negativity without any just reasoning, please. I am posting this because I have been sitting on this for a month now, and it’ll just keep sitting indefinitely otherwise, as is.)
Quaternions and Euler angles use rotations in order to determine the heading, positioning and starting orientation in a 3d/4d floating point plane of existence. Think, aircraft flight, or underwater submersibles. All of this data is processed through several types of formulas, all with their own way of outputting the data, but the principles remain similar.
To determine the rotations, the formula R = X(a)Y(b)Z(y) is usually used.
To find the space between them is easy, but to find the heading is much more complicated because you just added a bunch of new variables.
(Again, I may or may not be able to add more details later, elaborating on further functions and utilization of this information, my schedule is super SUPER crazy. I appreciate any and all input or comments about this, ranging from “You’re wrong, here’s what you do” to “I like where your head is at, but here is a suggestion”. No negativity without any just reasoning, please. I am posting this because I have been sitting on this for a month now, and it’ll just keep sitting indefinitely otherwise, as is.)
“Oh, so you’ve got it all figured out, huh?” No, I don’t. I do, however, believe that this is a good starting point. As I’ve mentioned before, this is in no way the only solution. This will need to be fine-tuned and carved down for it to be implemented.
(More to come?)
Thanks for reading, I hope someone who knows more on the subject could expand on my post and provide some interesting ideas. A developer response would be fun to read as well, as I am seriously curious about the feasibility on this subject!
Sounds complicated to do, but it would be very nice for WvW.
And while we’re at it, why not add a timer and range indicator to the portal skill <.<
Thanks for the reply. The timer portion, without a doubt, would be an easier implementation I’d think. I don’t think I fully understand what you mean by range indicator. Do you mean more of a “Too far to drop” or a “this is how far between existing portals”?
I mean a “You are out of range now” indicator. It is the most annoying thing when you drop portals and they don’t work.
Pudding
char15
lvl 80 Ele
KnT Commander
And here I thought the portal would accept enemy projectiles.
Delayed content is eventually good. Rushed content is eternally bad. ~ Shigeru Miyamoto
And here I thought the portal would accept enemy projectiles.
Hah, sorry to disappoint. Maybe you could start that thread and then place a link to it in this thread, I won’t mind.
(edited by Ayusaki.6739)