-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Discussion] Idea's related to spliting the code #124
Comments
I think there a golang server that does this.. Are u a pyqt dev.. interestingly i checkout the code the other night so helping this project along is still my curious.. (mainly simulating a real railway .. the heart of wales line) |
Hi @mdziczkowski , As said by @pedromorgan , this is already the case. From v0.7 onwards, the code in this repo is only the client + the editor (because they share a lot of code, though they should be separate in an ideal world). The protocol used between the server and the client is not REST but websocket, because we need it to be both fast and bidirectional. Check https://github.com/ts2/ts2-sim-server/blob/master/docs/ts2-technical-manual.adoc for the complete explanation of the architecture and the protocol. |
Can we play with mqtt ?? |
we need to setup some RPI's with a simulator live ;-)) maybe an rpi stack here...
kinda working its way into modelling with arduino and rpi |
Yea, but MQTT has still a long way to go until reaching perfection... @pedromorgan Not exactly pyqt developer, but I write some code in python3 |
Hey Nicolas.
I wanted to give you some ideas that may help you spliting the code and make it communicate with each other.
If you create an API that use REST (as an communication protocol in between the parts) then it would make you easier to split it into a smaller modules
the client should contain only the main program (small size) that would:
display the main interface
handle the connections and communication with the server
interpreting the data
All game specific functions and resources should remain on the server side to don't cause following (with is common with online games that download all data to the client side):
Both above would decrease the user's experience and may cause that the game (or in worse scenario: the device) become uresponsive
Adventages
Side notes:
I see that the work on v0.7 goes in the correct direction and I'm sure it will make the development much easier 🙂
I'm curious if there would be a good idea to use React for some UI parts 🤔
The text was updated successfully, but these errors were encountered: