How to splitscreen/couch coop?

Discuss anything ZDoom-related that doesn't fall into one of the other categories.

Re: How to splitscreen/couch coop?

Postby Daniel » Thu Oct 03, 2019 9:53 am

I was veery long hoping that some day ZDoom/GZDoom would finally have splitscreen support - something like 15 years ago... thanks a lot for the people that allowed this to be possible!

After some tests, I finally made it work with player 1 in keyboard and player 2 in a XBOX controller. But I couldn't make it run with two XBOX controllers, since GZDoom is (still) not compatible with multiple controller support. I've tried to use Joy2Key and separate INI files for each instance, but it didn't work for two reasons: a) the keyboard is only detectable by the window in focus, so the controller bindings via Joy2Key don't work in both instances; and b) the controllers are always detected by both GZDoom instances - and also the buttons. Actually, we can remove each controller sensitivity, but not the working buttons for each controller.

If we could select the controllers to be used in GZDoom (avoiding it to use ALL at once), this problem would be solved quickly, since we could make two separate INI files, each one using a different XBOX controller.

Follows a screenshot of GZDoom(s) running perfectly!
You do not have the required permissions to view the files attached to this post.
User avatar
Daniel
 
Joined: 04 Jul 2004

Re: How to splitscreen/couch coop?

Postby drfrag » Thu Oct 03, 2019 5:17 pm

So XInput joysticks already worked in the background... I added support for 4 DInput controllers in LZDoom (will be in the next release) and XInput controllers are compatible with DInput. For it to work you need to configure the axes for each instance (set all to none for players not using that joystick). Previously the buttons were the same for all joysticks (same events).
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: How to splitscreen/couch coop?

Postby Zenon » Sun Nov 17, 2019 10:20 pm

What mod is that a screenshot of?
Is it something you've made/you're making?
User avatar
Zenon
Mostly Confused
 
Joined: 21 Apr 2006
Location: New Zealand
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: How to splitscreen/couch coop?

Postby drfrag » Mon Nov 18, 2019 11:45 am

I've been confirmed that multiple XInput controllers work in LZDoom as DInput ones disabling ingame XInput support.
RUDE also supports fake splitscreen out of the box (same as old Choco) but since it's on SDL1 you cannot resize the window freely.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: How to splitscreen/couch coop?

Postby johnkimonster » Mon Mar 30, 2020 5:11 pm

So... Hello, people

I was playing mods for some months now, and then stumbled wih this thread and tried to configure lzdoom with the the backgroundvideo thing as true and the backgroundaudio thing as true too, with the second window connecting to 127.0.0.1.

And it works perfectly... except for the background input thing. As only the character on the focused window can be controlled, while the one from the other window just stares at them moving.

So... I looked at this:

drfrag wrote:I've tested this and it doesn't work.
DabbingSquidward wrote:Last time I recall only the window in focus would receive inputs, be it gamepad or otherwise.

That's precisely the problem, otherwise it would work well on a dual core pc. It doesn't work on windows, can this input problem be easily solved? That would be great.

Edit: allowing gamepads to work in the background would solve this.
DISCL_BACKGROUND: The application requires background access. If background access is granted, the device can be acquired at any time, even when the associated window is not the active window.

https://bell0bytes.eu/directinput/

Edit2: done. :mrgreen: https://github.com/drfrag666/gzdoom/com ... d52b9a3c14


And i don't know what to do with that.

I guess it is some change made at some part of the code ¿right? I dunno

So then, i was wondering if someone here has already compiled some copy of lzdoom for windows for themselves (it doesn't matter if is a 32 or 64 version) with that change implemented. and if that copy could be shared here.

I am not really in particular need of the "multiple input" thing, as my brother and me agreed we could configure different parts of the keyboard at both copies (he: wasd+keyboard me: arrows+ctrl+space+dot strafing, MsDOS style), and then use two keyboards. So my problem is kind of simpler than usual ¿i guess?

Anyway thanks for your attention (very common phrase here to end letters, i guess it doesnt sound good in english)
johnkimonster
 
Joined: 30 Mar 2020
Operating System: Windows 10/8.1/8/201x 64-bit

Re: How to splitscreen/couch coop?

Postby drfrag » Tue Mar 31, 2020 3:09 am

Keyboard and mouse input only work in the foreground, you need a DirectInput or XInput gamepad (or several). And to configure them for each instance.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: How to splitscreen/couch coop?

Postby johnkimonster » Tue Mar 31, 2020 10:55 am

¿Then what about sszdoom?

¿is it mandatory to have a gamepad too if its just une program?
johnkimonster
 
Joined: 30 Mar 2020
Operating System: Windows 10/8.1/8/201x 64-bit

Re: How to splitscreen/couch coop?

Postby drfrag » Tue Mar 31, 2020 3:42 pm

It only worked with two XInput gamepads i believe.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Re: How to splitscreen/couch coop?

Postby johnkimonster » Thu Apr 02, 2020 9:46 pm

Wow...

It's a shame, because there still a whole silent crowd out there that could benefit from sharing a more user friendly split screen way to pley this otherwise accesible, low spec, funny and full of fresh mod content game, specially in countries like mine, where most of the households have a poor internet connection, and more family members than computers.

I mean, at least i know a lot of nerdy 3rd world boys and girls (me included, of course) and not-so-boys and not-so-girls, who have some golden memories with their siblings playing splitscreen PS2 UT or Smash Brothers, turned houses in The Sims 1, Hotseat Civilization, or old-ass two-controller Playstation 1 games (at least here in Mexico, there was some huge revolution of pirated PSX games sold at equivalent of 2/3 dollar outside elementary schools in the 2000s, and i suspect in Brazil too, because now they have a giant modding comunity of that one PS1 YuGiOh game)

TLDR: Then i go back to my original question...

¿Does someone here have a binary of 64 bits lzdoom with the background directinput change already implemented to share, so i can go questing in search of some chinese controller at pericoapa or the frikiplaza or something like that?
johnkimonster
 
Joined: 30 Mar 2020
Operating System: Windows 10/8.1/8/201x 64-bit

Re: How to splitscreen/couch coop?

Postby drfrag » Fri Apr 03, 2020 3:20 am

But if you had read the previous messages right above yours you'd had noticed the feature is in and it's not that hard to set up. In RUDE it also works and it's easier to setup but that's a Chocolate Doom fork without viewport scaling. In LZDoom now the joy_background cvar defaults to true so no need to change that. The key is to set axes to none for each controller in the other instances (and you need to configure the buttons of course). Any cheap controller will do (i use a pair of those joint by a cable). Don't forget to change the cvars for audio and video. See changes here:
viewtopic.php?f=231&t=62157
Edit: the feature is in also in ZDoom32 (it's faster), but there isn't a joy_background cvar there.
User avatar
drfrag
Os voy a romper a pedazos!
Vintage GZDoom Developer
 
Joined: 23 Apr 2004
Location: Spain
Discord: drfrag#3555
Github ID: drfrag666

Previous

Return to General

Who is online

Users browsing this forum: Redead-ITA, Superdave938 and 3 guests