Blasters in Angry Birds Star Wars

It was just a matter of time, wasn’t it? You knew that at some point I had to look at Angry Birds Star Wars. Why now? Well, I didn’t want to look at any Angry Birds physics until I finished looking at friction in Bad Piggies – but I could only hold out for so […]
Image may contain Transportation Vehicle and Soil
Screen shot from Angry Birds Star Wars

It was just a matter of time, wasn't it? You knew that at some point I had to look at Angry Birds Star Wars. Why now? Well, I didn't want to look at any Angry Birds physics until I finished looking at friction in Bad Piggies - but I could only hold out for so long. Oh, also you can play Angry Birds Star Wars (ABSW) for free on Facebook.

What's different in ABSW? It's essentially the same as the normal Angry Birds except that the birds are now cast as Star Wars characters. This means they have different "powers". In particular, the yellow bird (named Chuck) is cast as Han Solo. Instead of increasing his speed when you tap the screen, he fires three blaster bolts. It's the blaster bolts that I find interesting.

Star Wars Scale

Before I get to the blasters, let me look at the scale of the game. I did this before with the normal game, but I need to make sure things still work the way I expect. Here is a plot of Chuck's vertical position on a particular level. You can get his data by making a video (screen cast) of the game and then using video analysis. I prefer Tracker Video Analysis (free).

Data Tool

By setting the length of the slingshot to 4.9 meters, I get a constant vertical acceleration of about 9.5 m/s2. That's pretty close to the same acceleration and scale in the original Angry Birds game that I found previously.

Sure, you might argue that my assumptions from my previous analysis are no longer valid. I had assumed that the birds were on the surface of Earth and now they are on Tatooine where the gravitational field could be different. Ok, that is a valid point. However, if you have watched the Star Wars movies as much as I have you would know that everything seems to move as though it were on Earth. I will assume that the gravitational fields (and thus the vertical acceleration) on Tatooine and Earth are the same. Anyway, it doesn't really matter. I am going to be looking at speeds of things. If the scale is off a little bit it will be fine.

How Fast Is a Blaster Bolt?

Let's start with something simple. I will shoot the yellow Han Solo bird and have it shoot the blaster. Pretty simple right? Here is a plot of the horizontal position vs. time for three different shots.

Data Tool

Do you see what I see? I expected a constant horizontal velocity for the three bolts. However, it appears that the speed of all three bolts increases after some time. Is that odd? Yes. Before we get too carried away, I suspect it is a frame rate problem. Here is a plot of the x-position of the bird during the same time.

Data Tool

A normal bird (without firing blaster bolts) would have a constant horizontal velocity. This one slows down while the shots are fired and then speeds back up. Why do I think this is a game problem? Here's why. This is a trajectory plot (x vs. y) for the bird and the three shots.

Tracker

Nothing looks crazy here now that time isn't in the plot. Let me play around with my video and see if I can get a video without a changning frame rate (if that's what is actually happening).

After playing around a bit with both the Facebook version of the game and the one on my phone, it seems this is a real effect and not something created from my screen capture. I guess the game goes into "slow motion mode" when the bird shoots the blaster. Ok, I can handle that. This just means that I will just look at blaster speeds AFTER the bird shoots.

If I fit a linear function to the x-position of the blaster plots, I can get the x-velocity for each one. I can also do something similar for the y-velocity. To find the magnitude of the velocity, I just use the following:

La te xi t 1

Using data from the three shots, I get the following speeds: 41.18 m/s, 44.11 m/s and 52.09 m/s. I thought they would be the same, but now I'm not so sure. How about more data? More is better, right? Here are the speeds of 16 more shots.

Blotspeed.png

These shots have an average value of 38.49 m/s with a standard deviation of 5.86 m/s. That's not what I was expecting. I sort of figured the speed would be about the same. Now, let me be clear. In order to miss the slow motion part of the shot I only looked at blaster bolts after the last one had been shot (so time goes back to normal time).

There is still the possibility that these bolts all have the same speed and I am just seeing a large measurement error. But is there another reason? What if the blaster bolt speed depends on the speed of the bird as it shot the blaster? So, a bird moving in the same direction as the shot would produce a higher speed relative to the background. Also, a "backwards" shot would be slower.

So, I tried a simple experiment. What if I shoot forwards with one bird and then backwards for the next? For three forward shots, I get an average x-component of velocity of 45.09 m/s and -37.35 m/s for the backwards shot (but the bird is moving in the positive x-direction). This shows a difference in speeds - but just a little bit. If I look at the horizontal motion of the bird after it was shot, I get an x-velocity around 20 m/s. If the bolt speed was based on the bird speed, there should be a much larger difference in speeds. I suspect the problem might be with the backwards shots. Just based on the level layout, there wasn't much room to shoot backwards.

I should find a better level.

Another Experiment

I found one. It is Tatooine-36. Why is it better? First, it's in space - so I don't have to worry about acceleration. Second, it is bigger. There is more room to shoot. Oh, as a bonus you get 3 Han Solo birds to shoot.

Tracker

Here is the experiment. First, I will shoot Han in a direction where there is not much to hit. Then I can try shooting the blaster in the same direction and then the opposite direction as the motion. I should be able to get fairly nice data. Also, I can launch the Han-bird at a slower speed (just don't pull back on the sling shot as much). This will give a total of 4 different birds each with 3 blaster shots. Since all the motion will be in a line, I can just look at one dimension. Why didn't I do this from the start? Probably because I lack patience.

Here is a plot that shows the data from one group of three shots. I added some labels so you could better see what's going on.

Summer Sketches.key

A couple things to notice:

  • You can clearly see the motion of the Han (Chuck) slows down during the three shots and then speeds back up. This plot doesn't show it, but if you have enough data the bird does get back to the original speed (most likely).
  • In this case, the three shots are fired backwards. You can tell because they have a negative slope on the position-time graph.
  • The blaster bolts also slow down during the three shots. After all three bolts have been fired, the bolts and the bird all accelerate back to "normal speed".
  • If you aren't careful, you can include some of the "slow time" in your calculations of the slope. This means that you might get a lower calculated velocity for the first shot since it will have more of its motion during the slow part.

I told you there would be 12 blaster bolts - and I do have data for all twelve. Each set of three was fired from a different speed bird. All birds were fired to the right with a speed of around 24 m/s or 15 m/s (some slight variations). Here is the magnitude of the speed for all twelve of these bolts.

Sdfew.png

This gives an average of 49.63 m/s and a standard deviation of 1.85 m/s. Really, it's not all that different from my first set of sloppy data. Even though the yellow bird is moving about 24 m/s, the speed of the blaster bolt seems to be the same no matter which way it is fired. Let's just say the blaster bolts have a constant speed of 50 m/s.

Just for a comparison, I previously looked at the speed of blaster fire in Star Wars. From that I found an average blaster speed of 34 m/s (for ground to ground blaster fire - the space bolts were much faster).

Constant Speed Blaster Bolts

If the blaster bolts have a constant speed, what does this mean? Here are some options.

Computer based firing. What if the blaster gun measures its current speed. Then when the blaster fires a bolt, it adjusts the firing speed so that it has a constant speed. This means that if the bird is moving with a speed of 24 m/s, a forward firing bolt would have a speed relative to the gun with a speed of about 26 m/s. If the same gun was fired backwards, the bolt speed would have to be 74 m/s in order to give it the same 50 m/s speed with respect to the background.

Those aren't blasters. What if these are laser guns? I am going with the assumption that what comes out of the gun in Star Wars is NOT a laser but some type of plasma or something. If it were indeed a laser, then the bolts would just be light. Light is really weird. It turns out that the speed an observer sees the light is always the same - we call this "the speed of light" and it has a value of c = 2.99 x 108 m/s. Of course this leads to the common question (asked at bars while drinking beer):

"Let's say I'm driving a car at the half speed of light - right? And then I turn on my headlights. How fast would I see the light coming out of my headlights? How fast would someone on the side of the road see the light from the headlights?"

This is a real question that I hear all the time (or some version). The answer usually doesn't satisfy asker, but here it is. If you had a way of measuring the speed of light, both the driver and the stationary person would see the light going at 2.99 x 108 m/s. I know this seems crazy, people think that there has to be some difference for the two observers. Yes, there are some differences. Even though the observed speed is the same, the observed wavelength of light would be different. Also, the two observers might not agree on the time for different events.

Angry Birds Lasers

If we go with the assumption that those red things are laser pulses, what else would that mean? The first is scale. Let me rewrite the speed of the laser as:

La te xi t 1

All I did was to change the units on the speed from meters to m'. If this is light, then I need to change my distance scale. I can do this with some simple algebra.

La te xi t 1

This would then give the correct speed for the light in the game. However, a bird that 0.7 meters tall would now be 4.19 x 106 meters across. Just as a comparison, the diameter of the moon is 3.47 x 106 meters. That would mean that these birds are more like planets. Oh, and the sling shot would be 2.9 x 107 meters tall.

What about the levels with a constant vertical acceleration due to a constant gravitational field? If I convert this to units of meters per second squared, I get an acceleration of 5.8 x 107 m/s2. That is so high, I just don't even know what to say. I guess this acceleration would make the bird-planets going so fast that we would have to consider relativistic effects.

Of course, it might be simpler to stick with the idea that it is a computer controlled blaster that always shoots bolts at the same speed.

This is not homework

For some posts similar to this, I would add a list of homework at the end. You know, things you could do to explore this in more detail. However, this is not homework. These are things that I want to do. Of course, if you like you can do them also.

  • What happens when you shoot a bolt in a direction perpendicular to the direction of the bird? This will be a little more difficult to collect data, but I suspect that it will still show the bolts with a constant speed.
  • Model the bolts. This is the thing I really want to do. Can I create some bird like objects in VPython such that it looks like the blaster shots in ABSW? Can I make a model that shoots bolts with a constant speed relative to the shooter?
  • How do you make the bird shoot so that all bolts hit in the same spot?

Really, I should look at perpendicular blaster bolts before I make the VPython model. However, I am very impatient and will probably do the VPython first.