Commit graph

10 commits

Author SHA1 Message Date
Jakob Gillich e1cea787cf
fix docker build 2023-04-15 19:33:43 +00:00
Mazo 04e1f4209d
Merge pull request #866 from Mazo/publish-container
Fix publishing docker containers on push (tagged with sha for all pushes, master is tagged with sha, master, latest)
2021-07-02 18:14:03 +01:00
Renovate Bot a66db445ae
Update openjdk Docker tag to v18 2021-06-14 22:11:28 +00:00
Mazo f0d39f9943 Specify if ports are UDP or TCP in dockerfile 2021-06-13 23:26:01 +01:00
Renovate Bot f81d5503ae
Update openjdk Docker tag to v17 2021-05-07 09:39:52 +00:00
Jakob Gillich 407429ee21 Networking
The game uses a UDP-based protocol. Unlike TCP, UDP does not guarantee that
packets arrive, or that they arrive in the correct order. For this reason,
the game protocol implements those features using the following:

* All packets have a sequence number that is utilized for reordering
* Important packets are wrapped in a SlottedMetaPacket with a subslot number
* RelatedA packets ae used to request lost packets using the subslot number
* RelatedB packets are used to confirm received SlottedMetaPackets

All of these go both ways, server <-> client. We used to only partially
implement these features: Outgoing packet bundles used SMPs and could be
resent, but not all packets were bundled and there was no logic for requesting
lost packets from the client and there was no packet reordering, which resulted
in dire consequences in the case of packet loss (zoning failures, crashes and many
other odd bugs). This patch addresses all of these issues.

* Packet bundling: Packets are now automatically bundled and sent as
  SlottedMetaPackets using a recurring timer. All manual bundling functionality
  was removed.

* Packet reordering: Incoming packets, if received out of order, are stashed and
  reordered. The maximum wait time for reordering is 20ms.

* Packet requesting: Missing SlottedMetaPackets are requested from the client.

* PacketCoding refactor: Dropped confusing packet container types. Fixes #5.

* Crypto rewrite: PSCrypto is based on a ancient buggy version of cryptopp.
  Updating to a current version was not possible because it removed the
  MD5-MAC algorithm. For more details, see Md5Mac.scala.
  This patch replaces PSCrypto with native Scala code.

* Added two new actors:
  * SocketActor: A simple typed UDP socket actor
  * MiddlewareActor: The old session pipeline greatly simplified into a
    typed actor that does most of the things mentioned above.

* Begun work on a headless client

* Fixed anniversary gun breaking stamina regen

* Resolved a few sentry errors
2020-09-26 23:58:09 +02:00
Jakob Gillich f4fd78fc5d Restructure repository
* Move /common/src to /src
* Move services to net.psforever package
* Move /pslogin to /server
2020-08-26 06:19:00 +02:00
Jakob Gillich 170549982c
Use packed files to build docker image 2020-06-09 23:21:46 +02:00
Jakob Gillich e51e970e51
Update to Scala 2.13 & Akka 2.6.5 (#461)
* update scala to 2.13 & update dependencies

* fix test

* import scodec-akka

* scala 2.13 fixes

* Work around futures not completing when awaited within object constructor

Co-authored-by: Mazo <mazo2@hotmail.com>
2020-05-26 16:16:22 -04:00
Adam Curtis 1a6b1a7efa Add Docker file (#89)
* First attempt at Docker file

* Updated Dockerfile to download zip as opposed to cloning the repo

* Fixed issue with invalid WORKDIR
2017-03-19 17:58:53 -04:00