Fractal Softworks Forum

Starsector => Mods => Topic started by: Nick XR on January 30, 2017, 09:56:06 AM

Title: [0.9.1a] Cooperative Multiplayer Combat v3.6 (2020-05-03)
Post by: Nick XR on January 30, 2017, 09:56:06 AM
Cooperative Multiplayer Combat v3.6
-=Download=- (https://bitbucket.org/NickWWest/starsectorcoopcombat/downloads/CoOpCombat.3.6.zip)

Now your friends can help out in combat with this shared screen/couch co-op/multiplayer mod


Wolf (https://www.youtube.com/watch?v=WLHARMaR1uU) Scarab (https://www.youtube.com/watch?v=Yu1nPrlll44)



New UI Elements
(http://i.imgur.com/DNfK33q.png)
Readiness color key:

3 players
Spoiler
Full Video (https://www.youtube.com/watch?v=_i_-nIJTgD0)
[close]

Features:

-=Download=- (https://bitbucket.org/NickWWest/starsectorcoopcombat/downloads/CoOpCombat.3.6.zip)

How to use
1. Download & install this mod
2. Make sure this mod is enabled
3. When combat starts and ships are deployed, have your friend press the Select Ship key ('Insert' by default for player 2)
4. During combat, have your friend use the keys specified in mods/CoOpCombat/Player2.json to pilot their ship (if you change the settings, you'll need to restart Starsector)
5. If sharing a keyboard is hard (or awkward), use a second keyboard or a game pad that can emulate keys.
6. When combat starts, zoom out more than usual so your friends show up on the screen
7. -optional- Install the CombatAnalytics mod (http://fractalsoftworks.com/forum/index.php?topic=11551.0) so you can see who's better.
 
Player-game interface changes

How To: Controller Support (optional)

How To: Internet/Remote Play
Install a game streaming app (like Parsec.tv (https://parsecgaming.com/)), you'll need a decent internet connection to pull this off.

How To: Change Key Bindings
Spoiler
Code
ESCAPE
1
2
3
4
5
6
7
8
9
0
MINUS
EQUALS
BACK
TAB
Q
W
E
R
T
Y
U
I
O
P
LBRACKET
RBRACKET
RETURN
LCONTROL
A
S
D
F
G
H
J
K
L
SEMICOLON
APOSTROPHE
GRAVE
LSHIFT
BACKSLASH
Z
X
C
V
B
N
M
COMMA
PERIOD
SLASH
RSHIFT
MULTIPLY
LMENU
SPACE
CAPITAL
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
NUMLOCK
SCROLL
NUMPAD7
NUMPAD8
NUMPAD9
SUBTRACT
NUMPAD4
NUMPAD5
NUMPAD6
ADD
NUMPAD1
NUMPAD2
NUMPAD3
NUMPAD0
DECIMAL
F11
F12
F13
F14
F15
F16
F17
F18
KANA
F19
CONVERT
NOCONVERT
YEN
NUMPADEQUALS
CIRCUMFLEX
AT
COLON
UNDERLINE
KANJI
STOP
AX
UNLABELED
NUMPADENTER
RCONTROL
SECTION
NUMPADCOMMA
DIVIDE
SYSRQ
RMENU
FUNCTION
PAUSE
HOME
UP
PRIOR
LEFT
RIGHT
END
DOWN
NEXT
INSERT
DELETE
CLEAR
LMETA
RMETA
APPS
POWER
SLEEP
[close]

Mod compatibility

What this mod is not and will not be (even though it might be cool)

Using this mod in other mods
This mod is covered by the MIT license, you can do what ever you want with this, no need to ask.  Just be nice and mention that this mod exists and where you got it from

Acknowledgements
Some code related to rendering was taken from the excellent Leading Pip Mod, attribution is here by granted to Magehand LLC per licensing.


Change Log
Spoiler
3.6
 * Players can now change which ship they are controlling during battle ('Insert' key by default for player 2)
 * Players can now retreat. Simply order a retreat and switch ships until no one is controlling any retreating ships.
 * Changed how keys are configured to be a bit simpler to add additional players
 * Backwards compatible

3.5
 * Made many values configurable in the CoOpCombatSettings.json
 * Increased lock-on range
 * Added engage/regroup toggle for carriers
 * Player 2+ aiming reticles are larger
 * Attempts at fixing Auto-Fire issue.

3.4
 * Add ability to toggle phase-cloak

3.3
 * Prevent exception when transferring command

3.2
 * Now works with Starsector .9a

3.1
 * Add mission support, just edit the variant of a ship to be "player#" like you would with the ship name
 * Added experimental PvP mission (Doing anything more interesting would require work)

3.0 - Now works with Starsector .8.1a, minor graphical improvements


 2.0 - UI elements for:
        * Selected weapon group
        * Weapon cooldown
        * System cooldown
        * Weapons have their own targeting lane
        * Switching between weapon groups now works (had to disable autofire)

 1.0 - Created
[close]

Forum: http://fractalsoftworks.com/forum/index.php?topic=11598.0
Source: https://bitbucket.org/NickWWest/starsectorcoopcombat
License: MIT License (Do what ever you want, creators not liable)
Title: Re: [0.7.2a] Cooperative Combat (2017-01-30)
Post by: Azmond on January 30, 2017, 10:02:11 AM
That... looks pretty cool. I could see setting it up with particular hard-ware for player-two like a custom button set, Otherwise, having the AI controll the weapons and the Player controll the weapon-group would be an effective control I think.

I'd love to see a video of this, the GIF doesn't give it justice. xD

This is a pretty good idea though! I did something similar with my brother that was a fun experiment. It wasn't a mod, we just gave each other differnt controlls of the ship. I managed the thrust, weapon-groups and Ship-system (keyboard) he managed the shield, weapon fire, and steering of the ship... (the Mouse). It was fun, and difficult!
Title: Re: [0.7.2a] Cooperative Combat (2017-01-30)
Post by: Nick XR on January 30, 2017, 12:02:38 PM
Cool to hear that you and your brother play!  I loved the coop mod for M&B (inspired this) and I feel like there's a lack of good couch-coop games in general.

Like I mention in the main post, I've had a good experience with a friend using a gamepad and this mod.  The controls actually feel pretty natural, and in general I think the controls for SS would translate really well to a dual stick controller.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: SpaceRiceBowl on January 30, 2017, 12:51:40 PM
Ok wow, this might open up Starsector to an actual online multiplayer.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Nick XR on January 30, 2017, 01:03:16 PM
Ok wow, this might open up Starsector to an actual online multiplayer.

I want to manage expectations here, there's a strong limit about what can be done without it requiring hundreds of hours of Alex's programming time.  Maybe best case scenario is people play the heck out of this and something like multiplayer gets put on the road map.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Takion Kasukedo on January 30, 2017, 05:15:19 PM
I look forward to seeing how far this can go.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Deshara on January 30, 2017, 10:57:16 PM
Hey Alex, any chance of getting support for a in-combat split-screen of the combat field? Sounds like a smallish tweak that would open up a huge field of opportunities for mods like this to go hog-wild
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Tartiflette on January 31, 2017, 12:19:00 AM
  • No visual indicator of which weapon groups are selected
  • No visual indicator of cool downs

Mmh I recently uploaded a plugin to create rasterized UI elements (http://fractalsoftworks.com/forum/index.php?topic=6452.msg196268#msg196268), you may want to look it up for these issues.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Inventor Raccoon on January 31, 2017, 08:07:51 AM
Hey Alex, any chance of getting support for a in-combat split-screen of the combat field? Sounds like a smallish tweak that would open up a huge field of opportunities for mods like this to go hog-wild
Yes. If you wanted it to have a use in normal gameplay, have the screen split if the last enemy in a battle is destroyed out of the player's sight, so they can watch as it explodes.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Nick XR on January 31, 2017, 09:45:27 AM
  • No visual indicator of which weapon groups are selected
  • No visual indicator of cool downs

Mmh I recently uploaded a plugin to create rasterized UI elements (http://fractalsoftworks.com/forum/index.php?topic=6452.msg196268#msg196268), you may want to look it up for these issues.

Wow, thanks, that's exactly what I need! 

That thread looks like a gold mine.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Mr. Nobody on January 31, 2017, 03:22:11 PM
Spoiler
https://www.youtube.com/watch?v=YeeLyUSa5Vw
[close]
Now it's just a matter of getting two instances of Starsector to talk together (AIs and all) and we can have PvP matches
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: MesoTroniK on January 31, 2017, 03:50:47 PM
Never
Going
To
Happen
Ever
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Midnight Kitsune on January 31, 2017, 04:18:40 PM
Spoiler
https://www.youtube.com/watch?v=YeeLyUSa5Vw
[close]
Now it's just a matter of getting two instances of Starsector to talk together (AIs and all) and we can have PvP matches
The day that happens is the day that swine discover the secrets of flight, hell freezes over AND politicians start telling the truth and become un-corruptable!
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Mr. Nobody on February 01, 2017, 04:31:14 AM
Spoiler
https://www.youtube.com/watch?v=YeeLyUSa5Vw
[close]
Now it's just a matter of getting two instances of Starsector to talk together (AIs and all) and we can have PvP matches
The day that happens is the day that swine discover the secrets of flight, hell freezes over AND politicians start telling the truth and become un-corruptable!

Depends.
If, somehow, one discovered the section of the code where a AI routine/Player input is translated into ship activity (moving, firing, etc), it could be possible to intercept the "commands" that regulate the movements of your own ships, send it to another computer, have this second computer replace the commands of it's player enemy's AI with the commands received (ie: translating Player1 allied ships movements into Player2 enemy ships movements and vice versa).
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Techhead on February 01, 2017, 05:46:07 AM
Multiplayer Offtopicness:
Spoiler
Never
Going
To
Happen
Ever

Years ago, people said the same about KSP, but modders found a way. If someone is sufficiently dedicated and skilled, they might just do it for SS. It might not be likely, but don't say never.
[close]

On topic:
This is really impressive. I just don't know how much I fancy playing without a mouse, though.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Tartiflette on February 01, 2017, 08:36:34 AM
Years ago, people said the same about KSP, but modders found a way. If someone is sufficiently dedicated and skilled, they might just do it for SS. It might not be likely, but don't say never.

There is a pretty big difference between a game built in an engine that is dedicated to support multiplayer games, and one in a custom engine that has nothing to even remotely help with multiplayer. Or at the least not in a legal "I-didn't-entirely-decompiled-and-recompiled-your-game" way.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Nick XR on February 01, 2017, 09:56:31 AM
On topic:
This is really impressive. I just don't know how much I fancy playing without a mouse, though.


FWIW, if player2 sticks to ships that meet the following criteria it's hardly different:

Which is probably at least half the combat ships.  If you use the "turn to mouse" option, then it'll probably be a big change for you, I don't but that might be a personal problem :)
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Midnight Kitsune on February 01, 2017, 11:04:16 AM
Years ago, people said the same about KSP, but modders found a way. If someone is sufficiently dedicated and skilled, they might just do it for SS. It might not be likely, but don't say never.

There is a pretty big difference between a game built in an engine that is dedicated to support multiplayer games, and one in a custom engine that has nothing to even remotely help with multiplayer. Or at the least not in a legal "I-didn't-entirely-decompiled-and-recompiled-your-game" way.
Spoiler
https://www.youtube.com/watch?v=YeeLyUSa5Vw
[close]
Now it's just a matter of getting two instances of Starsector to talk together (AIs and all) and we can have PvP matches
The day that happens is the day that swine discover the secrets of flight, hell freezes over AND politicians start telling the truth and become un-corruptable!

Depends.
If, somehow, one discovered the section of the code where a AI routine/Player input is translated into ship activity (moving, firing, etc), it could be possible to intercept the "commands" that regulate the movements of your own ships, send it to another computer, have this second computer replace the commands of it's player enemy's AI with the commands received (ie: translating Player1 allied ships movements into Player2 enemy ships movements and vice versa).
One of the main reasons why MP will never work is because in order to make it work, you would basically have to deobfuscate a ton of code, thus breaking the EULA. Also, certain mechanics would not work/ translate well (like the time dilation) to MP. And finally, it would be a complete PAIN to fight against people as stuff that is balanced for SP would NOT balanced for MP. I mean, imagine the amount of cheesy fleets that you would face most of the time!
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Mr. Nobody on February 01, 2017, 03:20:29 PM
That or a API by Alex.
In theory it shouldn't be too hard, a function that returns a given AI orders to a ship (ie: move left, vent, fire, use ability) and one that inputs orders to the ship (ie: the actual moving left, firing, venting, etc).

This way you could take the orders of a allied AI ship, send them over the internet (or any other system) and have them translated into enemy ships movements on another player's part.
This will be limited to a 2 players battle though, no true multiplayer with more than one player zipping around in the galaxy. Though it would be still interesting to see a small tournament where two players battle each other within some set of rules.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: TJJ on February 01, 2017, 04:17:47 PM
That or a API by Alex.
In theory it shouldn't be too hard, a function that returns a given AI orders to a ship (ie: move left, vent, fire, use ability) and one that inputs orders to the ship (ie: the actual moving left, firing, venting, etc).

This way you could take the orders of a allied AI ship, send them over the internet (or any other system) and have them translated into enemy ships movements on another player's part.

There's a lot more to it than that; accounting for latency requires the ability to rollback game state (to resolve disagreements between client game states).
Retrofitting such a networking solution to starsector would be a truly monumental task; even my unending optimism believes that solution to be impossible (without direct access to the source).

A more practicable solution is to make the game state deterministic, and just share (and buffer) player inputs.
It's all been thought about & discussed on the forums before, along with a significant amount of planning & prototyping work.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-02-02)
Post by: Nick XR on February 02, 2017, 12:28:03 AM
Version updated to .2

New videos on main post demonstrating UI bits and functionality.

New UI interface elements (thanks for reminding me about sprites Tartiflette)
(http://i.imgur.com/DNfK33q.png)

Rediness color key:
Green = ready
Yellow = almost ready
Orange = not close to ready
Red = out of ammo

Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: Mr. Nobody on February 02, 2017, 03:36:14 AM
There's a lot more to it than that; accounting for latency requires the ability to rollback game state (to resolve disagreements between client game states).
Retrofitting such a networking solution to starsector would be a truly monumental task; even my unending optimism believes that solution to be impossible (without direct access to the source).

A more practicable solution is to make the game state deterministic, and just share (and buffer) player inputs.
It's all been thought about & discussed on the forums before, along with a significant amount of planning & prototyping work.

Correct me if i am wrong but could a system similar to the one used in Supreme Commander work? It enforces a minimum lag of 500ms (iirc) between players so the game has time to synch everything properly.
I don't know how 501+ms lag is handled though.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-01-30)
Post by: TJJ on February 02, 2017, 04:50:12 AM
There's a lot more to it than that; accounting for latency requires the ability to rollback game state (to resolve disagreements between client game states).
Retrofitting such a networking solution to starsector would be a truly monumental task; even my unending optimism believes that solution to be impossible (without direct access to the source).

A more practicable solution is to make the game state deterministic, and just share (and buffer) player inputs.
It's all been thought about & discussed on the forums before, along with a significant amount of planning & prototyping work.

Correct me if i am wrong but could a system similar to the one used in Supreme Commander work? It enforces a minimum lag of 500ms (iirc) between players so the game has time to synch everything properly.
I don't know how 501+ms lag is handled though.

Yes, SupCom used a peer-to-peer deterministic lock-step model to keep the clients in perfect sync, and that 500ms enforced latency would be precisely because of the buffering necessary to achieve this.

There's an article on the subject here (http://www.gamasutra.com/view/news/35929/) that specifically mentions SupCom (among other RTS games).

- Making Starsector deterministic is relatively easy if you're familiar with Java instrumentation.
- Making it fixed time step is likewise doable
- Capturing, relaying, buffering & remotely interpreting user inputs (in a symmetric way) is a little more involved, but again nothing impossible.
- Making the AI behave symmetrically is an unknown to me at this point, as I've not looked at that code yet. Though I don't anticipate it being too hard to work around, or fix if necessary.
- Building the backend for matchmaking, leaderboards etc etc is time consuming, but straightfoward.

With modern broadband, I'm hoping SS MP will have a much increased simulation rate (and thus a far smaller input buffer); something in the range of 100ms.
Though there's no reason it can't dynamically tune itself to the latency between the clients involved.
I've tested the game with an artificial latency on inputs, and it remains perfectly playable well above 200ms; in fact almost unnoticeable most of the time.
That said, aiming ship weapons does suffer a little, especially on the smaller ships.
Fortunately most of the time you defer weapon targeting to the AI, and as that's part of the simulation it's obviously unaffected by the latency.

Implementing it is all perfectly possible, and well within my understanding; it's just a case of finding the time  :-\

Ironically the most difficult part so far has been writing instrumentation to inject menu options.
You'd think it'd be straightforward....(and it would be, if it were a good gui API like Swing or Javafx)... but the home brew ui that Starsector uses is... shall we say... less than perfect. :'(
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-02-02)
Post by: Cyan Leader on February 02, 2017, 06:19:16 AM
This looks amazing, thanks for the effort.

No mouse function and no split screens are still big issues but one step at a time I suppose.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-02-02)
Post by: Elijah on February 02, 2017, 10:58:41 AM
This is amazing, thank you very much for the effort you put into this!
(basically the same post as above, but it truly is amazing. Multiplayer regarding Starsector has always been, in my mind, like this idea)
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-02-02)
Post by: gruberscomplete on February 02, 2017, 12:49:28 PM
I don't suppose that SS supports dual mice?

Then you could plug two mice into the computer and play with your friend without networking anything.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-02-02)
Post by: Nick XR on February 02, 2017, 01:09:16 PM
I don't suppose that SS supports dual mice?

Then you could plug two mice into the computer and play with your friend without networking anything.

No, SS probably gets the cursor position from the OS and I don't know of any OS that supports multiple cursors.  (You can have multiple mice controlling the same cursor though).

There are work-arounds for the lack of multiple mice that don't hamper gameplay IMO; only personally controlling guns that fire forward, only using forward fixed shields (although an AI will aim it if you have omni), and there's now a "cycle targets" command for targeting.



Title: Re: [0.7.2a] Cooperative Multiplayer Combat (2017-02-02)
Post by: TJJ on February 02, 2017, 02:01:33 PM
I don't suppose that SS supports dual mice?

Then you could plug two mice into the computer and play with your friend without networking anything.

No, SS probably gets the cursor position from the OS and I don't know of any OS that supports multiple cursors.  (You can have multiple mice controlling the same cursor though).

There are work-arounds for the lack of multiple mice that don't hamper gameplay IMO; only personally controlling guns that fire forward, only using forward fixed shields (although an AI will aim it if you have omni), and there's now a "cycle targets" command for targeting.

JInput allows you to query each and every input device connected to the computer; Mice, Keyboards, Game Controllers, etc.
As SS is built upon LWJGL, and LWJGL utilises JInput, you should have no trouble bypassing the LWJGL API and querying JInput directly.
So multiple mice should absolutely be possible.

Not done it myself though.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Deshara on February 06, 2017, 10:51:27 AM
So, TODO list for this to up in scope: support for multi-mouse input in SS, bug Alex just for support for split screen
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Nick XR on February 06, 2017, 01:08:40 PM
My current todo list:
* Improve UI elements for the additional players (indicators for each weapon)
* Support for .8x
* Make a compelling video of multiplayer in action
* See about auto scaling the viewable area to always show both ships

I'm not sold on the use case of there being a need to support a second mouse input.  I don't see a scenario where a second player has a mouse at the same desk or couch and can actually play.  But, this is open source, so if anyone wants to code it up and submit a pull request I'll happily merge it.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Deshara on February 06, 2017, 10:00:48 PM
My current todo list:
* Improve UI elements for the additional players (indicators for each weapon)
* Support for .8x
* Make a compelling video of multiplayer in action
* See about auto scaling the viewable area to always show both ships

I'm not sold on the use case of there being a need to support a second mouse input.  I don't see a scenario where a second player has a mouse at the same desk or couch and can actually play.  But, this is open source, so if anyone wants to code it up and submit a pull request I'll happily merge it.

I have my PC hooked into my entertainment center, this is a wireless keyboards/mice from the couch household! Splitscreen PC support is an automatic plus for me
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: drugon on March 12, 2017, 04:44:11 PM
I just wondering how development is going. Will there be support for missions also?
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Nick XR on March 13, 2017, 09:51:37 AM
I just wondering how development is going. Will there be support for missions also?

Dev work is waiting on SS.8, the only remaining items I have are: Better PlayerN UI scaling, update main post with Joy2Key config, update main post with actual people playing together.

I haven't messed around with missions since SF.4, if the ship names are kept in the mission definition file it would simply be a matter of renaming them to get things to work. 

I'm glad someone has actually used the mod! Not even I can wrangle a meat space friend to play.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: cjuicy on March 13, 2017, 11:37:09 AM
Perhaps add controller support? Left stick for movement/turn, d-pad for strafe, right stick for aiming etc.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Nick XR on March 13, 2017, 12:32:55 PM
Perhaps add controller support? Left stick for movement/turn, d-pad for strafe, right stick for aiming etc.

You can use JoyToKey (http://joytokey.net/en/) to enable controller support in SS.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Midnight Kitsune on March 13, 2017, 03:51:26 PM
Perhaps add controller support? Left stick for movement/turn, d-pad for strafe, right stick for aiming etc.

You can use JoyToKey (http://joytokey.net/en/) to enable controller support in SS.
Or Steam if you have it installed. Hell I have an already built 360 layout for SS that, while still a WIP, is still pretty decent.
A WARNING though: If you have not used the Steam Gamepad system AND you play non Steam gamepad games, Steam will hijack the control scheme and make those non Steam games a B**** to play unless you close Steam down. (And of course you can't make a damn Trouble Ticket anymore...)
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: drugon on March 13, 2017, 03:58:22 PM
I haven't messed around with missions since SF.4, if the ship names are kept in the mission definition file it would simply be a matter of renaming them to get things to work.  

I'm glad someone has actually used the mod! Not even I can wrangle a meat space friend to play.
And I'm glad that someone decided to make such a great mod. ^_^ As for missions - there is a fleet editor though you can only change model names but not name of ships unfortunately.
P.S. Tested it with another friend via Internet using Steam. Yes unfortunately mod don't work with missions cause you can't rename ships there - only their models.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Delta7 on March 13, 2017, 07:44:18 PM
HELL YES!!
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: drugon on May 08, 2017, 09:10:39 AM
Are any updates in plan?
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Deshara on May 08, 2017, 10:31:28 AM
almost nobody's updating till 8.1, fyi. 8.0 has a mod-preventing bug
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: drugon on June 05, 2017, 12:06:31 PM
And as I see 8.1 is here!
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Nick XR on June 06, 2017, 07:56:18 PM
I'll get to my mods this weekend.  Been sucked into the Rimworld  (http://store.steampowered.com/app/294100/RimWorld/)A17 update...
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Ranakastrasz on June 06, 2017, 09:17:03 PM
Quote
Player-game interface changes:
No mouse to control where a shield faces, instead an AI is used to "aim" the shield
Is it possible to make that a standalone mod?
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Nick XR on June 06, 2017, 09:57:18 PM
Quote
Player-game interface changes:
No mouse to control where a shield faces, instead an AI is used to "aim" the shield
Is it possible to make that a standalone mod?

Based on others saying it's possible to have a second mouse recognized by the game input management probably.  Am I going to do it?  Probably not, I'm not sold that others will use more than one mouse at a time on a PC.  I might do it if I have time.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: TaLaR on June 07, 2017, 01:12:44 AM
Based on others saying it's possible to have a second mouse recognized by the game input management probably.  Am I going to do it?  Probably not, I'm not sold that others will use more than one mouse at a time on a PC.  I might do it if I have time.

Why not? Technically, I already use 2 mouses and 2 keyboards, although for different reasons (wired for working/playing, wireless for couch).
Extra Kb&mouse are much cheaper than half-decent gamepad, for example. And any long time pc-user is likely to have slightly malfunctioning spares anyway.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Linnis on June 07, 2017, 01:37:33 AM
I think is you have a friend whos going to play with you a separate mouse will totally be not much more work then installing a mod.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: Ranakastrasz on June 07, 2017, 05:26:38 AM
Quote
Player-game interface changes:
No mouse to control where a shield faces, instead an AI is used to "aim" the shield
Is it possible to make that a standalone mod?

What?

I meant for single player make the AI control your shield.
Based on others saying it's possible to have a second mouse recognized by the game input management probably.  Am I going to do it?  Probably not, I'm not sold that others will use more than one mouse at a time on a PC.  I might do it if I have time.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: drugon on June 08, 2017, 08:08:16 PM
Additional mouse support is a great idea. Hope it will appear.
Title: Re: [0.7.2a] Cooperative Multiplayer Combat v.2 (2017-02-02)
Post by: obuw on July 20, 2017, 07:21:18 AM
I have just noticed the existence of this mod (haven't checked the forum for ages, I'm still stuck on 0.6.5 :p), and I'm absolutely thrilled to test this out! I don't even care in the slightest about it not being updated to 0.8+, couch coop on starsector is truly a dream come true.

Only one question though - does this have any compatibility issues with other mods?

In addition, is there even the technical possibility of the supporting two mouses? I'd love to put everything aside and actually work on that for the next two days just to try to get it working.

Oh and finally, I think maybe Rana was asking if you can make the "AI aims the shield" functionality into a separate mod that can possibly be used in a singleplayer game (for the main player's ship)
Title: Re: [0.8.1a] Cooperative Multiplayer Combat v.3 (2018-06-29)
Post by: Nick XR on June 29, 2018, 08:30:09 PM
Updated for 8.1a

Minor graphical improvements.
Title: Re: [0.8.1a] Cooperative Multiplayer Combat v.3 (2018-06-29)
Post by: drugon on October 19, 2018, 11:18:12 PM
What about missions support? Will it be implemented?
Title: Re: [0.8.1a] Cooperative Multiplayer Combat v.3 (2018-06-29)
Post by: Nick XR on October 20, 2018, 01:47:22 PM
What about missions support? Will it be implemented?

Yeah, I'll give it a shot.  I have some ideas how it might work.
Title: Re: [0.8.1a] Cooperative Multiplayer Combat v.3 (2018-06-29)
Post by: Nick XR on October 20, 2018, 09:37:12 PM
3.1 Release
* Now supports missions.  Refit your fleet and modify the variant name to be "Player#" like you would your ship name in the campaign.
* PvP Mission!  There's a new PvP mission that pits an onslaught vs onslaught.  Player 2 can't choose/modify the variant that is used in game.  To make those modifications would require making a new variant and referencing it in pvparena/MissionDefinition.java file. 
Title: Re: [0.9a] Cooperative Multiplayer Combat v.3.2 (2018-11-18)
Post by: Nick XR on November 18, 2018, 04:46:12 PM
3.2 Release
* Updated for .9a
Title: Re: [0.9a] Cooperative Multiplayer Combat v.3.2 (2018-11-18)
Post by: Cyan Leader on November 21, 2018, 07:45:51 AM
Thanks a lot of this. During winter I have a friend visiting and I'm definitely trying this out. Maybe pipe dreams but dual mouse support or slit screen would be amazing!
Title: Re: [0.9a] Cooperative Multiplayer Combat v.3.2 (2018-11-18)
Post by: dk1332 on December 04, 2018, 12:42:19 AM
Got a bug when trying to transfer to another ship during combat.

Spoiler
3753673 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ClassCastException: com.fs.starfarer.combat.ai.movement.maneuvers.TransferCommandAI cannot be cast to com.fs.starfarer.api.combat.ShipAIPlugin
java.lang.ClassCastException: com.fs.starfarer.combat.ai.movement.maneuvers.TransferCommandAI cannot be cast to com.fs.starfarer.api.combat.ShipAIPlugin
   at com.fs.starfarer.combat.entities.Ship.getShipAI(Unknown Source)
   at data.scripts.coopcombat.CoOpEveryFrameCombatPlugin.renderInWorldCoords(CoOpEveryFrameCombatPlugin.java:45)
   at com.fs.starfarer.title.C.K$Oo.new(Unknown Source)
   at com.fs.starfarer.combat.super.OoOO.new(Unknown Source)
   at com.fs.starfarer.combat.CombatState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

Title: Re: [0.9a] Cooperative Multiplayer Combat v.3.2 (2018-11-18)
Post by: Nick XR on December 08, 2018, 10:43:40 AM
Got a bug when trying to transfer to another ship during combat.

Spoiler
3753673 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.ClassCastException: com.fs.starfarer.combat.ai.movement.maneuvers.TransferCommandAI cannot be cast to com.fs.starfarer.api.combat.ShipAIPlugin
java.lang.ClassCastException: com.fs.starfarer.combat.ai.movement.maneuvers.TransferCommandAI cannot be cast to com.fs.starfarer.api.combat.ShipAIPlugin
   at com.fs.starfarer.combat.entities.Ship.getShipAI(Unknown Source)
   at data.scripts.coopcombat.CoOpEveryFrameCombatPlugin.renderInWorldCoords(CoOpEveryFrameCombatPlugin.java:45)
   at com.fs.starfarer.title.C.K$Oo.new(Unknown Source)
   at com.fs.starfarer.combat.super.OoOO.new(Unknown Source)
   at com.fs.starfarer.combat.CombatState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

Thanks for the find! Uploaded a fix v3.3
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.3 (2018-12-08)
Post by: akeean on May 25, 2019, 10:34:56 PM
Bump. For online play, instead of VNC use the Parsec.tv streaming app. You'll get MUCH better image quality and really low latency.

It wants a host that can do x264 or x265 hardware encoding as fast as possible (I used it with a laptop Nvidia GT 730M with success) and as client even an atom based iGPU is allright.

This allows for 60fps really low latency streaming and input. It can even forward gamepad inputs, tho I haven't tried it myself yet, but I've played Warframe on it streamed over internet onto a tablet. Pretty sweet.
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.3 (2018-12-08)
Post by: LtSnoWolf on August 20, 2019, 04:50:49 AM
Getting a instant crash to desktop whenever co-op partner hits their assigned shield/phase key while using phase ships.

Spoiler
425598 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.coopcombat.CoOpShipAI.advance(CoOpShipAI.java:259)
   at com.fs.starfarer.combat.entities.Ship$ShipAIWrapper.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.3 (2018-12-08)
Post by: Nick XR on August 20, 2019, 01:59:28 PM
Getting a instant crash to desktop whenever co-op partner hits their assigned shield/phase key while using phase ships.

Spoiler
425598 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain  - java.lang.NullPointerException
java.lang.NullPointerException
   at data.scripts.coopcombat.CoOpShipAI.advance(CoOpShipAI.java:259)
   at com.fs.starfarer.combat.entities.Ship$ShipAIWrapper.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advanceInner(Unknown Source)
   at com.fs.starfarer.combat.CombatEngine.advance(Unknown Source)
   at com.fs.starfarer.combat.CombatState.traverse(Unknown Source)
   at com.fs.state.AppDriver.begin(Unknown Source)
   at com.fs.starfarer.combat.CombatMain.main(Unknown Source)
   at com.fs.starfarer.StarfarerLauncher$1.run(Unknown Source)
   at java.lang.Thread.run(Unknown Source)
[close]

Fixed, new build is up (see OP).  Thanks for the report!
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.4 (2019-08-20)
Post by: NinjaSiren on October 09, 2019, 08:53:19 AM
May I ask how to make this work? Me and my friend has Starsector (latest version), and we planned to test this via LAN. When we tried to follow your steps we could not make it work. I cannot see him from the combat mode.
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.4 (2019-08-20)
Post by: Nick XR on October 10, 2019, 08:16:36 AM
LAN play is easy since bandwidth isn't a problem. One of you will need a desktop sharing app (read this thread, there are good suggestions). Then read the OP again for making this work.  Good luck!
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.4 (2019-08-20)
Post by: LtSnoWolf on November 25, 2019, 11:28:48 AM
Been playing a lot of Starsector with this mod recently since you fixed the phase cloak thing, thanks a lot for the mod and that fix! The whole thing works surprisingly well over something like Parsec even with 200 ping(as long as the connecting players stay away from agile frigates), and has been the source of many, many long running playthroughs with friends. I'd like to suggest some changes I think would improve it though.

Co-op players currently(as far as I looked) don't have the ability to use carriers properly, lacking a key to toggle 'engage' and 'regroup'. Player2's lock-on also doesn't have enough range to really make use of long range missiles like Pilums.
The dotted aiming reticle for co-op players is a bit difficult to see when zoomed out, even locally for me but especially over stream, making it hard to use really long range ships like Sylphon's planet cracker. It would be nice if there was a alternative more defined reticle or the ability to have a two color high contrast reticle to make it more readable in big fights.

Some bugs that showed up during playtime too.
Spoiler
Bigger Scy Nation ship's like the capitals, when player2 is controlling them will vent at a certain flux level when not receiving direct damage as if being flown by AI. Every other function of the ships work fine.

Seemingly randomly autofire will turn off on potentially any ship regardless of player2's inputs, including them messing with autofire and holdfire in many combinations to try and fix it. The only fix I found is after the battle it happened in, to go into refit and flick the weapon group off autofire and then back on again. During the battle if the main player transfers into player2's ship when the bug happens, they will see autofire is all as normal and it will work fine but when player2 has control it stops working again. I will keep trying to see if I can find a way to reproduce this reliably but it's somewhat rare.
[close]

Thank you so much again for such a great mod!
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.4 (2019-08-20)
Post by: Nick XR on November 26, 2019, 09:31:47 AM
Been playing a lot of Starsector with this mod recently since you fixed the phase cloak thing, thanks a lot for the mod and that fix! The whole thing works surprisingly well over something like Parsec even with 200 ping(as long as the connecting players stay away from agile frigates), and has been the source of many, many long running playthroughs with friends. I'd like to suggest some changes I think would improve it though.

Co-op players currently(as far as I looked) don't have the ability to use carriers properly, lacking a key to toggle 'engage' and 'regroup'. Player2's lock-on also doesn't have enough range to really make use of long range missiles like Pilums.
The dotted aiming reticle for co-op players is a bit difficult to see when zoomed out, even locally for me but especially over stream, making it hard to use really long range ships like Sylphon's planet cracker. It would be nice if there was a alternative more defined reticle or the ability to have a two color high contrast reticle to make it more readable in big fights.

Some bugs that showed up during playtime too.
Spoiler
Bigger Scy Nation ship's like the capitals, when player2 is controlling them will vent at a certain flux level when not receiving direct damage as if being flown by AI. Every other function of the ships work fine.

Seemingly randomly autofire will turn off on potentially any ship regardless of player2's inputs, including them messing with autofire and holdfire in many combinations to try and fix it. The only fix I found is after the battle it happened in, to go into refit and flick the weapon group off autofire and then back on again. During the battle if the main player transfers into player2's ship when the bug happens, they will see autofire is all as normal and it will work fine but when player2 has control it stops working again. I will keep trying to see if I can find a way to reproduce this reliably but it's somewhat rare.
[close]

Thank you so much again for such a great mod!

Hey great that you find the mod useful! I'll work on the issues you pointed out this week and see what I can get sorted out.  Thanks for letting me know you like it!

If you (or anyone) wants to help, what I really need is a short video of people actually playing and talking.  I think that would be more compelling than the tech-demo video I have on the OP :P
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.5 (2019-12-02)
Post by: Nick XR on December 02, 2019, 10:12:46 AM
Version 3.5 is out, save compatible and what not.

3.5
 * Made many values configurable in the CoOpCombatSettings.json
 * Increased lock-on range
 * Added engage/regroup toggle for carriers
 * Player 2+ aiming reticles are larger
 * Attempts at fixing Auto-Fire issue.
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.5 (2019-12-02)
Post by: LtSnoWolf on March 07, 2020, 03:16:57 PM
Sorry if I don't post very often, been a bit sick. All the changes last patch are great, being able to have a co-op partner in a battlecarrier and going after targets they sick their fighters on in a faster ship is a lot of fun. The reticle changes made it much easier to see over a stream and zoomed out all the way even when theres tons of fighters and explosions all over the place. Also I have yet to encounter the autofire bug with quite a lot of playtime, it seems your fix works, yay!

I would like to record some gameplay of me playing with a friend and our normal comms, but it'd be from a very heavily modded game if that's alright. Speaking of mods I don't know if I should put this in the Scy thread but, after using some of the other ships in the Scy mod theres something that causes a good portion of them when in the hands of player2 to auto vent randomly at 40% or so flux, like the AI is still in control of that function since it seems to be normal behavior for Scy ships to want to vent at that level whenever they have a opportunity.
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.5 (2019-12-02)
Post by: Nick XR on March 07, 2020, 03:56:46 PM
Sorry if I don't post very often, been a bit sick. All the changes last patch are great, being able to have a co-op partner in a battlecarrier and going after targets they sick their fighters on in a faster ship is a lot of fun. The reticle changes made it much easier to see over a stream and zoomed out all the way even when theres tons of fighters and explosions all over the place. Also I have yet to encounter the autofire bug with quite a lot of playtime, it seems your fix works, yay!

I would like to record some gameplay of me playing with a friend and our normal comms, but it'd be from a very heavily modded game if that's alright. Speaking of mods I don't know if I should put this in the Scy thread but, after using some of the other ships in the Scy mod theres something that causes a good portion of them when in the hands of player2 to auto vent randomly at 40% or so flux, like the AI is still in control of that function since it seems to be normal behavior for Scy ships to want to vent at that level whenever they have a opportunity.

Oh good, glad it's working better for you and that the autofire bug is fixed.  Hard to fix stuff you can't repro locally...

I'll take any recordings of this, mods are totally fine!

Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.5 (2019-12-02)
Post by: Mitroll on April 11, 2020, 05:28:22 AM
How do Player2 and Player3 retreat? Player1 can retreat with enter, but player 2 and 3 just keep bouncing off the border.
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.5 (2019-12-02)
Post by: Nick XR on April 12, 2020, 01:43:38 AM
How do Player2 and Player3 retreat? Player1 can retreat with enter, but player 2 and 3 just keep bouncing off the border.

Oh, hadn't thought of that, for now you can't but I'll get something worked out, might be a bit though.
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.5 (2019-12-02)
Post by: Mitroll on April 12, 2020, 02:38:51 AM
Thanks for the quick reply. Trying to play a campaign with my friends, but we're pirates playing on a really difficult start, so no retreat is making it impossible.

Perhaps if there was a way for p2 and p3 to relinquish control back to the AI, they could do that and we could give a retreat order? Thanks for your hard work.
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v.3.5 (2019-12-02)
Post by: Nick XR on April 12, 2020, 01:22:50 PM
Thanks for the quick reply. Trying to play a campaign with my friends, but we're pirates playing on a really difficult start, so no retreat is making it impossible.

Perhaps if there was a way for p2 and p3 to relinquish control back to the AI, they could do that and we could give a retreat order? Thanks for your hard work.

You might try using ConsoleCommands `EndCombat` to force combat to end until I get a fix for this worked out.
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v3.6 (2020-05-03)
Post by: Nick XR on May 03, 2020, 10:36:37 PM
3.6 released

Changes:
Title: Re: [0.9.1a] Cooperative Multiplayer Combat v3.6 (2020-05-03)
Post by: Cyan Leader on May 03, 2020, 11:03:55 PM
Thanks a lot for this. I plan on trying it eventually.