Thursday, March 23, 2017

Weekly Update (2017-03-23): Guy

This Week:

This week I figured out how to implement a button onto the screen. After a number of errors, i was actually just using the button wrong as ididnt fully understand the code. With help from Liam i fixed it and the button became implemented. It is there, however, it doesnt work and nothing happens when you press it.

Next Week:

Week I will be trying to get the button to open the actual game. Once i do that we can all use the same code for the Master branch, instead of having it go to different classes when opened. Once i figure out the problem with changing screens using the buttons we can all just go to MainMenuScreen and click the ubtton to get to PI Screen which will be helpful in merging later on.

Asana Tasks:

  • Main Menu(incomplete)

Weekly Update (2017-03-23): Liam

This Week

I looked into a reasonable scale for the airport. Right now, distances are measured in pixels, which makes realism hard. It's also hard to determine how fast an airplane should descend and decelerate; it seems to vary based on the aircraft, so we'll probably just choose a reasonable number and use that. I've decided to try a scale of 100 meters per pixel, but before that can be used in the game we need to implement it in the editor.

On a more minor note, certain controls are now disabled for flyover flights. The player shouldn't be able to tell flyovers to land at or circle the airport.

Arrivals have full controls

Flyovers can only change direction and altitude

Asana Tasks Completed

  • Implement flight types

Next Week

I plan to finish (finally!) the airplane landing algorithm, incorporating descent and deceleration.

Asana Tasks

  • Determine scale of airport
  • Add landing capabilities
  • Add landing constraints

Friday, March 17, 2017

Weekly Update (2017-03-17): Liam

This Week

The big breakthrough this week was implementing a landing A.I. The player selects an airplane, then selects the end of a target runway, and the airplane tries to land. This won't always work, but any edge cases won't allow the user to land, anyway. Basically, the airplane first turns toward the runway, then at the last second straightens out. Right now it doesn't deal with altitude or speed, but getting this far was a lot of work; Benjamin and I spent 3 or 4 class periods on the equations.

Pointing towards the runway

Lining up

"Landed"

Asana Tasks Completed

  • Add airplane states
  • Add enum to Airplane class

Next Week

I plan to complete the A.I. by adding deceleration and descent. I'll also add more constraints on how the player can control arrivals, departures, and flyovers

Asana Tasks To Do

  • Add landing capabilities
  • Add landing constraints
  • Implement flight types

Weekly Update (2017-03-17): Benjamin

This week, I spent most of the time finishing the landing algorithm with liam. We finally got it working. Now, I am working on a UI for changing altitude.

Landing

IT WORKS!!!!!!!!
Our final algorithm is extremely simple. The first step is to turn until the airplane is pointing inside the line that goes towards the end of the runway. This makes sure that there is enough room to turn facing the runway once the airplane gets to the intersection. Next, we find the intersection between the airplane's line and the line of the runway. The angle between the airplane and the runway is used to calculate the distance from the intersection at which the turn should start.
\[\frac{\sin{\frac{\alpha}{2}}}{r} = \frac{\sin{\frac{\pi}{2} - \frac{\alpha}{2}}}{d}\]
\[d = \frac{\sin{\frac{\pi}{2} - \frac{\alpha}{2}}}{\frac{\sin{\frac{\alpha}{2}}}{r}}\]
Then, the plane simply has to wait until it is the specified distance from the intersection. The end result is that the plane will do an S-curve to bring it both colinear and parllel to the runway.

Altitude Adjustment

The placeholder altitude adjustment system is that dragging on the screen will change the target altitude and tapping will send the command.

Asana Tasks

  • Me and Liam: Autopilot
  • Fix rotation of runway labels
  • Airplane controls -> altitude

Friday, March 3, 2017

Weekly Update (2017-03-03): Liam

This Week

While Benjamin worked on a landing algorithm, I fixed a nagging issue with the way the map is displayed. The status bar on the bottom of the screen is drawn over the map, which means that even when the user pans down as far as possible, some of the map is still blocked by the status bar. I made it so the game allows you to pan further than the boundaries of the map, just enough so that the bottom of the map aligns with the top of the status bar. This will also be useful when we add a side bar later.

I also added spontaneous airplane generation: airplanes appear around the edges of the screen, distributed randomly, at random time intervals between 4 and 30 seconds.

How far the user could pan down before:


After, with airplane generation:


Completed Asana Tasks

  • Implement airplane generation
  • Stop status bar from blocking bottom portion of map
  • Add airplanes at random time intervals

Next Week

I plan on helping Benjamin finish the landing autopilot. I also plan on implementing altitude and rates of descent.

Current Asana Tasks

  • Add airplane controls
  • Add airplane constraints
  • Add landing capabilities


Weekly Update (2017-03-03): Guy

This Week:

This week I continued working on screens. I worked mainly on figuring out how to change screens from one to another. The main error I found was in figuring out what each screen needed in order to change it. I also had an issue with showing up a button in order to change the screens from the screen. Since then I have ran into another error that continuously crashes the game which I need to figure out. Once that is done I'll move to the button error

Next Week:

So next week I need to figure out what the error is that is making the game crash when opened. I think it has something to do with how I am changing the screens, however, I have not figured it out yet. After that I need to be able to change the screens. The button isn't working so far so I cannot make sure the changing screen code works so that will be the next step in order to troubleshoot the rest of the code.

Asana Tasks:

  • Main Menu(incomplete)