Commit Graph

104 Commits

Author SHA1 Message Date
Jocke 2c3122bbdb increased Network buffer size, fixed 2 crashes and re-added the ability to kill oneself with the use of a key bound to TakeDamage,Value. 2016-02-12 08:39:20 +01:00
Jace bb66f95d43 Enabled server broadcasting PlayerDamage events to other players to make damage indicators work 2016-02-12 07:03:14 +01:00
Tleety d357e365cb Merge remote-tracking branch 'origin/TCPConnections' into WeaponSystem
# Conflicts:
#	include/Engine/Network/Server.h
#	src/Engine/Network/Client.cpp
#	src/Engine/Network/Server.cpp
2016-02-12 05:21:00 +01:00
Jace 787eecce26 WIP 2016-02-12 04:03:22 +01:00
stiffly afd9e24df6 Reverted last commit. Also testing to delay OnPlayerSpawn event for clients. No progress... 2016-02-11 21:23:53 +01:00
Jocke e0c3a32e66 Merge branch 'master' into TCPConnections
# Conflicts:
#	include/Engine/Network/Client.h
#	include/Engine/Network/Server.h
#	include/Game/Game.h
#	src/Engine/Network/Client.cpp
#	src/Engine/Network/Server.cpp
#	src/Game/Game.cpp
2016-02-11 16:26:42 +01:00
Jocke eb244f87c4 Added disconnect functionality and removed some warnings. 2016-02-10 23:27:46 +01:00
Jocke ec54b1298d Reconnect is now possible. 2016-02-10 21:02:46 +01:00
Jocke 9645169797 Merge remote-tracking branch 'origin/master' into TCPConnections
# Conflicts:
#	include/Engine/Network/Client.h
#	include/Engine/Network/Network.h
#	include/Engine/Network/Packet.h
#	include/Engine/Network/Server.h
#	src/Engine/Network/Client.cpp
#	src/Engine/Network/Packet.cpp
#	src/Engine/Network/Server.cpp
#	src/Tests/HealthSystemTest.cpp
2016-02-10 17:05:07 +01:00
Jocke 4f2ad3ad00 Reliable message should now be working, further testing is to be done. 2016-02-10 16:16:56 +01:00
Jocke 2ec30fd2b2 Cleaned up code and fixed crash when closing client before server when using udp. 2016-02-10 11:28:03 +01:00
Jace d83190290f Server now broadcasts certain input commands to all other clients (for stuff like shooting) 2016-02-09 19:37:42 +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
Jace d3bc48f5f7 Major networking refactoring to allow for snapshot filtering outside of netcode 2016-02-09 13:22:21 +01:00
Jocke fccd8c64e7 WIP Clients are working properly, servers are not. 2016-02-09 11:43:16 +01:00
Jocke ba9419b342 Moved UDP logic from Hybrid server/client to UDP server/client. fixed bug in Server::CheckForTimeOuts. 2016-02-08 14:32:00 +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
Jocke 7bf4f5c30e Merge remote-tracking branch 'origin/master' into TCPConnections 2016-02-03 10:29:36 +01:00
Jocke e133791369 WIP Reliable Message 2016-02-03 10:28:15 +01:00
Jocke 6a3f585fb9 Fixed warnings associated with Network.cpp, Client.cpp, Server.cpp and Packet.cpp.
BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT': macro redefinition was fixed by https://svn.boost.org/trac/boost/ticket/11539
2016-02-02 13:26:15 +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 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