Giter Site home page Giter Site logo

ini's People

Contributors

cremboc avatar jaidev-eloper avatar josephhamm avatar lesliehor avatar pwdrew avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

h1bbs sepr-hou

ini's Issues

Exitpoint

Implement the Exit(point) class - extends the Waypoint class with one additional property - radius.

AircraftController: createWaypoint/removeWaypoint

Create the logic for createWaypoint and removeWaypoint.

You have the user input (mouse coordinates after he clicks) in the AircraftController class.

You can access them by using the following:

input.getMousePosition().x;
input.getMousePosition().y;

They are accessible throughout the class.

@PWDrew @josephhamm this part's for you guys

Sidebar buttons and functions

  • Show aircraft speed/heading/altitude
  • Acc/dec aircraft
  • Turn aircraft left/right
  • Show score/timer
  • Menu/pause buttons

AircraftController: update

Create the update method for AircraftController - must do the following:

  • Call every aircraft's update method (see #18)
  • Detect collision (see #9)
  • Generate new aircraft depending on prerequisites (see #6)

AircraftController class

Create the AircraftController class, see UML.

Issues related:
#6 - generateAircraft
#7 - generateFlightPlan
#8 - initialise
#9 - detectCollisions
#10 - aircraft types

Aircraft: insertWaypoint

when the player redirects an aircraft to a new waypoint, this function will change the waypoint list by inserting the 'new' waypoint to the front of the array list. It will then call #11, which will update the aircrafts heading.

Game Difficulty does nothing

Implement Game Difficulty logic.
As far as I remember we had a few options:

  1. change spawn rate of aircraft
  2. change separation rules radius

Aircraft: draw

Draw the plane to screen, mapping the texture to the heading of the aircraft. This is called by the draw function of the GameScreen class.

Buttons "leak out" their text

If you look at the sidebar, the text is all over the place:
Either have a look and see if we can fix that without changing the font size;
or change the font size;
or change the font in general;

Aircraft: update

Called by the game screen update function. Within this function, the various variables that need to be updated every frame (ie position, velocity (if applicable) etc are updated.

Feature/Bug list #2 (2014-01-11)

Needs fixing:

  • #47 - when user diverts an aircraft by putting in a waypoint, remove the "next" waypoint if it is user generated, otherwise the path might be a mess
  • #49 - make aircraft more contrasted to the background
  • #48 - waypoints should be more visible

Needs implementation/discussion:

  • #50 - when player takes control of the aircraft, the exitpoint should be somehow visible
  • #51 - make selected aircraft somehow visible
  • pause screen - how does it look? don't have one
  • make aircraft ignore its waypoints after the player takes control of it

Possible optimisations:

  • (AircraftController) use Vector2.dst2 instead of dst to cheaply check distance between aircraft (in collision)
  • (Aircraft) calculate vector to next waypoint once until next waypoint instead of every frame

Input handler

Update the Input class, make sure it stores all of the mouse movement, clicks and keyboard strokes in a variable which is accessible to other classes.

Exitpoint not visible after user has selected aircraft

When the user takes control of the aircraft, the aircraft must ignore all of its previous waypoints but still reach its exitpoint.
This means that it must be visible somehow once user has taken control of the aircraft.

Screens: MenuScreen

Create a simple menu screen which includes the following buttons:
Start Game
High Scores (?)
Exit Game

Art class

Create the Art class which pre-loads all of the required textures.
Stores them in a HashMap.
Models (such as Aircraft) get the using a key (a String).

Bug list #1 (2014-01-05)

What needs fixing:

  • #39 - Make sure exitpoint works as planned - when aircraft is within radius, aircraft has exited
  • #32 - Fix aircraft generation - some aircraft that appear on the right side of the screen disappear instantly
  • #45 - Aircraft generated with their entry and exitpoint at the same place
  • #33 - Make sure aircraft flightplan generation uses user-created waypoints
  • #34 - Remove the need to add exitpoints to the permanent waypoint list
  • #35 - Make sure aircraft disappear/game ends if they wander too far off the screen (may be fixed with change of scale) (right now found in Aircraft::isActive())
  • #36 - Make the aircraft selection more intuitive - right now it is rather hard to select an aircraft
  • #37 - Font not fitting into the buttons on the sidebar - either use a different one or resize this one
  • #44 - Limit the number of waypoints

What needs finalising:

  • Menu screen graphics
  • Game screen graphics
  • Button graphics

What needs implementation:

  • #38 - Game Difficulty logic - change the spawn rate of aircraft?
  • #9 - Aircraft collision and separation rules breach
  • #40 - End game screen - what happens after a collision
  • #41 - Sidebar:
    • Show aircraft speed/heading/altitude
    • Accelerate/decelerate aircraft
    • Turn aircraft left/right
    • Show score/timer
    • Menu/pause buttons
  • #42 - Altitude of the aircraft - make it appear near the aircraft

Needs discussion:

  • Reduce the scale of everything - may solve certain bugs such as:
    • Aircraft unable to reach its final exitpoint due to turning rate being too small
  • Remove the restriction of the minimal/maximal angle when choosing waypoints for flightplan generation
    • Try hardcoding so it selects waypoints in a circular pattern?

Waypoint

Create a Waypoint class with the following properties:
isDeletable - a boolean whether the waypoint is deletable by the user or not
Coords - a 2d vector consisting of the x and y coordinate

AircraftController: generateAircraft

Restrict aircraft generation up to maximum defined in class
Assign random skin (from array of different textures?)
Assign aircraft properties from the array of predefined aircraft types
Assign aircraft flight plan (assign waypoints from the permanent waypoint list) - see issue #7

Remove need to add exitpoints to waypoint list

At the moment, if you don't add the exitpoints to the waypoint list, the aircraft will disappear at some waypoint because it will not have an actual exitpoint.
Obviously this is now how it should behave.

This may be also a problem related to Aircraft class itself, so needs checking first.

AircraftController: aircraft types

Array which holds the various properties required by the generate aircraft #6
To begin with, there will only be one of these, though inside of or called by #6 will be a method to choose they type of aircraft to be generated from this list.

Aircraft: redirection.

Have this working. Take assignment of multiple redirected waypoints into account, allowing only one diversion to be added to an aircrafts flight plan.

Gameover screen UI

Gameover screen displays time at the end of the game, and has a button to return to the main menu.

Hard to select an aircraft

It is difficult to select an aircraft - possible problem is that the bounding box of it is too small, have a look there.

AircraftController: generateFlightPlan

Assign waypoints to the flightplan in an way isn't utterly random/ is fairly logical relative to its entry and exit points.

  • Suggestion: use a 'cone' that takes the angle between the current and exit waypoint as its midline and then can choose any waypoint within that cone as its next waypoint.

Ensure entry waypoint is first waypoint.
Ensure exit waypoint is last waypoint.

Aircraft: newHeading

Recalculates the aircrafts heading (the velocity), directing it to it's next waypoint. This will be called by both isAtNextWaypoint and insertWaypoint whenever they trigger.

Aircraft: smooth rotation from waypoint to waypoint

After an aircraft passes a waypoint, the rotation should gradually change instead of immediately:
rotation

Easiest way of doing it is to get the final velocity towards the waypoint, store it, then gradually change the current velocity by a minute amount (should be equal to maxTurningRate) until it is equal to the final velocity.

AircraftController: detectCollisions

Create a detectCollisions method - it should be called in the update() method as its called every iteration.
Should loop over all aircraft in the airspace and detect whether either of them are:

  • Separation rules - warn if aircraft are too close
  • Actual collision - change the game state
    This will obviously require the ability to access the co-ords of all aircraft in the game.

Exitpoint radius

When an aircraft is within radius of the exitpoint, it has reached the end of the flightplan.

GameState

Create the State class. Should probably be static so every other class can access it whenever needed.

Should have the following properties:

  • isPaused - a boolean to know whether the game is paused
  • score - an int (may implement score as a class?)

Methods:

  • increaseScore (may implement score as a class?)
  • reset - resets the game state (after starting a new game)

Aircraft wander too far off-screen

If the aircraft is unable to reach its final exitpoint, it may wander too far off-screen and never be destroyed.

Right now as a simple fix I just implement the following:

        if (getX() < 0 || getY() < 0 || getX() > Screen.WIDTH
                || getY() > Screen.HEIGHT)
            this.isActive = false;

Obviously this needs fixing in some way, maybe fix the original issue so it doesn't ever wander off.

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.