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
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
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
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
Zhi You Tan
d37cbd263e
Merge remote-tracking branch 'origin/Story62_Creating_Game_Loop' into Story62_Reading_Keystrokes
...
# Conflicts:
# src/main/java/seng302/controllers/RaceViewController.java
# src/main/java/seng302/gameServer/MainServerThread.java
# src/main/java/seng302/gameServer/ServerToClientThread.java
2017-07-21 11:13:40 +12:00
Calum
3ec1242a9a
Merge branch 'Story62_Reading_Keystrokes' into story61_player_perspective
...
# Conflicts:
# src/main/java/seng302/gameServer/ServerToClientThread.java
# src/main/java/seng302/visualiser/ClientToServerThread.java
# src/main/java/seng302/visualiser/controllers/RaceViewController.java
2017-07-21 11:13:04 +12:00
Calum
881f7f8e30
Changed package heirachy. Merged Controller and StartScreenController.
...
#refactor
2017-07-21 09:22:55 +12:00
Peter Galloway
12c2f31af9
Merge remote-tracking branch 'origin/Story62_Creating_Game_Loop' into Story62_Creating_Game_Loop
...
# Conflicts:
# src/main/java/seng302/gameServer/GameState.java
2017-07-20 19:38:07 +12:00
Peter Galloway
49c0c029c3
adjusted the way the server is receiving key presses to enable them be passed through to the game state #pair[ptg19, wmu16] #story[989]
2017-07-20 19:35:59 +12:00
Alistair McIntyre
da7a34fc55
Started adding functionality to calculate yacht velocity from the wind speed and direction using polar tables. Also began writing tests to cover this functionality, as it can't currently be tested within the game itself.
...
#story[986]
2017-07-20 14:30:13 +12:00
Kusal Ekanayake
b1575e57df
Host also can be it's own client.
...
The host can connect to itself to become a client, packets are also sending from the host to client, update method should be ready to fully implemented. Added chatter packets to packet types to be used mostly for testing but can be further implemented for proper use in the future.
#story[1055]
2017-07-20 13:53:53 +12:00
Michael Rausch
82b219cdba
Boat and race XML now generated dynamically
...
- Removed course from XML Generator as it was not needed
- Boat and race XML added
- Method names in Yacht class updated to follow JavaBean standard so they can be read by the template engine
Tags: #story[984]
2017-07-20 13:30:55 +12:00
Peter Galloway
e317de7562
Added mock yachts to the game state for each client #story[1047]
2017-07-20 13:11:37 +12:00
Peter Galloway
176d65e0b2
Merge branch 'Story62_Reading_Keystrokes' into Story62_Creating_Game_Loop
2017-07-20 12:01:53 +12:00
William Muir
0c08f5a03c
Refactoring to remove all superflous classes related to the server
...
GameServerThread --> MainServerThread
All server classes consolidated into the gameServer package and all others removed
tags: #story[1055] #refactor #fix
2017-07-20 11:46:06 +12:00
William Muir
8f00f3a80c
Refactoring for server package, Changed GameServerThread to MainServerThread.
...
All Server classes now in single gameServer package
tags: #story[1055]
2017-07-20 11:22:30 +12:00
Peter Galloway
63d24c001f
Added position update in yacht #story[1047]
2017-07-19 19:41:07 +12:00
Michael Rausch
45053ba507
Added XML Generation
...
- Implemented a wrapper for Apache Freemake
- Implemented the regatta XML generator
Tags: #story[984]
2017-07-19 14:47:16 +12:00
William Muir
e83eaa38e1
Upon hosting, and then creating a new instance and connecting to that IP, button transmissions work and print out on server!! :D
...
Took the send method out of the Message class as it didnt make sense to have it there. This meant taking it out of all subclasses too
tags: #story[1055] pair[wmu16, zyt10]
2017-07-18 12:22:58 +12:00
Michael Rausch
c19f66a6a4
Added garbage collection for disconnected players
...
- Heartbeat messages are sent out from their own thread to each player
- If a heartbeat message can't be sent to a player, they are removed from the list of players
- Added equals method for players
Tags: #story[1047]
2017-07-13 22:07:03 +12:00
Michael Rausch
1e6fd1af09
Fixed bug where players were being added to the GameState twice
...
#story[1047]
2017-07-13 19:27:47 +12:00
Michael Rausch
55db2c9961
Fixed buffer overflow in message header
...
- Fixed buffer overflow by adding a reset method that clears the buffer and sets the position to zero before re-writing the header
Tags: #story[1047]
2017-07-13 19:15:45 +12:00
Haoming Yin
6ec8b0c3c5
Terminated the game server socket when click exit lobby button
...
- the whole server thread should be terminated instead. To be fixed in the future.
#story[1047] #issue[28]
2017-07-13 17:51:25 +12:00
William Muir
8090cd7985
WIP: Adapted the old server thread class to the GameServerThread class to allow multiple clients to connect
...
tags: #story[1047] #pair[wmu16]
2017-07-13 14:40:11 +12:00
William Muir
035841f221
WIP: Adapted the old server thread class to the GameServerThread class to allow multiple clients to connect
...
tags: #story[1047] #pair[wmu16, mra106]
2017-07-11 17:03:32 +12:00
William Muir
752863a0d3
WIP: Created some basic controllers for the UI and started implementing backend for server stuff
...
Created GameState Class. Static, contains all info about current state of game: list of players and their respective details (coords etc) also Host info
Clients will observe this GameState class
Upon pressing host, new GameState is created and new GameConnectionListener created which listens for connections
Player class created which will be used to take each connection and store it as a player with other info about them regarding the game in the GameState class
tags: #story[1047] #pair[wmu16, zyt10]
2017-07-10 16:03:13 +12:00