-
Notifications
You must be signed in to change notification settings - Fork 38
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
Offline-Online asset synchronization #235
Comments
Awesome, @osse101! Thanks for getting the discussion started here :)
Ideally these two steps would see the merging of such scripts so that there was no longer duplication for online and offline modes. |
@Cheeseness This would actually be duplication of work and should be called a merge, as you said. Updated my first post to say as such. |
The PlayerInfo class should work for offline since you can just ignore the online-only bits.
I'll work on moving the netobj into the main menu and loading all it's settings from the config file when I get back. |
This is going to be a hell of a headache, but it needed to be done sooner rather than later, so glad to see work on it has begun! In regards to this point:
In my mind, what's needed is a generic PlayerManager type layer that can work across modes (which is what networkVariables more or less does now, but only for online games), and then a generic GameManager that can do networkObject's work for online across offline and online (i.e. world loading, and also potentially game state stuff). As for PlayerInfo, I agree with @bobsayshilol that it can be used perfectly fine for offline as well (in fact, in the current implementation I create PlayerInfo objects for local ball markers) - the data inside PlayerInfo just needs to be properly created and managed (which networkVariables does currently for online, and a generic PlayerManager would hopefully do). Anyways, I think what I've described is more or less what you have in mind anyways. Are these changes still in the planning stages or being currently implemented? |
Ah yes I've started moving the code over - I want to say it's almost done, but if I do I'll find a bug and be stuck on it for a while. The current implementation follows similar ideas:
A GameManager hasn't been implemented yet, but I assume that's just for offline script loading since that's all the networkManager scripts? |
Sounds like you've made fantastic progress!
What you describe your rework of networkObject as is more or less what I imagined GameManager being - basically, something to manage all the objects and data that is consistent between offline and online. Anyways, can't wait to check out how it all works when it's in! |
I didn't get around to adding a PlayerManager class, but other than that it's all there now.
Ah good to hear we were both on the same page then 😄 |
Here's my view of what things should move towards
Firstly, I feel everything should be ripped from level_full and level_full_local_multi except for the level specific content i.e. lighting, course, flag, environmental. That'd give us a single scene that can be populated with either online/offline players. In this scenario, players/carts/customization/network connections would have already been decided in the preceding lobby menu and the level scene would start by positioning objects at their spawn points, dividing the screen into player cams, and the general stage start sequence. And put a controller script on players to manage state change between menus, pre-level, level, and post-level.
Edit: To clarify the end state after these changes:
Shared prefabs for offline/online
Levels are runnable by either offline/online.
1 of each script with local/network handling as needed
The text was updated successfully, but these errors were encountered: