Commit Graph
31 Commits
Author SHA1 Message Date
David Wu 65b960f725 Background of title now changes colour depending on day mode and night mode. Sun image also changes. This is so that the tutorial label is more visible during night mode. #story[1189] 2017-09-01 13:28:05 +12:00
David Wu ea029baf22 Tutorial option in title screen will now created a game with tutorial xmls. Host game will now created a game with the race xml instead of tutorial xml as well. Made changes to tutorial label in title. #story[1189] 2017-09-01 12:28:09 +12:00
David Wu 23d58dc809 Created UI option in the start menu to play a practice game. #story[1189] 2017-08-30 13:26:18 +12:00
David Wu 5234cdea66 Merge branch 'master' into new_issue#19
# Conflicts:
#	racevisionGame/src/main/java/visualiser/Controllers/TitleController.java
2017-08-17 17:00:39 +12:00
David Wu 03dd937713 Change fxml stuff. Added back to menu buttons. 2017-08-17 16:33:52 +12:00
Joseph Gardner d41e52766b Merge branch 'master' into story_64_sails
# Conflicts:
#	racevisionGame/src/main/java/mock/model/MockRace.java
#	racevisionGame/src/main/java/visualiser/Controllers/ConnectionController.java
#	racevisionGame/src/main/java/visualiser/model/VisualiserBoat.java
2017-08-17 16:04:53 +12:00
Joseph f60809bdd4 Merge branch 'master' into story_64_sails
# Conflicts:
#	racevisionGame/src/main/java/mock/app/MockOutput.java
#	racevisionGame/src/main/java/mock/model/MockRace.java
#	racevisionGame/src/main/java/mock/model/commandFactory/CommandFactory.java
#	racevisionGame/src/main/java/network/MessageDecoders/BoatActionDecoder.java
#	racevisionGame/src/main/java/network/MessageDecoders/BoatLocationDecoder.java
#	racevisionGame/src/main/java/visualiser/app/VisualiserInput.java
#	racevisionGame/src/main/java/visualiser/gameController/ControllerServer.java
#	racevisionGame/src/main/java/visualiser/model/ResizableRaceCanvas.java
#	racevisionGame/src/main/java/visualiser/model/VisualiserRace.java
#	racevisionGame/src/main/resources/visualiser/scenes/connect.fxml
#	racevisionGame/src/main/resources/visualiser/scenes/lobby.fxml
#	racevisionGame/src/test/java/mock/model/MockRaceTest.java
#	racevisionGame/src/test/java/network/Utils/AC35UnitConverterTest.java
#	racevisionGame/src/test/java/network/XMLMessageEncoderTest.java
2017-08-17 09:13:49 +12:00
zwu18 317582aae8 Merge branch 'issue#20fix' into Development 2017-08-17 01:35:33 +12:00
zwu18 4e8b7d3b5a Merge remote-tracking branch 'origin/master' into issue#20fix 2017-08-17 01:30:43 +12:00
hba56 fdd0b30a51 Added the ability to hide and show info table with a key press
-the wind arrow also scales with the new size of the screen
2017-08-16 02:04:07 +12:00
zwu18 5e0bcd2af5 Added control menu to title screen. Pressing control button will open a pop-up window showing game controls. 2017-08-15 21:26:23 +12:00
fjc40 3a0bd10a57 Merge remote-tracking branch 'origin/master' into story_61
# Conflicts:
#	racevisionGame/src/main/java/mock/model/MockRace.java
#	racevisionGame/src/main/java/mock/model/commandFactory/CommandFactory.java
#	racevisionGame/src/main/java/visualiser/gameController/ControllerClient.java
#	racevisionGame/src/main/java/visualiser/gameController/ControllerServer.java
#	racevisionGame/src/main/resources/visualiser/scenes/race.fxml
2017-08-15 14:49:58 +12:00
fjc40 7366aba5ec Added empty data sources, to be used by VisualiserRace.
Created FrameRateTracker which can be used to track framerate.
Updated RequestToJoinEnum and JoinAcceptanceEnum to match the agreed connection API.
Added AssignPlayerBoat message, which is used internally on the client to assign the player a source ID once they have connected.
Fixed some race conditions in the MessageRouter.
Updated ConnectionAcceptor.CheckClientConnection to wait slightly longer before removing connection (there was a slight race condition before).
Race no longer has a reference to LatestMessages. LatestMessages no longer has specific messages types in it.
Created RaceState class, which contains the state that is shared between VisualiserRaceState and MockRaceState (currently only used on visualiser).
Split VisualiserRace into VisualiserRaceState and VisualiserRaceService.
Added the VisualiserRace commands (BoatLocatonCommand, RaceStatusCommand, etc...).
Slightly increased the preferred width of race.fxml table columns.
issues #27 #37 #35
#story[1095]
2017-08-14 00:53:05 +12:00
fjc40 19984772c0 Merge branch 'master' into story_61
Also got client-server handshake working. Multiple clients can connect and control their own boat.
The client's boat has a larger black triangle drawn around it. Probably needs tidying up.
Added isClientBoat boolean to VisualiserBoat.

WindGenerator is now an interface, implemented by ConstantWindGenerator (useful for testing) and RandomWindGenerator. Added ConstantWindGeneratorTest.
RandomWindGenerator was formerly WindGenerator.
The WindGenerator is passed in to MockRace.

CommandFactory throws a CommandConstructionException if it cannot create a command.

MessageSerialiser and MessageDeserialiser correctly terminate on error.

Readded VisualiserInput's switch statement in the main loop, pending a refactor.

Removed the sleep statement from LobbyController - it was blocking javaFX thread.

Lobby.fxml: moved buttons and text input into grid panes, so they don't break when you resize screen.

Added some test object creation functions in several test classes (MockRaceTest.createMockRace(), BoatXMLReaderTest.createBoatDataSource(), etc...).

#story[1095]
2017-08-10 23:49:21 +12:00
hba56 4da3734804 added the ability to toggle the race guide line on and off
#story[1087]
2017-08-10 12:17:19 +12:00
Jessica Syder 7c5670f8c2 Sails are displayed on first boat in a race. Optimised imports.
- Implemented drawSails method
- Sail position is displayed and updated using a boat's heading
- Sails conform to 'Points of sail'
- Javadoc'd new method and tidied up existing
- Sped up track point frequency (visualiserBoat class)
- Optimised imports (any other classes changed)
- A lot of canvas drawing and sail rotating issues were discovered and eventually overcome along the way. Using a sail image to draw and rotate on the existing canvas rather than a JavaFX shape on a new canvas was the final decision.

#story[1098]
2017-08-07 12:20:52 +12:00
fjc40 9889a474ee Added ArrowController. This is the controller for arrow.fxml.
Removed arrow control stuff from ResizableRaceCanvas.
Added a wind speed label to arrow.fxml. Also created an outer GridPane to lay things out.
#story[1093]
2017-08-02 18:24:43 +12:00
hba56 92b8b7b77f moved the tm symbol
#story[1087]
2017-07-27 13:34:03 +12:00
David Wu 2b8b334486 Updated host to show the hosted address and port. Fixed css issue with lobby text field.
#story[1087]
2017-07-27 13:12:39 +12:00
hba56 85347c169d You can now resize all windows other than the title screen
#story[1087]
2017-07-27 13:05:56 +12:00
hba56 64b4aa539a added and option to swap between css files in the title pane
#pair[zwu18, hba56]
#story[1087]
2017-07-27 12:04:17 +12:00
zwu18 243c450790 Merged with multi visualiser branch so now multiple visualisers can connect to the same host.
#story[1087]
2017-07-26 21:08:13 +12:00
zwu18 88604df66d Merge branch 'cbt-multi-controller' into css
# Conflicts:
#	racevisionGame/src/main/java/mock/app/App.java
#	racevisionGame/src/main/java/visualiser/Controllers/ConnectionController.java
#	racevisionGame/src/main/java/visualiser/app/App.java
#	racevisionGame/src/main/java/visualiser/model/RaceConnection.java
#	racevisionGame/src/main/resources/visualiser/scenes/connect.fxml
2017-07-26 20:54:07 +12:00
zwu18 9c9b98f882 Added functionality to host game and join a game in lobby. Host name and game name are not implemented yet.
#story[1087]
2017-07-26 20:42:36 +12:00
David Wu 9159e16a21 Set up controller classes for lobby and host. Made changes to TitleController and MainController. Title screen can now enter lobby and host.
#story[1087]
2017-07-25 16:15:32 +12:00
Connor Taylor-Brown 7e3e865563 Host starts with button in ConnectionController
- Converted Event to Singleton for configuring and hosting no more than one game instance.
- Retrieve address and port from ConnectionAcceptor
- Automatically add local host to host list

#story[1010]
2017-07-25 15:52:53 +12:00
Jessica McAuslin 4ba9c6b774 Added a pretty title screen to the application.
- Created a GUI title screen
- Drew images to be display on the title
- Created controller for the title
- Changed visualiser main to initially display title
- Added functionality for host button

#story[1087]
2017-07-24 17:38:46 +12:00
hba56 9d9321522d Linked the first fxml id tags from the fxml files for the new start up screens
#story[1087]
2017-07-24 12:36:45 +12:00
hba56 eda7d062ec merged in the changes from the master branch so that latter mergers can run smoothly
#story[1087]
2017-07-24 12:12:12 +12:00
fjc40 7d3cf6ee80 I had accidentally broken the raceXML construction - fixed it.
Fixed a few issues where boat didn't have nextMark/previousMark times under certain circumstances.
LatestMessages wasn't actually notifying properly - fixed.
The various XML readers now treat a string constructor as containing file contents, not file name - this was how it was mostly already used.
Fixed some issues in RaceXMLReader, including where element.getChildNodes() was used instead of element.getElementsByName(...).
Boat: changes speed to a doubleProperty. Changed leg to a Property<Leg>.
Race.lastFps is now an IntegerProperty.
Added breaks to the case statements in VisualiserInput. Whoops.
ResizableRaceCanvas now handles drawing the race boundary. Tidied up code a bit.
Removed ResizableRaceMap.

Started refactoring Sparkline. Currently doesn't work.
2017-07-10 08:35:43 +12:00
fjc40 abbbf70146 Refactored Race, MockRace, and VisualiserRace to use RaceClock instead of keeping their own timers.
Moved FPS tracking to Race class, so both VisualiserRace and MockRace can monitor their FPS.
LatestMessages is now observable. It notifies observers when an XMLMessage is received.
Boat now has StringProperty for name and country/abbreviation.
Moved the MockRace timescale value to Constants.RaceTimeScale. This is passed in to MockRace on construction.
Tidied up StartController.
Copied the visualiser's resources into the resources folder.
Refactored RaceClock. Added comments. Tidied code a bit. Moved to shared.model.

Started work on RaceController.
2017-07-08 23:21:29 +12:00