Commit Graph

760 Commits

Author SHA1 Message Date
William Muir 37c745c139 Polar velocities should now work as intended.
Snapping to VMG still needs to be implemented.
Still an issue of not being able to pass the total upwind or downwind point

tags: #story[986]
2017-07-25 22:27:26 +12:00
William Muir 7880039801 Merge remote-tracking branch 'origin/develop' into develop 2017-07-25 22:19:19 +12:00
William Muir a56dac1e87 Polar velocities should now work as intended.
Snapping to VMG still needs to be implemented.
Still an issue of not being able to pass the total upwind or downwind point

tags: #story[986]
2017-07-25 22:19:03 +12:00
Haoming Yin 4ae422b47b When a player connects to the server, lobby will now show their user id and profile instead of showing all the profile gif at the beginning,
#story[1055] #pair[hyi25, zyt10]
2017-07-25 21:50:23 +12:00
Calum acd54dec7a Merge branch 'develop' into story61_player_perspective
# Conflicts:
#	src/main/java/seng302/App.java
#	src/main/java/seng302/client/ClientPacketParser.java
#	src/main/java/seng302/controllers/Controller.java
#	src/main/java/seng302/controllers/RaceViewController.java
#	src/main/java/seng302/fxObjects/BoatAnnotations.java
#	src/main/java/seng302/gameServer/GameState.java
#	src/main/java/seng302/gameServer/MainServerThread.java
#	src/main/java/seng302/gameServer/ServerToClientThread.java
#	src/main/java/seng302/model/Boat.java
#	src/main/java/seng302/models/stream/XMLParser.java
#	src/main/java/seng302/visualiser/ClientToServerThread.java
#	src/main/java/seng302/visualiser/GameView.java
#	src/main/java/seng302/visualiser/controllers/FinishScreenViewController.java
#	src/main/java/seng302/visualiser/controllers/StartScreenController.java
#	src/main/java/seng302/visualiser/fxObjects/BoatObject.java
#	src/main/resources/views/LobbyView.fxml
#	src/main/resources/views/MainView.fxml
2017-07-25 21:05:15 +12:00
Calum 6242ab0b2e Implemented observer and strategy pattern in BoatAnnotations, now renamed AnnotationsBox.
Also implemented various other small fixes and further refactored code.

#refactor
2017-07-25 20:45:27 +12:00
Michael Rausch c8a96dcce9 Fixed XML Loading error, used VMG to calculate boat velocity
- XML read from stream instead of file
- Started implementing VMG to calculate boat velocity dynamically

Tags: #pair[wmu16, mra106] #story[986]
2017-07-25 20:14:50 +12:00
Kusal Ekanayake 4f2dca7ecf Added proper the starting locations for marks and boats. 2017-07-25 18:48:33 +12:00
Zhi You Tan e569574c01 Merge remote-tracking branch 'origin/develop' into develop 2017-07-25 17:17:45 +12:00
Zhi You Tan f544734b4d Fixed sending wrong race xml when a player disconnected because xml is getting data from gamestate yacht but the yachts are not updated is player disconnect.
Heartbeat packet was sent out at wrong rate which cause the player disconnect detection to be slow. Heartbeat packet is send out every 200ms now.

#story[1055] #pair[hyi25, zyt10]
2017-07-25 17:17:36 +12:00
Kusal Ekanayake 80b439470b Merge remote-tracking branch 'origin/develop' into develop 2017-07-25 15:22:56 +12:00
Kusal Ekanayake 539197cef5 Added a visual indicator of wind speed during race (text box)
#pair[kre39,mra106] #story[1040]
2017-07-25 15:22:46 +12:00
Zhi You Tan 1a867be387 Added keystroke frequency limit
Updated client and server log format

#story[988] #pair[hyi25, zyt10]
2017-07-25 15:13:48 +12:00
Kusal Ekanayake 3785cd705f Fixed wind speed and direction being sent correctly.
#pair[kre39,mra106] #story[1036]
2017-07-25 15:08:10 +12:00
Kusal Ekanayake 5d7a438080 Changed default ip back to non local host. 2017-07-25 14:28:21 +12:00
Kusal Ekanayake 2f12f3e34f Fixed bug to let multiple people play at the same time. 2017-07-25 14:27:52 +12:00
Zhi You Tan 52bfa3ad34 Merge remote-tracking branch 'origin/Story1055_Send_Race_Status_When_Host_Ready' into develop
# Conflicts:
#	src/main/java/seng302/controllers/LobbyController.java
2017-07-25 00:03:58 +12:00
Zhi You Tan d1d659b698 Lobby view will switch to race view when received race status packet with race start type.
Ready button can only be pressed by host. Once pressed, it will send out race status packet with race start to all clients.

#story[1055]
2017-07-25 00:01:59 +12:00
William Muir cdb9337aed Deleted GameServerThread after being re merged in
#chore
2017-07-24 23:20:47 +12:00
Zhi You Tan 8b0af5bb62 Updated observer so it sends out updated boats.xml when client disconnects
#story[1047] #pair[wmu16, zyt10]
2017-07-24 21:35:31 +12:00
Zhi You Tan 83232a935e Merge remote-tracking branch 'origin/Story984_Send_XML_After_Clients_Connect' into develop
# Conflicts:
#	src/main/java/seng302/gameServer/ServerToClientThread.java
2017-07-24 21:30:12 +12:00
William Muir a30a1aa7c7 Tweaking to server loop making it send packets at 5Hz
Commented out some smoothing code in BoatGroup that was dependend on FPS screwing with movement
2017-07-24 21:14:17 +12:00
William Muir 07cebb6c5b Updated velocity in yacht constructor so the boat can be seen properly working for test purposes 2017-07-24 16:47:17 +12:00
Kusal Ekanayake 45bf65a3d3 Made clients receive new xml after new clients connect.
#pair[kre39,zyt10] #story[984]
2017-07-24 16:15:19 +12:00
Kusal Ekanayake 526c12127f Merging game lobby with game state broadcast. Merge conflicts resolved.
Port numbers updated to 4942.
2017-07-24 15:26:51 +12:00
Kusal Ekanayake 1daac842f2 Merging game lobby with game state broadcast 2017-07-24 15:01:07 +12:00
Kusal Ekanayake 3e4a6f0f2e Merge remote-tracking branch 'origin/Story1055_Lobby_View_Update' into Merging_GameState_With_Lobby
# Conflicts:
#	src/main/java/seng302/client/ClientPacketParser.java
#	src/main/java/seng302/client/ClientToServerThread.java
#	src/main/java/seng302/controllers/LobbyController.java
#	src/main/java/seng302/controllers/StartScreenController.java
#	src/main/java/seng302/gameServer/ServerToClientThread.java
2017-07-24 14:58:14 +12:00
Zhi You Tan 8f8d5c7384 Removed a test sending xml
#story[1055]
2017-07-24 14:24:54 +12:00
Calum aad93d8913 Parsing classes now static utilities. Data now moved to model via controller class. Race logic shifted out of grpahics classes. Several improvements to code readability.
#story[986] #refactor
2017-07-24 12:14:08 +12:00
Zhi You Tan 027c7a1480 Updated start screen controller to connect to itself after setting up server.
#story[1047]
2017-07-24 12:09:23 +12:00
Zhi You Tan df2efa3329 Lobby controller list view is able to react to changes in client state boats and update the list view appropriately.
#story[1055]
2017-07-24 11:15:10 +12:00
Zhi You Tan 9d754c8819 Implemented list views initialisation which will set the first pane to be your source id (after three way handshake) and the remaining pane to be the source id of other players based on boats.xml received.
Updated client parser and client state to save a list of player's boat

WIP: refresh list view to show the latest update in players

#story[1055]
2017-07-23 20:42:21 +12:00
Zhi You Tan e11ceed28c Merge remote-tracking branch 'origin/Story62_Creating_Game_Loop' into Story1055_Lobby_View_Update
# Conflicts:
#	src/main/java/seng302/controllers/StartScreenController.java
#	src/main/java/seng302/gameServer/ServerToClientThread.java
2017-07-23 19:59:30 +12:00
Michael Rausch 8b8b6e4afa Fixed map glitch when race starts, and race XML bug
- Race XML wasn't being sent to clients, this was causing a null ptr exception
- Boat location was being set to an invalid lat/lng

Tags: #story[1047]
2017-07-23 18:20:13 +12:00
Kusal Ekanayake ed2a22b573 Tried to merge game loop with the broadcast. Minor error in canvas. need to fix.
#story[1047]
2017-07-23 17:37:45 +12:00
Kusal Ekanayake 41851ee925 Merge branch 'Story62_Creating_Game_Loop' into Merging_GameLoop_with_Broadcast
# Conflicts:
#	src/main/java/seng302/controllers/StartScreenController.java
#	src/main/java/seng302/gameServer/ServerListenThread.java
#	src/main/java/seng302/gameServer/ServerToClientThread.java
#	src/main/java/seng302/models/Yacht.java
2017-07-23 17:34:24 +12:00
Kusal Ekanayake ffc61942a9 Fixed broken pipe error.
Was caused by boat ids being over 1000 and when turned into xml having a comma placed between the hundreds and the thousands? So to fix, I just mad the max id number 999 so there should not be any issues regarding that if another broken pipe error occurs. Also switched to use the correct yacht constructor.

#story[1047]
2017-07-23 17:10:18 +12:00
Kusal Ekanayake 2e4382bff6 Trying to fix the boat information that is being sent over.
Current issue is that a broken pipe error keeps occurring potentially due to how the messages are being sent so quickly that the previous message may have not finished sending. Also only caused the xm packets to be sent on trigger when a new client connects.

#story[1047]
2017-07-23 16:22:59 +12:00
Zhi You Tan f542dbb61e Changed the competitors list view to eight individual list view.
Added eight individual image view to support future player icon implementation.

#story[1055]
2017-07-23 03:00:29 +12:00
William Muir 2869d139a3 Three way handshake implemented client and server side and functioning
Server generates a new Id for connections (Size of connections + 1)
Client now stores an id allocated to it by the server
The id is currently being saved in the clientToServer thread client side

tags: #story[987] #implement
2017-07-22 17:44:37 +12:00
William Muir 3ec930491f Minor refactor, threads now start themselves
tags: #story[989] #refactor
2017-07-22 16:45:24 +12:00
William Muir a0005064ac Fixed the Yacht clas so it now works.
Lists and Maps are instantiated as they should be in GameState which were creating NullPointers
Introduced ServerLog to server to client threads for bug reporting
Introduced some print statements to test the game state updating upon receiving key presses

tags: #story[989] #refactor #fix
2017-07-22 16:32:05 +12:00
Michael Rausch 33fae9d69a Added race boats to XML Generator
Tags: #story[1047]
2017-07-21 16:56:46 +12:00
Peter Galloway 913e5fee7b Hooked up key press actions to the GameState, applying the relevant maths to update headings etc.
tags: #story[989]  #pair[ptg19, wmu16]
2017-07-21 16:50:09 +12:00
Zhi You Tan 3992073303 Set race started state in client state when packet is passed in client packet parser.
#story[1055]
2017-07-21 16:36:56 +12:00
Zhi You Tan 797a99f632 Merge remote-tracking branch 'origin/develop' into Story62_Swtich_To_RaceView_When_Race_Start
# Conflicts:
#	src/main/java/seng302/gameServer/GameState.java
2017-07-21 16:35:04 +12:00
Zhi You Tan e891ed8a64 LobbyView now can change to RaceView upon race start packet received.
Added port number text field in start screen controller.
Created a client state.

#story[1055] #pair[hyi25, zyt10]
2017-07-21 16:14:45 +12:00
Michael Rausch e8c2cf809b Fixed Null Ptr Exception in GameState 2017-07-21 15:42:20 +12:00
Kusal Ekanayake 5df7efda03 Started implementing the gameState broadcasts.
Initial xml files are almost broad casted, just need to create them (or import the for the regatta). Started the setup for sending boat location packets, should work once we get at least the boat xml working when being sent.

#story[1047]
2017-07-21 13:16:43 +12:00
Kusal Ekanayake 2fff73c075 Merge remote-tracking branch 'origin/984_Xml_Generation' into Broadcasting_GameState
# Conflicts:
#	src/main/java/seng302/controllers/FinishScreenViewController.java
#	src/main/java/seng302/controllers/RaceViewController.java
#	src/main/java/seng302/gameServer/GameServerThread.java
#	src/main/java/seng302/gameServer/GameState.java
#	src/main/java/seng302/models/Yacht.java
2017-07-21 12:31:35 +12:00