Coder Social home page Coder Social logo

sepr-mqv-2's People

Contributors

as1481 avatar garethh9 avatar imp1 avatar jacob135135 avatar josh-adams avatar liam-m avatar liamwellacott avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sepr-mqv-2's Issues

Display score for plane

When an aircraft leaves the airspace, display its score by its exit point, which gradually fades (decrease alpha until it's 0)

Implement scoring mechanism

Sub-task for #3

Mechanism decided by @Matidy

Each aircraft has a base score:

  • 100 in easy
  • 200 in medium
  • 300 in hard.

There is a value 'x' which is equal to:

  • base_score / 100 in easy
  • base_score / 200 in medium
  • base_score / 300 in hard

(of course these are all 1 at the moment. This is for if we decide to change base score in future)

There is a value 'y', which is initially 0. This is increased by 'x' every time an aircraft leaves the airspace.

There is a global multiplier, which is based on y:

  • 1 when 0 <= y < 10
  • 2 when 10 <= y < 40
  • 3 when 40 <= y < 80
  • 4 when 80 <= y < 130
  • 5 when y >= 130

There is a global score, initially 0. Every time an aircraft leaves the airspace, the global score is increased by (multiplier * base_score * x)

Change landing behaviour

  • Don't allow a plane to be manually controlled while it's landing
  • Remove an aircraft if it hits very low altitude (100)

Conflict between landing and changing bearing of selected aircraft

Currently when an aircraft's destination is the airport and it is selected clicking causes the aircraft to change its bearing so it wont land. I think the left mouse does too many things and im not sure the bearing changing works well since the main method of control should be routing the plane through the airspace

Documentation and Readability

We should all attempt to produce good documentation as a selling point for the next assessment, good documentation means:

  1. Sensible variable names
  2. High level descriptions of methods and their parameters
  3. Optimised code with clear logical sections

Commands to aircraft to land and take off

  • Methods in Aircraft
  • Buttons in GUI
  • Support in flight plans - entry point or exit point can be the airport
  • "There must be suitable constraints on how many landings and takeoffs can happen simultaneously"

Create Airport in Demo

Sub-task for #2

The airport is located near the centre of the airspace. The player should have more than enough time to redirect a new plane entering the airspace before it crashes/almost crashes into a plane waiting to land.

As the background image currently has the airport on the right, a new image will have to be made at some point (@aljidy, @Matidy).

Aircraft AI improvements

Aircraft will continue to try to reach a waypoint even if their turning speed means they'll never reach it.

Particularly an issue if you make a plane circle it's exit point as control is removed everytime you exit the airspace.

Refactor out flight plan

Aircraft is very large and potentially unmanageable. Refactor out flight plan and associated methods/attributes into its own class.

Don't spawn an aircraft if there is an aircraft about to leave that point

Make sure that an aircraft isn't spawned at an entry point if:

  • There is an aircraft in the final stage of its flight plan heading towards that point
  • That aircraft is <250 away - this number should be adjusted but I think it's a good starting point

Instead, make it spawn at a different entry point. If none of them is available, make it spawn at the airport. If the airport is full and no entry point is available, don't spawn anything.

Modify createAircraft() in Demo for this.

Label airport

All of the other entry / exit points have a label with their name on. Display 'Mosbear Airport' just above it.

AI Fix

When an aircraft leaves the airspace on manual control mode, it reverts back to auto control mode to be guided back to it's flight path. Once back in the airspace it reverts back to manual mode and if the user doesn't take quick drastic action it can get stuck in this loop.

Suggested Fix
Once the plane comes back into the airspace it should remain on auto control as opposed to reverting back to manual control.

Keyboard controls

Do we want to add keyboard controls for everything? I think particularly we could do with changing the control altitude as scroll wheel is a fairly clunky way to do it.

I don't think it'll really be possible to change flight plans using keyboard but it could probably be used for everything else.

Aircraft take off

Sub-task for #1

  • Method in Aircraft - if an aircraft has been spawned at the airport but hasn't been instructed to take off yet. This will make it go into an active state in the airspace. See UI/UX document or ask @Matidy for more details of how this should work
  • Button in GUI to make the waiting aircraft take off (see UI/UX document)
  • Make sure that there are correct constraints on how many aircraft can land/take off simultaneously

Moving the window has issues

Plane positions continue to be calculated when you move the menu. Everything else freezes. Plane position is not calculated correctly while moving the menu.

Differentiate flight path highlighting

The selected aircraft's flight path should be highlighted as it is currently.

The aircraft you're hovering over's flight path should be highlighted with half alpha.

Implement aircraft ready-to-land behaviour

Sub-task for #1 (requires #2)

When an aircraft is ready to land but the ATCO hasn't sent the land command, the aircraft will circle the airport at a certain radius. Of course, this only applies to aircraft that have the airport as their destination. This behaviour may change based on UX decisions so we'll wait for those to be finalised before implementing this.

Aircraft landing

Sub-task for #1

  • Method in Aircraft - if an aircraft is ready to land at the airport but hasn't been instructed to yet. This will make it land. See UI/UX document or ask @Matidy for more details of how this should work
  • Button in GUI to make the waiting aircraft land (see UI/UX document)
  • Make sure that there are correct constraints on how many aircraft can land/take off simultaneously

Offset has to be applied to mouse handlers

Offset has to be applied to mouse handlers in order for the mouse to line up with GUI elements in game and the only other solution is to mess with lwjgl which at this point is far too messy, the offsets should be in variables and their presence should be documented and explained

Display highlighted altitude

Display what used to be called control altitude above where it says how many planes are currently in the air.

I think it should be called either 'view altitude' or 'highlighted altitude' and its main use is just so you can see which planes are in danger of colliding.

New airport image, airport & hangar behaviours

  • Change the airport image to the new one @aljidy has made
  • Add isMouseOverAirport() and isMouseOverHangar() into Airport that check rectangles (probably best to check if if x >= left and x <= right and y <= top and y >= bottom)
  • Draw a rectangle around the airport / hangar if clickable (planes waiting, not busy) - same colour as the indication below
  • Make mousePressed() in Demo call take off and landing if the hangar/airport is pressed
  • Add an indication on top of the airport and hangar showing how many planes waiting to land/take off that varies colour:
    • Grey = no planes waiting
    • Yellow = plane(s) waiting
    • Red = plane(s) waiting too long (hangar only)

Increase spawn rate

The increase to the plane spawn rate based on multiplier isn’t enough (should also be scaled by difficulty due to the planes moving faster).

Ideally there will be at least 10 aircraft in the airspace at some points

Settings/config file

I think it'd be good to have a settings/config file (e.g. in XML or something) to make it easier to change values like aircraft speeds, collision radius and entry/exit point positions. Rather than having to go to several different classes to change these they could all be found in one place.

Then we could find a library to read in the information from the file and stick these into the relevant classes at initialisation. If a value isn't in there then it could either throw an error or go to a default value.

What do we think of this?

Vary max aircraft and spawn rate based on multiplier

Part of #5

  • Max aircraft = current multiplier (e.g. x7 => maxaircraft = 7)
    • make sure this doesn’t make anything unusual happen when the multiplier decreases (e.g. aircraft disappearing)
  • Spawn rate should be set so the number of aircraft is generally between maxaircraft bounds (e.g. at x5 there should be 3-5 aircraft on average, at 7x between 5-7 etc.)

Sparkles and glitter

We can get some extra marks for adding further features or behaviours. These need to be fully explained and justified in the deliverables and must not violate the requirements for the game.

Anyone got any ideas for these?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.