Version: 0.0.6-develop
Tile inspector, one of the prominent OpenRCT2 additions, calls all the functions directly to modify global game state. This makes it unusable for multiplayer, as it only affects client's local state.
It is currently hidden in multiplayer, but with recent emergence of high profile servers, especially https://nedesigns.com one, there is an interest in having this feature available for multiplayer as well.
This issue is meant to track progress of converting tile inspector from using direct calls to using our engine event loop based on game_do_command calls.
Things to do:
I have assigned this to myself for now, as I will try spearheading the effort, but others are welcome to contribute too. Looking at you @Broxzier ;)
For reference, you can see an example of such conversion here: e25c768a3e1ab6c79f2f931cf7ffa1f75d7ce89c. This had all required functionality already in place, but I expect some new code for handling actual commands will be needed. For the commit in question you can see the code for handling it: https://github.com/OpenRCT2/OpenRCT2/blob/3037e6f/src/openrct2/ride/ride.c#L3958 and what it does in the end: https://github.com/OpenRCT2/OpenRCT2/blob/3037e6f/src/openrct2/ride/ride.c#L3803
Duplicate of #3245?
Part of it or a sub-issue. There are more debug tools than just TI. But thanks for pointing it out, I sometimes do create duplicates and in any case it's useful to have them linked even if not a dupe.
One way you could do this, is send the entire tile to the server which replaces the old one. It would reduce parameterising the game command to all the different things it needs to do.
@IntelOrca: For large elements (track pieces, large scenery) they cover multiple tiles, so then multiple tiles will need to be sent over. Another issue with that is that when more than one person is working on the same tile, their changes might be overwritten.
For large elements (track pieces, large scenery) they cover multiple tiles, so then multiple tiles will need to be sent over
I suppose you could send all of them, but I hadn't thought about this so maybe it's not such a good idea.
Another issue with that is that when more than one person is working on the same tile, their changes might be overwritten.
I wouldn't worry about that - that's going to cause problems either way, they would only lose one or two changes.
@Broxzier in case you are not familiar with our event loop, it goes roughly like this:
This skips some details, but provides a general idea of how it all works.
Yes, some changes may get overwritten if two users modify the same tile in a compatible way (otherwise the second change would be prevented from happening, as the state has already been mutated), but they would be overwritten atomically, so there's no danger of ending up in some state in between. It will be either player A's or player B's state.
However, until we do refactor of game commands, there's limited space in arguments and it might turn out better to perform what it does now, only from within game command handler.
How demanded is it?
Note; #4673 & #4985 should probably get merged before, will probably cause less issues
Edit; @Broxzier Saw on Gitter that quote, but from _where_
@Nubbie The paint clipping PR will not have conflicts with this. Quote from janisozaur on gitter:
nedesigns folks requested that as their #1 feature that's missing from MP
_"that"_ meaning this request
I'm curious to see where they ask for this.
I asked some people when I was connected to their server. Sadly, it was on another person's computer and I don't have the logs to prove.
Doesn't that always happen when someone ask about something? They always want more and more not thinking about the complications?
It's a feature people would say yes to but doesn't mean it would be used, free is good, more is better
_Note; my knowledge about getting TI in MP is that it's hard to get right and in the first place working correctly_
This is a valid point, @Nubbie. I asked them this question just now: http://www.nedesigns.com/topic/32012/openrct-advantages-and-disadvantages/?p=713117
Getting TI in MP will be some work, but I think it is quite useful and I would like to see all our tools being available in MP just like in SP. At this point I'm willing to spend some time porting it and so does @Broxzier, so I see no reason why can't we just do it ;)
The responses so far from the thread:
^being able to use tile_inspector. I find it quite annoying having to delay my park, because I need to go into tile inspector to do something.
-- nicman http://www.nedesigns.com/topic/32012/openrct-advantages-and-disadvantages/?p=713118
Multiplayer is just incredible, well done.
-- Louis! http://www.nedesigns.com/topic/32012/openrct-advantages-and-disadvantages/?p=713119
The only thing missing from multiplayer is the tile inspector. Other than that, it's perfect.
-- GammaZero http://www.nedesigns.com/topic/32012/openrct-advantages-and-disadvantages/?p=713140
I asked for input from some more acknowledged members of their community, but so far it looks like TI missing is indeed a hurdle to them.
@janisozaur
Louis quote doesn't say much about it and Nicman is more from multiplayer in general than NEdesign, but I get the point and if plausable, go for it :p
Implemented in #5110
Most helpful comment
The responses so far from the thread:
--
nicmanhttp://www.nedesigns.com/topic/32012/openrct-advantages-and-disadvantages/?p=713118--
Louis!http://www.nedesigns.com/topic/32012/openrct-advantages-and-disadvantages/?p=713119--
GammaZerohttp://www.nedesigns.com/topic/32012/openrct-advantages-and-disadvantages/?p=713140I asked for input from some more acknowledged members of their community, but so far it looks like TI missing is indeed a hurdle to them.