Closed Beider closed 4 years ago
I added a new feature so the MDGameSession can now optionally buffer packed scenes, this makes it a lot faster when instancing the same scene repeatedly over the network.
These changes can probably be ignored, with the exception of the enum fix for the log level. With the way the compare works Force actually logged nothing, now it logs everything as intended.
Added another feature, random name generation for network nodes. It is likely that you spawn multiple instances of the same scene (such as players) if you don't give them each a unique name then you will not have a good time.
If enabled this feature will check all existing networked nodes and if a collission is detected it will add a random number to the end of the name. Then run itself again to check that the new name does not conflict with any existing names.
There's some mismatch with indenting spaces vs tabs (the github diff shows it well) that needs fixing
Thanks for the hint, I fixed this now I think. I will have some time to work on networking this week and I had some ideas for some new features. I will outline them in the issues section
I just realized now that a bunch of my in progress code got tangled in here with my other code. Also I added a scene buffer that keeps scenes in memory instead of always loading from disc if active.
If this is too much of a pain to merge please let me know what I could do to help there.
Thanks for all the comments I see I left more of my local code in there I will fix it now before I head off to bed, should have it all done in half an hour or so I think.
Oh yeah, can you also squash them into 1 commit, including "Fixes #5" in the message.
That should be it.
There, never done a squash before but wasn't so bad. I hope all is correct now.
All good, I just realized GitHub has squashing integrated with merging PRs now so it's not necessary :P
The Vector extension class names do not match the file name so I fixed this. I also added PlayerName to the PlayerInfo and added a new event to GameSession that deals with a player name being changed.
Sorry about the diff on GameSession not sure how to fix that, I only added The event, function to call the event and removed the useless assignment from GetOrCreatePlayerObject(int PeerId)