Open coffenbacher opened 8 years ago
Jup, should be a very good thing especially for automated testing gameplay features.
We'll be getting the game logic out of the client (while still using it somehow for the prediction). So the test you've described will be for the server code.
The different kind of test will be needed for the client part that plays the history. Because the history is what has been recorded after the execution of the game logic. For example, path finding is done on the server, so the history contains only a "rasterized" path.
Actually, I was thinking about the fastest way to see the multiplayer in action. While playing the game, make the client dump curves (in whatever form they are available) to stdout, pipe that to the second client that will be reproducing the game. It involves some shims "before" and "after" the game logic calculations, but no explicit headless launch...
Can we also just send the curves over loopback IP instead of stdout so it's consistent with needing a network stack?
Also, I got a little lost, where is the server code in your 3rd paragraph?
over loopback IP
It's faster to just std::cout than edit cmake to get the boost::asio/or-whatever working. Besides, network junkies haven't decided on the protocol yet, so it's temporary.
Also, I got a little lost, where is the server code in your 3rd paragraph?
We already have the server code on the client - it's the game logic. Now we need to record history and write it out.
Cool, got it.
I would love to be able to develop and run tests of the engine without spinning up the whole asset loading & graphics pipeline. Combining a simple test framework with the history / log discussed in Chipmunk's pull request this could enable powerful regression testing as well in the future.
For example, in some silly pseudocode, maybe testing wood gathering could look like this:
Perhaps this is already possible. If so, can someone point me in the right direction for doing so?
(This is a bit of a stupid reason / test compared to the architectural advantages of a headless mode, but I only develop on Linux over SSH (my local machine cannot effectively run it) and I'd love to be able to contribute without having access to Linux with a graphical environment. Except for the rendering pipeline, everything should be workable like that it seems.)