Schwungus-Software / PNEngine

Fully external 3D engine for GameMaker
MIT License
2 stars 1 forks source link

Netgames #35

Closed LocalInsomniac closed 1 month ago

LocalInsomniac commented 5 months ago

Reimplement netgames using lockstep which is more suitable towards PNEngine's structure.

Reference

Desyncs could be detected by comparing game/level information periodically, for example.

LocalInsomniac commented 1 month ago

Goal 1 (Complete)

Create a tick queueing system. Clients will be using this to tick the game with input relays from the host. Currently, only the host should be able to control their character. Client input will be handled later.

Steps

LocalInsomniac commented 1 month ago

Goal 2 (Complete)

Allow each client to send input data to the host. The host should then queue those inputs in the Networking Async Event and apply it to the next tick.

Steps

LocalInsomniac commented 1 month ago

Some other ideas to consider:

LocalInsomniac commented 1 month ago

Goal 3 (Complete)

Implement game stalling by checking if any client hasn't ACKed tick packets for more than a certain amount of ticks (should be around half of TICKRATE). This should help laggy clients catch up with other players, otherwise they would be stuck on a frozen game that occasionally skips forward.

Steps

A naive implementation would be as follows: