-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Add logic to share reputation, funds and contracts between clients #3
Comments
Just downloaded the project yesterday, got a server up and poking around in the code. My friend and I, both coders, would love to start a career together with shared resources. Any idea where to start for this enhancement? Thanks! |
Well you should create a new system based on the existing ones (like Asteroid system for example). Then subscribe to the proper game events like "OnFundsChanged" and when this event happens, send a new message type to the server specifiying the new funds. The server should also keep track of the funds at all times and send the funds when a client connects. The same applies to science and so on |
How is this feature going so far? I can't get the mod syncrio to work right so having the feature run by the server itself would be perfect |
I've lost a bit the track of LMP and work + personnal life takes most of my time. |
I think I'm going to work on porting Syncrio over to this mod. Syncrio uses a ton of shared code from DMP/LUNA, so it shouldn't be too hard to do this. I've also gone through a lot of the Syncrio and DMP code so I have a decent understanding of how everything fits together. |
So, I've started this one. I realized we need a group system for this to work, so I've started adding one here: #33. |
You changes look nice! I've just made them thread safe and adjusted the channels. |
Hey everyone, following up on what meyer9 said. I do agree that Syncrio could be ported over, and to be honest I always hoped Syncrio would be merged into DMP or LMP. And on that note, I'd like to help make that possible, but I'm not familiar with LMP code so I don't know how much help I will be. But if I can help in any way just let me know. |
Hi Caylis1397. At the end LMP is based on DMP but with the code refactored in smaller pieces. |
The group system isn't quite done, but once I finish that, I'll definitely start work on the science/funds system. |
THIS IS SUPER EXCITING!!!!
…-fan
Sent from my iPhone
On Oct 26, 2017, at 11:07 AM, Julian Meyer <notifications@github.com<mailto:notifications@github.com>> wrote:
The group system isn't quite done, but once I finish that, I'll definitely start work on the science/funds system.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#3 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AGGLjzUzGwIlK4ZYipHI0YDc7UzxMESKks5swLxYgaJpZM4KkKNJ>.
|
Added some documentation to the top, I don't know how the group system should be implemented as it involves screens and so on but sharing the science, contracts, funds and reputation shouldn't be very difficult |
Fixed the group system as it was not thread safe and was giving errors when we were connecting, also now they are stored as a file in case the server restarts. |
Hi! I'm looking into maybe perhaps helping out with this... what exactly still needs to be done after #33 ? |
add UI for the groups, share reputation, funds and contracts and then fix all the other stuff so it works with groups. @Restioson If you feel like helping out in coding go to the discord server so we can sort it out ;) |
@gavazquez I am on it already! Ping me sometime. |
If the group system ends up being prohibitively complicated for the moment: I think it would be completely reasonable to add the research sharing without it, for private servers to use if nothing else. |
A very basic 'sharing mode' would be very awesome, so we can play with some friends together. Groups and competition is nice to have but not necessary for basic coop gameplay (that i would love to see in LMP because Syncrio and DMP are not working very good for me and my friend). Maybe something simple could be implemented in the near future and extended with groups afterwards, so people doesn't need to wait that long. |
Update: |
Contact me on discord and we can sort things out |
Update: Also there is now a branch for this issue called: SharePlayerProgress. |
This work has been done by Malte so I close this task, in case there are errors on this we can open new issues to deal with them |
Subscribe to events:
GameEvents.OnFundsChanged
GameEvents.OnReputationChanged
GameEvents.OnScienceChanged
GameEvents.OnTechnologyResearched
In order to sync science, tech, reputation and tech nodes between clients.
Regarding contracts:
Subscribe to all events in GameEvents.Contract.XXX
We also need to create the tailored messages and systems in server and client.
IIR The contracts are stored in the scenario so they should be already synced between clients, otherwise is just a matter of fixing the scenario system
The text was updated successfully, but these errors were encountered: