RevolutionMP

Okay I'm leaving the on death thing for now, it's doing me head in ;)

It seems that the popup handler isn't getting called when I okay the 'choose player' dialog when I'm playing in a pitboss directIP game, but it IS getting called if I'm playing a directip game from in the game (with just one player) doesn't make any sense and of course stupid python's not reporting any errors of any kind, so who knows...
 
Wheeee!! Playing 2 player simultaneous turns direct IP and we're both AutoAIPlaying ourselves into a frenzy...

If one of us is on autoplay then your move happens automatically and you automatically end turn and wait for the other player to make their manual move, as soon as they hit end turn, your next move is auto done and you wait again for them to end turn. If they then activate AutoPlay, it starts to whiz through as it does in single player. It stops for any Rev popups on either player's PC, they make their choice, and Ctrl-Shift-X and set Autoplay back on, next turn, then ziiiip again... No OOS or anything. Works a treat.

I've figured out the cause of what I believe to be all the remaining OOS issues too. Basically the revolution pop-up dialogs are automatically relaying the choice the player makes to all players when OK is clicked, who are receiving these messages and acting on the results as if it was their own pop-up. So for e.g. they all think THEY are the ones who are going to lead the rebel army.

There would likely be much harder to debug random OOS's coming later down the line if you choose the seemingly working options too. For e.g. to grant independence to a civ. All the things that are used to generate the syncing CRC; random seeds, populations, plot yields, unit positions, resources etc, would be identical, so there would be no OOS reported for a good while.

But on each machine that human player would be the one who granted independence, and therefore would be the one to get the +whatever attitude bonus from the AI, ultimately changing decisions that AI will make later down the line on each machine, and causing different AI random rolls, so this will likely be the cause of any more random OOS's occuring later down the line.

But when choosing to lead the rebels, you have a situation where different players are controlling a civ on each machine, therefore different civs are AI controlled on each machine, so that's clearly an instant bang. :D

All this will be easy to solve now, by blocking the pop-up net messages from being transmitted and sending my own net messages myself I can control exactly what happens, and when it happens, to make sure they stay in sync.

Then I'll need to merge it into RevolutionMP and comment tag it all up (I've got it all in my mod at the mo and it's not releasable as it is) and I'll send it straight on.

Will probably be the weekend though, realistically... got stuff on tomorrow. But we're close!!!
 
Lemmy are you comfortable using an SVN? If so you should start using the current SVN release, and glider might consider adding you to the SVN user group so you can check in updates to RevMP.
 
Hell sure. I use perforce myself but would gladly use SVN to get the latest, and if I'm trusted to contribute via SVN then even better, cheers! :)
It's not my call who can and can't have SVN access. I see you are making actual coding contributions though, so it may be easier to give you access if you are comfortable with the SVN; especially if you keep any revisions you do in the RevMP branch. That's glider's and jdog's call though, but it looked like it made sense to bring it up and find out if you are using the SVN to keep updated.


@glider

How do you want to move forward with working MP into RevDCM? Do you want to try to merge in components from RevDCM into a working RevMP build, or do you want to try to peel off "problem components" from RevDCM to a point where MP is stable. Personally I think the only real issue right now in RevMP is the WoC gamefonts code. It seems like everything else is working (including most of the WoC code, alot of which is common sense stuff anyway, and should be included regardless, setting all the schema files so that every friggin tag doesn't need to be in the infos file is an example of something that should be kept from WoC regardless, in my humble opinion at least).

If you want to keep adding components, My preference would be to do the BUG merge next (and use the current RevDCM code for that, as Revolutions is an already fully set up BUG modular component in RevDCM). After BUG gets working, I'd say then Super Spies, and finally DCM stuff that people actually use, I see no point in porting over Battle Effects for instance, that should just be left out, or at least turned into an add on (Battle Effects is just a bunch of extra questionable code, no one uses and can really only cause problems). The thing that gets confusing though is, like I said, alot of WoC is common sense. It might make sense to port over the non questionable parts of WoC, such as the schema file changes, now. Though I think the gamefonts and ReadPass stuff should be saved till the very end, as it's possible these two things are what's breaking MP, and they also seem to be the main components no one really understands (and thus would be the most difficult to fix if they are causing issues).

Is there any specific task you would like to me work on here?
 
EDIT: A LOT of turns into the game I got an OOS after neither of the 'to fix' things occured in a game. The OOS happened at a random point in the game after no rev events, which leads me to believe it's either down to my own mod stuff, or some subtle thing has not been transfered across (perhaps the granting independence attitude modifier or something), I have no idea at this stage. Will look into it and if necessary merge the RevMP fixes into my verison of RevMP so I can test in a clean environment. Still we're close!!!

Confirmed fixed (or mostly fixed, see above) (2 player direct IP simultaneous turns test):

Player independent AIAutoPlay
Accepting civic changes now reflected properly on all players machines and stays in sync.
Choosing to lead rebels reflected properly on all players machines and stays in sync.
Taking control of new civ
Granting Independence

Still to fix:

ceding control to AI leader for X turns (event handler not being called, but the AIAutoPlay works so should work once this is solved)
Player dying OOS / change player dialog
 
Thanks for the info Lemmy. Ceding control to the AI leader looks like it is within grasp after you have cracked AutoPlayMP.

Yeah certainly Phungus is right. You would have contributed most EVER to the Revolutions mod in terms of MP. Pity you weren't around a couple of years ago! Gladly add you to the RevDCM SVN but from memory, Jdog is the one who actually can allocated developers. Let's get onto him via PM.

The holy grail is to fix RevDCM in MP! That one is probably some silly obscurity bug and my gut feel is the same as Phungus.......WoC. However that would be easy to check, just see how WoC works in MP on it's own, either WoC lite or WoC full.

I'll keep in touch but I'm out for any detailed work for the next few days.
Cheers
 
The holy grail is to fix RevDCM in MP! That one is probably some silly obscurity bug and my gut feel is the same as Phungus.......WoC. However that would be easy to check, just see how WoC works in MP on it's own, either WoC lite or WoC full.
Specifically I think it's being caused by the WoC code changes that handle the loading of the gamefonts. I'm inclined to blame this code for 2 reasons; first the bizarre icon behavior noted in MP games for some players, where the capital spawns a hundred and some odd fake religions really looks like an icon issue; and second this code is code that no one seems to understand at all, or is comfortable with. Most of WoC though is just straightforward, like the changes in the schema file which sets undefined tags as having a zero value; stuff like that is just common sense (should have been in the commercial version of BtS), and I see no way it could be causing issues. You're right though, the easiest thing to do would be to just fire up a copy of WoC light in MP and see if you can replicate the current bug you're getting with RevDCM (the problem though is that if no issues occur this doesn't rule out WoC, as this bug is not 100% reproduceable, but if it does occur, then we have isolated our culprit with near certainty).
 
Still trying to figure out that OOS, seems one of the players is randomly getting given a big bunch of extra commerce at some turn way down the line, so I'm adding logging to find out any changes in commerce and diffing them...

Man, this AIAutoPlay makes it a dream to test though. Just set it off to auto turn 1000 turns on both PCs and wait for it to blow. ;D
 
There's lots of niggley little things that pop out of the woodwork.

Turns out when the list of cities to revolt is created, it's sorted by revolution index and then reversed, making a list from highest to lowest.

Thing is, if two cities have the same index, then their ordering is undefined and they could end up in a different order, throwing game into OOS. Read up on and wrote a 'lambda expression' (which even after writing it I'm not 100% clear on how they work ;)) that should sort it by name secondary to the index, to ensure they're always in same order... this should help lots.
 
Back
Top Bottom