cremboc / ini Goto Github PK
View Code? Open in Web Editor NEWINI Controller Concern
Home Page: http://cremboc.github.io/INI/
INI Controller Concern
Home Page: http://cremboc.github.io/INI/
Implement the Exit(point) class - extends the Waypoint class with one additional property - radius.
Possibly caused by not removing/disposing of some resources.
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
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.
Implement Game Difficulty logic.
As far as I remember we had a few options:
Debug info:
Generated aircraft id 1
Entry point: [1080.0:0.0]
Angle to first waypoint: 1.0
[Exitpoint - x: 1080.0 y: 0.0]
Reached exit WP
Meaning it disappears immediately, this is not related to vector rotations, rather flightplan generation.
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.
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;
Implement so every aircraft has its altitude drawn near it.
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.
Generate permanent waypoints. Choose from (list of?) hard-coded options.
Needs fixing:
Needs implementation/discussion:
Possible optimisations:
Need to limit the number of user created waypoints, otherwise there might be way too many.
Make the aircraft selectable and update the UI on the right side
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.
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.
Create a simple menu screen which includes the following buttons:
Start Game
High Scores (?)
Exit Game
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).
What needs fixing:
What needs finalising:
What needs implementation:
Needs discussion:
Aircraft spawning in the right-side sometimes disappear immediately, this needs fixing.
Sometimes they appear for a brief moment before disappearing, might be something with the waypoint assignment.
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
Implement the base logic for Scene2d using Stage and actors.
Test.
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
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.
Testing referencing issues in commits
There is not enough contrast between the waypoint and the background, making waypoints hard to see.
Fires whenever the plane arrives at a waypoint. Updates list of waypoints to go to and calls #11
Make sure aircraft flightplan generation uses user-created waypoints.
Might be as simple as combining the separate lists.
Create textures for:
Background
Aircraft
??
Implement the end game screen, it will be called after a collision has occurred.
The sidebar
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 displays time at the end of the game, and has a button to return to the main menu.
Make the aircraft texture more contrasted to the background.
It is difficult to select an aircraft - possible problem is that the bounding box of it is too small, have a look there.
Assign waypoints to the flightplan in an way isn't utterly random/ is fairly logical relative to its entry and exit points.
Ensure entry waypoint is first waypoint.
Ensure exit waypoint is last waypoint.
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.
After an aircraft passes a waypoint, the rotation should gradually change instead of immediately:
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.
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:
When an aircraft is within radius of the exitpoint, it has reached the end of the flightplan.
There is a problem with X
Create the State class. Should probably be static so every other class can access it whenever needed.
Should have the following properties:
Methods:
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.