Showing posts with label gravitation. Show all posts
Showing posts with label gravitation. Show all posts

17 March 2019

Guild Wars 2: Tyria's Gravity

Finally, Tyria's gravity has been calculated. Now we can compare to other planets' gravities and maybe draw some new conclusions from it? Anyways we left off by figuring out that Guild Wars 2 does indeed seem to have gravitation.

Next Steps

So, if we assume Guild Wars 2 does indeed have gravity - where things seem to point to - then we can calculate it. Calculating gravity is the same as acceleration. Acceleration is often related to F = m * a. Unfortunately, we know neither F nor m. There's another formula as well though. Acceleration is the change of velocity over time. So, basically a = ∆v / ∆t. Next up is another problem. We don't know the velocity of our character. It's not shown in any kind of way in Guild Wars 2. This means we need to calculate it as well. For this, we have a formula as well. The time it took to get from a position to another or the distance passed in a time frame. That's v = ∆x / ∆t.

The Experiment


Okay, so what we need to do is calculate the velocity at two different points of time that are still related to each other (e.g. different points of time in one fall). To get the velocity we need to calculate how long we take to fall a certain distance. We obviously need some way to tell the time, a watch could do this, however, the fall speed is too great to use a stopwatch this rapidly. Thusly I'm gonna record the fall on video and use the footage and frames to measure the fall speed. As a distance, I'm gonna use the Necromancer's staff traps that provide a 240 unit radius or 480 unit diameter. As a drop, I'm gonna use the one at the Kormir High Road.


To do the experiment I need to start the recording drop down while placing my marks on the wall and then get up as fast as possible, position the camera and jump down. It only took me one try even though it sounds quite stressful.

Analysis of the Footage

Next up, we're gonna analyze the footage. Specifically, we want to mark the two frames that meet the respective points well enough. Then we take the time between those.

As a reminder to calculate the gravitation we use the formula a = ∆v / ∆t with ∆v = v2 - v1 with v = x / ∆t with x = pos2 - pos1 and t = t2 - t1

If we combine everything to a big formula we get: 
a = ((pos2v2 - pos1v2) / (t2v2- t1v2)) - ((pos2v1 - pos1v1) / (t2v1 - t1v1)).

Screenshot pos1 of v1
The first mark or first velocity v1 we reach pos1 after about 30 seconds of the fall. When using Vegas Pro 15 - which was available last year during a Humble Bundle :P - the time is given in hours, minutes, seconds and 1/30th of a second using the format HH:MM:SS:ss. We convert the next smaller unit to seconds by dividing it through 30 and multiplying the result with 100. E.g. 30 / 30s = 1s or 9 / 30 = 0.30s. This point in time in the video is t1 is 29:24, so 29s + 24 / 30s = 29.80s. The second position pos2 is reached at 30:08 which is 30s + 8 / 30s = 30.27s. This means that ∆t = t2 - t1 so 30.27s - 29.8s = 0.47s. We already know the distance as it is the diameter of the staff mark which is
Screenshot pos2 of v1
480 units. Now we can calculate the velocity via v1 = ∆x / ∆t. So our first velocity v1 is 480u / 0.47s = 1021.28u/s. 

Screenshot pos1 of v2
Now on to the second one. We reach this point t1 in the video at 31:01. That's 31s + 1 / 30s = 31.03s. The second point t2 at the end of the mark is reached at 31:13 equivalent to 31s + 13 / 30s = 31.43s. Calculating the delta for v2 we get ∆t = 31.43s - 31.03s = 0.39s.

With this we can calculate the velocity v2 which is 480u / 0.39s = 1230.77u/s.

Screenshot pos2 of v2
At this point I must mention the difference between the first delta time and the second delta time is ∆t = 0.47s - 0.39s = 0.08s. Since my Guild Wars 2 runs at ~30 frames per second and my recording at 60 frames per second we are still limited to the ~30 frames per second from Guild Wars 2. One frame thus, as represented by Vegas Pro is 1/30th of a second. This means that one frame is equal to 1 / 30s = 0.1s. This means the difference between the two delta's could just as well be a measurement error and thus would require more research.

For the rest of the post, I'm gonna assume this is not a measurement error as such I'm gonna continue.

The Finale

Now that we have the two velocities and we can calculate the acceleration. As a reminder, we're gonna calculate the acceleration using a = (v2 - v1) / (t2 - t1). For t2 and t1 we're gonna use the start points pos1. Filling out the variables we get a = (1230.77u/s - 1021.28u/s) / (31.03s - 29.80s) = 209.49u/s / 1.23s = 170.32u/s². Now to convert this to something that's more familiar to us and less useful for theorycrafting (heh :D) using the conversion from units to metric and to feet:

in metric: 170.32u/s² * 2.52cm/u = 429.21cm/s² | 429.21cm/s² / 100 = 4.29m/s²
in feet: 170.32u/s² * 0.083ft/u = 14.14ft/s²
in mph: 14.14ft/s² / 5280ft/mile * 3600 = 8.64mph

I have a small little book with formulas and data in it that helps students in exams. Let's look at which planet would equal this gravitation. 

Earth with a g-factor of 9.81 is well known. the nearest ones below are Merkur with 3.7 and Mars with 3.71.

Thus we've got us a planet with a little higher gravitational constant than Merkur or Mars.

Now if someone can do the drop with 60 frames per second it would be appreciated. Until disproven... I rest my case. Have a good day/night. 

14 March 2019

Guild Wars 2: Fall Speed in Tyria

Since the post about the velocity in Guild Wars 2, I wanted to make one about the gravitation as well as the mount speed. Honestly, I just remembered the one about the mount speed while I started writing this haha! Anyways I sat down and sought a nice position to do my calculations.

Calculating Gravitation

There are a few ways to calculate gravitation. First things first we need to make ourselves clear that for our purposes gravitation is nothing more than a force that causes acceleration. One way to calculate acceleration is with the formula F = m * a. We don't know the weight or mass of our character nor if different races and character sizes play a role. Thus we need a different way. Another option would be
a = Δv / t. For this formula, we only need the velocity and the time. To get the velocity we can use the formula v = d * t. We can get the distance d using in-game measurements. For the time we can use a mobile phone or some other way to use a stopwatch. To get the velocity delta we need two spots, one with a long fall and one with a shorter fall or one that is long enough to perform two calculations on it.

Finding the Right Spot

An ideal spot would feature the following attributes:
  • vertical wall
  • nothing in the way during the fall
  • easy to measure
I've decided to scout Divinity's Reach for spots and have decided for the one at the Plaza of Kormir and the other one is further up the Kormir High Road.

Guild Wars 2 Screenshot: Fall distance at Plaza of Kormir
Guild Wars 2 Screenshot: Fall at the Kormir High Road

Measuring the Walls

Guild Wars 2 Screenshot: Measuring Concept,
Plaza of Kormir
To measure the walls I used the skills and skill markers. Originally I've been using the Scourge Summon Meat Scepter- err I mean Flesh Worm is 1/4 of the staff mark and 1/3 of the shade radius. This means it has a 60 unit radius. The only issue that was left is that the indicators are a little bit off on some walls. The first wall took about one staff mark, one shade and half of the worm indicator. This is a fall of 480 + 360 + 43 = 883 units.
shades which feature a 180 unit radius and the staff trap skills which feature a 240 unit radius instead. Doing some experimentation I figured out that the indicator of the Summon Meat Scepter- er... Flesh Worm has a 60 units radius.

The second wall doesn't fit into a picture and was much harder to measure due to the marks disappearing after a certain time. It was 5 marks high and a little bit more than the Summon Flesh Worm indicator. This makes a distance of 480 * 5 + 120 + λ. For my calculations, I've set λ to 15. This gives me a distance of 480 * 5 + 120 + 15 = 2535 units.

Thought Process

If Tyria has gravity, the velocity at the longer fall should be higher than the velocity at the shorter fall. Both drops have a distance delta of 2535 - 883 = 1652 units. 

Possible Outcomes Include

a) The velocity of the first drop is significantly lower than the velocity of the longer second drop.
In this case there is an acceleration thus enabling us to further research. When we would do calculations on another planet or place in real life this would be the obvious result. In the case of game development games may not necessarily have acceleration and use a fixed fall speed.

b) The velocity of the first drop and the velocity of the longer second drop are similar enough.
There may always be errors in these empirical calculations. Errors during measurement specifically. Nonetheless if they're equal enough this means the falling speed is constant and the acceleration is strong enough to reach the terminal velocity in an instant.
c) The velocity of the first drop is significantly higher than the velocity of the longer second drop.
Honestly, I have no idea what's going on if this would be the case.

Measuring the Fall

 All we have to do at this point is to place our character, prepare the stopwatch and throw ourselves into our demise. Don't forget to start the stopwatch when the character starts to fall.

Due to the high chance of errors from reaction time I made 10 attempts. This table features all attempts and their resulting velocity in units.

MeasurementShort Drop
(883 units)
Velocity
(883 units)
Long Drop
(2535 units)
Velocity
(2535 units)
1.
0.97s
  910.31u/s
2.51s
1009.96u/s
2.
0.91s
  970.33u/s
2.39s
1060.67u/s
3.
0.97s
  910.31u/s
2.53s
1001.98u/s
4.
0.87s
1014.94u/s
2.67s
949.44u/s
5.
0.88s
1076.83u/s
2.66s
953.01u/s
6.
0.82s
  939.46u/s
2.62s
967.56u/s
7.
0.93s
949.46u/s
2.56s
990.23u/s
8.
0.96s
919.79u/s
2.67s
949.44u/s
9.
0.90s
981.11u/s
2.51s
1009.96u/s
10.
0.85s
1038.82u/s
2.61s
971.26u/s

Next up we take the average of the velocity which is 973.84u/s for 883 units and 986.35u/s for 2535 units. Now let's convert them to values that tell us more. For this, I'm using the same conversion I've used in all my posts. (1 unit = 2.52cm; 1 unit = 0.083ft)

883 unit velocity is

  • 973.84u/s * 2.52cm/u = 2454.08cm/s which is 2454.08cm/s / 100 = 24.54m/s
  • 973.84u/s * 0.083ft/u = 80.83ft/s
1260 unit velocity is

  •  986.35u/s * 2.52cm/u = 2485.60cm/s which is 2485.60cm/s / 100 = 24.86m/s
  • 986.35u/s * 0.083ft = 81.87ft/s.

Conclusion

I'm gonna call it a day here. The values seem to fall into either case a or case b. Now the question is whether or not it's a measurement error or if there is gravitation. Though if there is gravitation we can calculate it by finding a drop that's high enough on which we can do two separate time stops at two different points. That sounds difficult but it might work and even easier if done on video. So I'm gonna look into that in the next days. Until then.. stay tuned and maybe you find something else from me that's interesting. ^^



28 January 2019

Guild Wars 2: Which Height is Deadly?

A few days ago I somehow ended up talking about falling damage with someone. He mentioned that it is known at which falling height (in-game units) it is deadly. What a snarky little detail. Wouldn't it be interesting to know how much it is in a more common unit? Well, let's do that and see what we can deduct from it!

In-Game Falling Death Data

On the page, for falling damage on the official Guild Wars 2 wiki, we can find a nice little graphic that shows how much %-health you lose respectively to which height you fall from. Due to copyright, I can't post it here so I have to describe it. It shows the %-health loss in a step of 10 starting from 0% and going to 180% and the distance in in-game units with a step of 100 going from 0 to 1500. It marks anything starting with 1500 as deadly even with fall damage reduction trade and 1250 units or higher as deadly without falling damage trait.[1]

Conversion

A long time ago I already did a conversion from units to meters and feet. I'll leave this link to the post so you can check on it if you don't remember.

The conversion was 1 Unit is equal to 2.52cm or 0.083ft.

Now we just have to put in the numbers and do the calculation...
a) with falling damage reduction: 1500units * 2.52cm/unit = 3780cm or 37.8m.For feet it's 1500units * 0.083ft/unit = 124.5ft
b) without falling damage reduction: 1250units * 2.52cm/unit = 31.5m.For feet it's 1250units * 0.083ft/unit = 103.75ft
Well... that sounds ridiculous. I don't have anything to compare it to though. So let's see for a real-life equivalent to compare.

Most Reliable Resource

Looking through the interwebs there are a lot of stories about huge falls and indecisiveness of accurate numbers. Though according to a paper of NASA the fatal speed seems to be 16m/s on hard surfaces.[2] Assuming the acceleration due to gravitation a to be 9.81m/s² and the formula being V = a * t. The total time of the fall would be t = V / a, thereby 16m/s / 9.81m/s² = 1.63s. 

To calculate the distance of the fall we have to put this into the following formula: d = 1/2 * g * t²
Thus our falling distance is 1/2 * 9.81m/s² * (1.63s)² = 13.03m. (14.75ft)

Can We Calculate the Gravity on Tyria?

To do that we would need to know how long it takes to fall a certain distance or how long it takes to fall 1250, additionally it wouldn't be accurate enough compared to simply calculating the falling speed and acceleration between reaching two points during a free fall.

Nonetheless, it's still interesting to see that it takes twice the height in Guild Wars 2 to die compared to real life. Float away Sapient Beings, float away! 

[1] https://wiki.guildwars2.com/wiki/Damage#Falling_damage
[2] https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19930020462.pdf

About Me

My photo
I'm a B.Sc. Games Engineer and I created this blog to share my ideas, theorycrafting, thoughts and whatever I'm working on or doing.