Would it be possible to set up splitscreen?

Post Reply
User avatar
WinkingBaby
Member
Posts: 42
Joined: Sun May 29, 2016 19:11
In-game: WinkingBaby

Would it be possible to set up splitscreen?

by WinkingBaby » Post

Does anyone know of a program that can focus on two windows at once? The reason I ask is because when trying to set up two clients at once the game will only focus on one window at a time, and I'd like to be able to focus on two to do a sort of split screen. If there isn't that would be a neat feature to implement. That and controller support.

Nyarg
Member
Posts: 276
Joined: Sun May 15, 2016 04:32

Re: Would it be possible to set up splitscreen?

by Nyarg » Post

2 PC + 'microsoft garage mouse without borders' with mode 'All computers' )
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )

User avatar
WinkingBaby
Member
Posts: 42
Joined: Sun May 29, 2016 19:11
In-game: WinkingBaby

Re: Would it be possible to set up splitscreen?

by WinkingBaby » Post

It's not really splitscreen if it requires 2 pcs.

Nyarg
Member
Posts: 276
Joined: Sun May 15, 2016 04:32

Re: Would it be possible to set up splitscreen?

by Nyarg » Post

As I know Windows OS technology allow only one window have focus at a time.
I am a noob. still yet. Not so noob ) [vml] WIP and a little proof for fun PlantedTorch )))
MT Strike 78a36b468554d101e0be3b0d1f587a555f396452 Great! Somebody have found it )
"My english isn't well" I know. I'm sorry )

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Would it be possible to set up splitscreen?

by Linuxdirk » Post

For Linux you can use X input lists. It will give you two mouse cursors (or in general the way to use multiple input devices at once each having their own representation in X). But no-one wants to mess with that :)

Maybe set up an VM and bind one set of input devices to the VM and unbind it from the host system?

User avatar
WinkingBaby
Member
Posts: 42
Joined: Sun May 29, 2016 19:11
In-game: WinkingBaby

Re: Would it be possible to set up splitscreen?

by WinkingBaby » Post

Yeah, might have to go with a virtual machine. Let's hope that doesn't harm performance too much.

TG-MyinaWD
Member
Posts: 356
Joined: Thu May 08, 2014 21:22
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .
Location: Far Eden

Re: Would it be possible to set up splitscreen?

by TG-MyinaWD » Post

There is actually a way you can play Minecraft PC same time but separate inputs and outputs. Mostly just need a Gamepad to function properly.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.

mijutu
New member
Posts: 4
Joined: Mon Aug 19, 2019 14:24

Re: Would it be possible to set up splitscreen?

by mijutu » Post

Running two minetests simultanously works quite well on X11, but Irrlicht (or the window manager) needs to choose one pointer to work with for each of the minetest instances.

Attached is a minimal patch to Irrlicht that makes it possible to choose a pointer with an environment variable.

On Debian/Ubuntu you can use it like this (file names from Debian buster)
  • sudo apt build-dep libirrlicht-dev
  • mkdir -p ~/src/irrlicht && cd ~/src/irrlicht
  • apt source libirrlicht-dev
  • zcat irrlicht_mpx.diff.gz | patch -p0
  • cd irrlicht-1.8.4+dfsg1
  • dpkg-buildpackage -b
  • sudo dpkg -i ../libirrlicht1.8_1.8.4+dfsg1-1.1_amd64.deb
Connect another keyboard and another mouse. Then create a second pointer and reattach one mouse and one keyboard to it, for example.
  • xinput create-master second
  • xinput list
  • xinput reattach "Name of a mouse" "second pointer"
  • xinput reattach "Name of a keyboard" "second keyboard"
Now you can run two minetests at once. Replace the numbers 2 and 16 with master pointer ids from output of xinput list
  • POINTER=2 minetest &
  • POINTER=16 minetest &
Attachments
irrlicht_mpx.diff.gz
Choose pointer with XISetClientPointer. Takes pointer id from POINTER environment variable.
(813 Bytes) Downloaded 99 times

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: Would it be possible to set up splitscreen?

by Festus1965 » Post

interesting, as what is faster ...
change the hands to the other set of Keyboard/mouse - or esc screen and move to other,
as on my 3 monitor system I often manages other gamer on 2nd monitor to setup their mess on my own
and yes, so also I could let 2nd mtc stand to be able to watch an area like spawn point beside, like webcam
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

mijutu
New member
Posts: 4
Joined: Mon Aug 19, 2019 14:24

Re: Would it be possible to set up splitscreen?

by mijutu » Post

I didn't try this, but I think you can use triggerhappy to set up a hotkey to reattach your keboard and mouse to another master pointer. This way you could switch between minetest instances with one keypress.

Another thing I didn't try yet: Set up split screen with multiple gamepads:
  • Run antimicro in uinput mode to generate as many virtual keyboards and mice as there are gamepads (are multiple antimicro instances needed for this?)
  • create master pointers with xinput
  • reattach the virtual keboards and mice to master pointers
  • run multiple minetest instances

Chiantos
Member
Posts: 377
Joined: Sun Jan 15, 2017 09:04

Re: Would it be possible to set up splitscreen?

by Chiantos » Post

Deleted message

mijutu
New member
Posts: 4
Joined: Mon Aug 19, 2019 14:24

Re: Would it be possible to set up splitscreen?

by mijutu » Post

I wrote a new mpx patch for current version of irrlicht.
  • Follow instructions for compiling minetest from source: Download minetest and irrlicht sources.
  • cd lib/irrlichtmt
  • zcat /tmp/irrlicht-mpx-1.9.0mt5.diff.gz |git apply -
  • Compile (and install if needed)
  • Do xinput setup and start minetest with POINTER environment variable same way as in the 2019 instructions
Attachments
irrlicht-mpx-1.9.0mt5.diff.gz
Choose pointer with XISetClientPointer. Takes pointer id from POINTER environment variable.
(884 Bytes) Downloaded 52 times

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Would it be possible to set up splitscreen?

by Linuxdirk » Post

Unlikely it will be added, but have you tried to create a pull request on Minetest’s Irrlicht fork?

mijutu
New member
Posts: 4
Joined: Mon Aug 19, 2019 14:24

Re: Would it be possible to set up splitscreen?

by mijutu » Post

I found a much easier way to do this: patch xwit instead of minetest.

I offered the patch to Debian: https://bugs.debian.org/cgi-bin/bugrepo ... ug=1019214

New instructions:

Patch and install xwit:
  • sudo apt build-dep xwit
  • apt source xwit
  • cd xwit-*
  • curl 'https://bugs.debian.org/cgi-bin/bugreport.cgi?att=1;bug=1019214;filename=xwit-mpx.patch;msg=5'|patch -p1
  • dpkg-buildpackage -b
  • sudo dpkg -i ../xwit_*.deb
Connect another keyboard and another mouse. Then create a second pointer and reattach one mouse and one keyboard to it, for example
  • xinput create-master second
  • xinput list
  • xinput reattach "Name of a mouse" "second pointer"
  • xinput reattach "Name of a keyboard" "second keyboard"
Run two minetests simultaneously:
  • minetest & minetest &
  • xwit -pointer $(xinput --list --id-only 'Virtual core pointer') -id $(xwininfo |awk '/^xwininfo: Window id:/{print $4}') -xisetpointer
  • Click the minetest window where you want to use your primary mouse and keyboard
  • xwit -pointer $(xinput --list --id-only 'second pointer') -id $(xwininfo |awk '/^xwininfo: Window id:/{print $4}') -xisetpointer
  • Click the minetest window where you want to use your secondary mouse and keyboard

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests