Commit Graph
1324 Commits
Author SHA1 Message Date
Hamish Ball 96acb6251e Merge branch 'story66-collision' into 'master'
66. [M] As Gemma, I'd like boats and marks to act as barriers to movement so that another player cannot beat me by just ignoring marks and other boats on the course.

Note: as boats and marks don't start in overlapped positions, we are only concerned with collisions. 

Acceptance criteria:
- No boat can pass within an agreed distance of the centre of another boat or mark
- Boats that hit other objects are repelled twice the agreed distance in the opposite direction to their current heading

See merge request !27
2017-08-17 12:14:30 +12:00
hwball 86d94ef27e javadoc fix 2017-08-17 11:58:13 +12:00
hwball df2b674b94 update scale for table displaying 2017-08-17 11:51:33 +12:00
Connor Taylor-Brown 4b3cc8e126 Created ack number generator for use by multiple services
#story[1100]
2017-08-17 11:47:54 +12:00
Joseph Gardner 1e7ba8cd51 Merge branch 'master' into MapWindRotation
# Conflicts:
#	racevisionGame/src/main/java/mock/app/Event.java
#	racevisionGame/src/main/java/mock/model/MockRace.java
#	racevisionGame/src/main/java/mock/model/commandFactory/CommandFactory.java
#	racevisionGame/src/main/java/shared/dataInput/RaceXMLReader.java
#	racevisionGame/src/main/java/shared/model/CompoundMark.java
#	racevisionGame/src/main/java/shared/model/Mark.java
#	racevisionGame/src/main/java/visualiser/Controllers/ConnectionController.java
#	racevisionGame/src/main/java/visualiser/Controllers/HostController.java
#	racevisionGame/src/main/java/visualiser/app/VisualiserInput.java
#	racevisionGame/src/main/java/visualiser/gameController/ControllerServer.java
#	racevisionGame/src/main/java/visualiser/model/VisualiserRace.java
2017-08-17 11:46:09 +12:00
Joseph d7e0bfa86c Trackpoints are only shown for the player's boat. #story[1098] 2017-08-17 10:13:30 +12:00
Joseph 47fc55245c Merged master. 2017-08-17 09:27:41 +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 109b291973 Merged issue #20 fix and splash screen into development. 2017-08-17 01:36:55 +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
zwu18 8759ac070e Merge remote-tracking branch 'origin/splashScreen' into issue#20fix 2017-08-17 01:30:38 +12:00
Connor Taylor-Brown f8150ef449 Added YachtEvent message with encoder and decoder
- Updated Encoder and Decoder factories for the new message type
- Added an enum for handling yacht event types

#story[1100]
2017-08-17 01:10:55 +12:00
hba56 ee0cc4b704 Merge branch 'issue#40' into Development 2017-08-16 22:41:49 +12:00
fjc40 114c18763b Reduced track point period to 1000ms.
issue #18
2017-08-16 19:44:42 +12:00
fjc40 20055b1883 Removed redunant calls in VisualiserRaceState.initialiseBoats().
Slightly refactored ResizableRaceCanvas - removed a redundant drawPoint() function, functions which alter the gc stroke call save/restore.
Text is drawn black, at 20pts.
The drawBoats() function: instead of drawing everything for each boat, one boat at a time, it draws the track points for all boats, then wake for all boats, etc..., to have better layering.
issue #18
2017-08-16 18:10:30 +12:00
cbt24 f7d0e9d466 Boats bounce during collision if pointing into collision
#story[1100]
2017-08-16 17:55:33 +12:00
cbt24 eaa0d2e82b Boats bounce away from marks.
- Changed onCollisionEnter signature to pass boat info

#story[1100]
2017-08-16 17:22:08 +12:00
cbt24 8113867576 Bubbles collision events to RaceLogic
- ColliderRegistry collects and forwards all Collision events
- RaceLogic observes the ColliderRegistry of its single Race instance

#story[1100]
2017-08-16 16:56:20 +12:00
fjc40 f1e41d5d8f Merge branch 'master' into issue_18_trackpoint 2017-08-16 16:52:32 +12:00
cbt24 79f3c41d45 Moved generic ray casting to Collider abstract class
- Boat is now collider
- Collider subclasses specify their own collision ray and collision handler

#story[1100]
2017-08-16 16:21:55 +12:00
cbt24 8498701091 Removed commented-out file from master 2017-08-16 16:08:38 +12:00
cbt24 f44929f376 Spun off Locatable interface to make collision code more reusable
#story[1100]
2017-08-16 16:05:25 +12:00
cbt24 ce14e93404 Removed CI-breaking docstring 2017-08-16 15:17:15 +12:00
cbt24 f0d750cae1 Merge remote-tracking branch 'remotes/origin/master' into story66-collision
# Conflicts:
#	racevisionGame/src/main/java/mock/model/MockBoat.java
#	racevisionGame/src/main/java/mock/model/RaceLogic.java
#	racevisionGame/src/main/java/shared/model/CompoundMark.java
#	racevisionGame/src/main/java/shared/model/Race.java
#	racevisionGame/src/test/java/mock/model/MockBoatTest.java
2017-08-16 15:09:18 +12:00
cbt24 d63641c1e2 Cherry-picked multiple changes from master 2017-08-16 14:54:55 +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
Jessica Syder 3d953362a6 Merge branch 'story_61' into 'master'
Story 61

[Agilefant link](http://agilefant.cosc.canterbury.ac.nz:8080/agilefant302/qrq.action?q=story:1095)

```
Note: the boat should be permanently circled with a highlight (or something similar)
See: (http://learn.canterbury.ac.nz/mod/forum/discuss.php?d=213948). Contains boat request to join, and server response messages.

Acceptance criteria:

- The boat that responds to control keypresses is permanently highlighted on screen.
- No boat without a highlight responds to keypresses.
```

Works with either single player or multiplayer game (see HostController.hostGamePressed()).

The race.xml currently is not updated when players join/quit, so there are 6 boats by default, and any boats without playes will just sail off the side of the map.

- resolves #39 
- resolves #37 
- resolves #35 
- resolves #27 
- resolves #25 
- resolves #32 


See merge request !26
2017-08-16 00:00:08 +12:00
fjc40 85e703cba5 RaceController/info table now makes a copy of the boat list, to avoid race conditions.
#story[1095]
2017-08-15 23:10:32 +12:00
Fan-Wu Yang 9f7c5d8c0c Fixed other javadocs that were causing the build to fail #story[1092] 2017-08-15 22:48:35 +12:00
Fan-Wu Yang 9e6bd10870 Merge branch 'master' into MapWindRotation 2017-08-15 22:45:01 +12:00
Fan-Wu Yang 8d87da6206 fixed java doc issues on my side #story[1092] 2017-08-15 22:44:56 +12:00
fjc40 bcb6b79f8d Fixed player boat not being highlighted.
#story[1095]
2017-08-15 22:41:43 +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 a4755ed88b Maybe fixed updating boat list on FX thread. 2017-08-15 21:08:56 +12:00
Fan-Wu Yang a4e1dfb3d7 Fixed import that was messing up the build #story[1092] 2017-08-15 20:46:10 +12:00
fjc40 0483859c40 Fixed sparkline y axis labelling. Reverted it to how it previously worked (negative data values instead of negative scale).
issue #32
2017-08-15 20:40:29 +12:00
fjc40 9ab12a9c58 MockBoat: Removed redundant isAutoVMG() function.
TackGybeCommand now disables autoVMG.
Removed print statements from VMGCommand.
2017-08-15 18:48:14 +12:00
fjc40 dc4610d6eb Fixed sparkline not updating.
#story[1095]
2017-08-15 18:41:28 +12:00
fjc40 5ae8393126 Fixed null pointer exception when a boat finishes the race.
Boats now default to have position (0, 0).
Added mark rounding data to single player race.xml
2017-08-15 17:13:12 +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 c9875f3987 RaceLogic no longer uses AnimationTimer for its main loop (since that ran in javafx thread). 2017-08-15 14:37:36 +12:00
cbt24 9ca50aa66c Ray casting now only supports distance specification.
#story[1100]
2017-08-15 14:26:43 +12:00
cbt24 7d64a43350 Allow collision checking to provide collision parameters to ray casting method
- Added tests for MockBoat collision direction and distance

#story[1100]
2017-08-15 13:47:59 +12:00
cbt24 2fbb96afd7 Created ray casting methods for MockBoat and CompoundMark
- Added ColliderRegistry to Race
- Added collision triggering to RaceLogic
- Created basic collision handlers for MockBoat and CompoundMark
2017-08-15 12:57:26 +12:00
Connor Taylor Brown ab9aeeb58f Merge branch 'CommandFactory' into 'master'
Tacking and gybing merge request

Note: this allows the player to perform a common maneuver, changing tack, quickly. The goal is to change the boat's heading from one tack to another with a single keypress.
If the boat is heading upwind, the keypress will cause the boat to tack through head-to-wind, so that the wind shifts from one side of the boat to the other. The TWA (true wind angle) after tacking should be 360-TWA(before_tacking).
Similarly for gybing if the boat is initially heading downwind, except that the boat's heading always remains away from the wind.

Acceptance criteria:

- The wind shifts from one side of the boat to the other on keypress
- When heading upwind the boat should tack on keypress
- When heading downwind the boat should gybe on keypress

[Manual test](https://eng-git.canterbury.ac.nz/seng302-2017/team-7/wikis/manual-test:-tacking-and-gybing)

See merge request !24
2017-08-15 12:06:20 +12:00
cbt24 da52082d70 Deleted duplicate method (again -.-) 2017-08-15 11:40:22 +12:00
Connor Taylor-Brown 847cd1251e Merge remote-tracking branch 'remotes/origin/master' into CommandFactory
# Conflicts:
#	racevisionGame/src/main/java/mock/model/commandFactory/TackGybeCommand.java
#	racevisionGame/src/main/java/mock/model/commandFactory/VMGCommand.java
2017-08-15 01:01:06 +12:00
Connor Taylor-Brown b97bfe62a6 Fixed documentation bugs not relevant to story. 2017-08-15 00:52:50 +12:00
Fan-Wu Yang cdcd326b7c Merge branch 'story68' into 'master'
Story68



See merge request !25
2017-08-14 13:05:26 +12:00