Jocke
2ec30fd2b2
Cleaned up code and fixed crash when closing client before server when using udp.
2016-02-10 11:28:03 +01:00
Jocke
d2ed293183
Network is now working as udp or tcp. Next step is making the hybrid.
2016-02-09 19:14:56 +01:00
Jocke
88d7b79cd3
TCP and UDP Client are working for 1 connected player, more players are not tested yet
2016-02-05 18:30:31 +01:00
Jocke
9232b24a7b
WIP Reliable message
2016-02-04 15:49:04 +01:00
Jace
b6ba8a5bd7
Network snapshot buffer size increased, needs to be looked over later
2016-01-24 23:05:26 +01:00
Jace
382eff169f
Server refactoring to remove player dependency and lots of fixes.
2016-01-24 21:20:43 +01:00
Jace
0fb1dbcae1
Client now has authority over its own absolute position and orientation until we have reliable input messaging
2016-01-24 19:00:50 +01:00
stiffly
2eaad2aa00
Client now responds to deleted entity and component in server
2016-01-24 17:16:26 +01:00
Jocke
6d2c656a04
Merge remote-tracking branch 'origin/Networking' into Networking
2016-01-23 16:41:42 +01:00
Jocke
2bf0434bcb
Remade Snapshot logic from component based to entity based.
2016-01-23 16:40:38 +01:00
Jace
4d5cbb6057
fixup! Added EntityWrapper::IsChildOf and made snapshot interpolation and rendering exceptions for player less hacky
2016-01-23 12:14:29 +01:00
stiffly
b37b20b7d8
Didn't bulid lol. Fixed.
2016-01-22 17:57:31 +01:00
stiffly
389e057611
EPlayerSpawned special logic added to server and client.
2016-01-22 17:49:21 +01:00
stiffly
08c476e9e3
Added kick logic to the server. Also typedefed.
2016-01-22 15:42:36 +01:00
stiffly
08fcdb382b
Used config for a lot of things
2016-01-22 13:18:53 +01:00
stiffly
fcc9d64e7a
Now publishes an EPlayerDisconnected event
2016-01-22 10:58:10 +01:00
Jocke
6cd073c3c8
Added network metrics logging and reactored code.
2016-01-22 10:32:54 +01:00
Jocke
cd67253173
Added logic to go from spectator to player.
2016-01-20 17:41:16 +01:00
Jocke
00588b07c5
Merge branch 'Networking' of github.com:teamfisk/TacticalZ into Networking
...
# Conflicts:
# src/Engine/Network/Client.cpp
# src/Engine/Network/Server.cpp
2016-01-20 16:30:12 +01:00
stiffly
3376f4a16e
Added server has timed out logic to client. (>'')>
2016-01-20 16:27:53 +01:00
Jocke
25d2aa3464
"Supporting" spectators. Using a vector for connected units as we do not interpret as players. ““”̿ ̿ ̿ ̿ ̿’̿’̵͇̿̿з=(•̪●)=ε/̵͇̿̿/̿ ̿ ̿ ̿ ̿’““
2016-01-20 16:27:23 +01:00
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
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
a858dab8b6
Network not longer threaded
2015-12-18 12:00:14 +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
stiffly
0b714e593f
Removed WinLeakCheck. Minor variable name changes. removed IsWASDKeyDown struct
2015-12-17 17:56:15 +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
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
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
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
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
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
58952725e9
Added class Package to help refactor the code. The code got easier to read.
2015-12-10 17:07:18 +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
stiffly
2a35c3055e
Renamed NetworkDefines.h --> NetworkDefinitions.h
2015-12-09 11:08:57 +01:00
stiffly
58db7b755a
Random bugfixes and cleanup.
2015-12-08 18:24:08 +01:00
Jocke
94adaf8ae3
Added support for multiplayer.
...
Reactored code, clumped together variables in PlayerDefinition.h.
Integrated server with entity system.
2015-12-08 16:41:22 +01:00