SnowyMouse / chimera

The update to Halo PC that never was
https://chimera.opencarnage.net
GNU General Public License v3.0
137 stars 26 forks source link

Local Co-Op Multiplayer...? #92

Open michaelmouton opened 1 year ago

michaelmouton commented 1 year ago

Hi all

Just wondering, would it be possible to add story mode multiplayer over LAN? I think I read somewhere that the enemy AI doesn't work properly for this, simply it doesn't know what to do with two players (or more), but surely this can be fixed?

Again, just a really nice feature present in the original Xbox release, but annoyingly missing from the PC port.

Thanks to everyone who has contributed to this project!

SnowyMouse commented 1 year ago

Message ID: @.***>Oh, hey!

This is a good idea, although I guess this goes into the "many have tried but none have succeeded" territory. Let me explain.

The truth is that the AI works fine with two players, or else Xbox Halo wouldn't work. Heck, it'll probably work with 16 players. The actual problem is, unfortunately, a bit more annoying than that.

Basically, each client has their own version of events, and this isn't being synced. The netcode of the PC version does not sync this up for AI or scripting. It only syncs it for PVP, mostly.

And before you mention MCC, one important issue to note with it is that the input lag is very high on the other player. The reason for this is because MCC does not sync events, either. Rather, it syncs timing and input and keeps everything deterministic so that both games 'happen' to show the same thing. This is also how Xbox Halo: CE does System Link and why it seems everything gets synced (not much actually gets synced).

So, the solution is to either do what MCC does and sync tick timing and try to keep everything deterministic, and then just bite the bullet and accept the input lag (on LAN it won't be too bad at least). Or, to avoid input lag, we would need a brand new netcode to sync these events (and also account for things like scripting, etc. since those need synced as well!).

Both are doable. Doing what MCC does is probably easier for a mod. But doing either would be very hard without source code access. I do think a decomp would be better suited for this.

Sledmine commented 1 year ago

We (Shadowmods modding team) have done something like this already trough lua scripting using Chimera and the power of modding in general, it is not perfect but it's playable and you can have a good time with friends:

https://www.youtube.com/watch?v=7M0_Dc6v0N4 https://www.youtube.com/watch?v=168_26a9L1g

It is not a reimplementation of the netcode nor a decompilation but we have some plans for that 👀 https://github.com/Sledmine/coop-evolved

Sledmine commented 1 year ago

Btw we have invited you to play before @SnowyMouse :( hit us with a message whenever you are free to play :3