Jocke
f52cddb445
Added packet loss logic for multiple clients.
...
Changed packet class to fit our needs.
2016-01-20 13:43:11 +01:00
Jocke
fc305f8bf4
Merge remote-tracking branch 'origin/Networking' into Networking
2016-01-18 17:27:55 +01:00
Jocke
0c7f2c5198
WIP implemented Interpolation (server logic)
2016-01-18 17:12:42 +01:00
stiffly
d7780d8248
WIP implementing interpolation
2016-01-18 17:11:37 +01:00
Jocke
d995713d3b
Added input queue to Client and Input Listener debug code in server.
2016-01-18 11:06:02 +01:00
Jocke
696f44a673
Added logic for mapping between ServerEntityIDs and LocalEntityIDs removed old code that wasn't used.
...
Added 1 map to Client and renamed m_ServerToClientMap to m_ServerIDToClientID.
// Good to know
To keep this structure please use insertIntoServerClientMaps() when adding items to them.
m_ServerIDToClientID and m_ClientIDToServerID maps between server EntityIDs and local EntityIDs.
To see if a local EntityID exist in m_ClientIDToServerID use clientServerMapsHasEntity(EntityID clientEntityID);
To see if server EntityID exist in m_ServerIDToClientID use serverClientMapsHasEntity(EntityID serverEntityID);
2016-01-14 17:11:54 +01:00
Jocke
db18a45368
We are now sending EPlayerDamage events.
...
Client now listens to EPlayerDamage events and send them to Server.
Server publishes EPlayerDamage events received from Client.
2016-01-14 10:16:11 +01:00
Jocke
a060640da3
Removed unnecessary unnecessary if in Client::OnInputCommand.
...
Change name from Server::parseEvent to Server::parseOnInputCommand
2016-01-13 18:00:12 +01:00
Jocke
f47f913bf5
Added logic for sending input from Client to Server.
...
Fixed so that snapshots set their parent correctly. Will get problems if we have more components
than unsigned int max size, but that was already a problem.
Client now maps Entitys received from server with local Entitys by mapping their EntityIDs.
2016-01-13 16:09:16 +01:00
Jocke
2284399538
Removed Close method from Client, Server and Network.
...
Removed legacy variable m_ThreadIsRunning in Client.h and Server.h.
Removed m_EventBroker->Unsubscribe(m_EInputCommand) in Client destructor.
2016-01-12 17:47:03 +01:00
Jocke
236230d12c
Packets now dynamically allocates more memory when they need it.
...
Increased local receive buffer for Client and Server() and removed the magic number that was used
In Server.h and Client.h
(char readBuffer[INPUTSIZE] = { 0 }).
Packets start size has now been increased to 512 bytes.
Changed ComponentInfo::FieldsInOrder to store strings instead of pointers.
Removed HasEntity() and are now using ValidEntity() instead.
2016-01-12 12:00:19 +01:00
Jocke
b37ffc7449
WIP Model component not working.
2016-01-11 14:58:49 +01:00
stiffly
f0ad28bac4
Removed some comments. Basically did nothing
2016-01-11 14:58:15 +01:00
stiffly
a858dab8b6
Network not longer threaded
2015-12-18 12:00:14 +01:00
stiffly
6d649e4d35
Merge remote-tracking branch 'origin/Networking' into Networking
...
# Conflicts:
# src/Engine/Network/Client.cpp
2015-12-18 11:26:48 +01:00
stiffly
5c1a93021b
Client now reads address and port from config file. Default address is set to local host.
2015-12-18 11:22:13 +01:00
Jocke
ad43cc44c3
Merge remote-tracking branch 'origin/Networking' into Networking
2015-12-18 11:03:21 +01:00
Jocke
30db0b10fd
Removed NetworkDefinitions.h and moved #define MAXCONNECTIONS 8
...
#define INPUTSIZE 128 to Network.h.
2015-12-18 10:36:14 +01:00
Jocke
97f8be1915
Made Network.h's Start() and Update pure virtual and removed cpp.
...
Removed unnecessary code from NetworkDefinitions.h.
Renamed sizeOfPackage to sizeOfPacket in Packet.cpp.
2015-12-18 10:21:56 +01:00
Jocke
0eb51a0fea
Merge remote-tracking branch 'origin/Networking' into Networking
...
# Conflicts:
# include/Engine/Network/Packet.h
# src/Engine/Network/Packet.cpp
2015-12-18 10:16:31 +01:00
stiffly
0b714e593f
Removed WinLeakCheck. Minor variable name changes. removed IsWASDKeyDown struct
2015-12-17 17:56:15 +01:00
Jocke
db5b6ad519
Added more error code to Packet class
2015-12-17 17:32:49 +01:00
stiffly
076030a252
Fixes, mostly name changes
2015-12-17 17:28:43 +01:00
stiffly
4bb4e29515
More cleaning code
2015-12-17 13:23:15 +01:00
stiffly
a6a08f48bb
Merge remote-tracking branch 'origin/Networking' into Networking
...
# Conflicts:
# include/Engine/Network/Client.h
# src/Engine/Network/Client.cpp
2015-12-17 11:24:34 +01:00
stiffly
ba831f8a3c
WIP Cleaning
2015-12-17 10:59:55 +01:00
stiffly
4c29e071af
Cleaned code
2015-12-17 10:47:08 +01:00
Jocke
2cb5441b1c
Merge remote-tracking branch 'origin/Networking' into Networking
...
# Conflicts:
# src/Engine/Network/Client.cpp
2015-12-17 09:47:15 +01:00
stiffly
97a0d97b0b
Can now send transform components.
2015-12-16 17:56:44 +01:00
Jocke
6da5fd1263
Restructured code and added bool to stop client from spamming Snapshots to a server when
...
it wasn't connected to one.
2015-12-16 15:47:51 +01:00
Jocke
6eebce05af
Merge remote-tracking branch 'origin/Networking' into Networking
2015-12-16 14:58:36 +01:00
Jocke
58a9d38e26
Added a class that client and server inherits from.
...
Class and server now share the same pointer i game.
You are now able to start a client and a server on the same computer.
2015-12-16 14:56:53 +01:00
stiffly
50ccf96268
Movement code not buggy anymore. Also changed package to not allocate more data than needed.
2015-12-16 13:52:16 +01:00
stiffly
a2d55feed1
Merge remote-tracking branch 'origin/Networking' into Networking
...
# Conflicts:
# src/Engine/Network/Client.cpp
# src/Engine/Network/Server.cpp
2015-12-16 11:12:15 +01:00
stiffly
082b3fd3df
Removed old input events from client
2015-12-15 17:22:46 +01:00
Jocke
e940c1d604
WIP
2015-12-15 14:55:56 +01:00
stiffly
478c692315
Refactoring. Client and server has Update Loop that runs before any game logic each frame.
2015-12-15 14:53:56 +01:00
stiffly
b698a0d36f
WIP
...
Adding models now crashes. Threading
Added a create player event that currently is not used.
2015-12-15 11:21:46 +01:00
Jocke
63db236dfa
Fixed bug which made the player not able to move diagonally.
...
Fixed a bug were m_PlayerID was not set for the client when connecting.
2015-12-14 16:35:43 +01:00
Jocke
01d7388f91
Reactored the package loss logic.
...
Server cannot handle multiple clients yet.
Fixed WorldTest code by adding astrix.
2015-12-11 11:55:23 +01:00
stiffly
641a43b2ec
Merge remote-tracking branch 'origin/Networking' into Networking
...
# Conflicts:
# src/Engine/Network/Client.cpp
2015-12-10 17:16:22 +01:00
stiffly
58952725e9
Added class Package to help refactor the code. The code got easier to read.
2015-12-10 17:07:18 +01:00
Jocke
99543a300d
Merge remote-tracking branch 'origin/Networking' into Networking
...
# Conflicts:
# include/Engine/Network/NetworkDefinitions.h
# include/Game/Game.h
# src/Engine/Network/Client.cpp
# src/Game/Game.cpp
2015-12-10 14:40:06 +01:00
Jocke
f377d9ba70
Fixed client movement.
2015-12-10 14:14:36 +01:00
stiffly
9a8f5293af
Can now Identify Packet Loss. Enumerated messages that loops around 0-1000.
2015-12-10 12:55:28 +01:00
stiffly
4de613814b
WIP Packet loss identification. Put packetID in message
2015-12-09 17:43:36 +01:00
Jocke
0807a7d0ae
Fixed the bug where starting a server made the program crash on closing.
...
Fixed some memory leaks in Client.cpp.
2015-12-09 14:43:43 +01:00
Jocke
ba150a264c
Fixed bug that cause the program to crash when closing if a server had been started.
...
Removed memory leaks in Client.cpp.
2015-12-09 14:41:26 +01:00
Jocke
0e6353dd79
Fixed bug where closing glwindow as client crashed.
...
Server bug is still present.
2015-12-09 13:37:02 +01:00
stiffly
247ff09743
Smoother movement over network. Some refactoring on client side. Now uses EKeyUp to determine if a key is pressed.
2015-12-09 13:02:39 +01:00