i wonder if anyone here knows how to do this?
2 different keyboards, 2 different mice, plugged into 1 PC and giving differing inputs…
(ideally 4, and 4)
i want to make splitscreen Coop in my game, and i want to use keyboard and mouse,
i want the best splitscreen experience ever, lol … it can be splitscreen, or dual monitors aswell…
youd think you could just do it but noooo…
I have yet to thoroughly research this, but i figured id post the question here, in case someone here has done this before… or someone is working on it or something?
… I WILL make this happen!
ive found Alot of info on how to this in Windows… but not so much how to do it in Unity…
i asked before in gossip, but their answers were pessimistic (they didnt know)
and/or is it possible to receive inputs from smartphone/tablet on PC??
id like the player to have as many options as i can think of:
mutliple keyboard/mouse, controllers, smartphone/tablet,
splitscreen, dual monitor splitscreen, quad monitors?
LAN, dedicated server internet
The operating system, IF it even supports 2 simultaneous input devices, still broadcasts inputs of the input of each device arbitrary of device. A message isn’t sent “KEY K was struck on DEVICE 0”, it’s just “KEY K was struck”.
So… how do you know which keyboard the key strike came from?
Now, depending the OS, and this would probably have to be written per OS, you could possibly write a program that hooks directly into the input devices and remaps the keys for each device. And then you interpret that in unity.
But I don’t really know of a way to do it directly in unity.
oh dang, i didnt think about Mac or Linux…
i know its possible in Windows… (somehow?) to have differing inputs from each other, but to use it in Unity ???
im surprised there isnt a goto solution that like Everyone knows about…
… i think because most game makers want to maximize sales by players having to buy seperate copies to play multiplayer… (i think this is SUPER lame!!!, like online-only MP too… some “corporate commander” BS ) i dont think ANY player likes the crap they give us, some tolerate it… i dont…
i think if i was to provide the multiplayer experience i want to, most people would LOVE it… > it should become an industry standard <
You’re reading far too much into it. This decision wasn’t made by game makers. It wasn’t even made by anyone who stands to profit from it. It’s just a feature that no one has thought to add.
You can do this with joysticks/gamepads easily. It’s almost as if devices that are made with gamers in mind, have drivers which cater to gamers’ needs, like hooking up multiple devices and reading them separately. How 'bout that shit!
dont want joysticks/ gamepads … they dont function significantly the same as a mouse…
i had to say that in my other post too… -eyeroll- i CANNOT play a FPS on a controller… it is inferior in everyway… (mines not a FPS but yeah)
also… sooo many people have 2 keyboards, 2 mice… but not as many have controllers…
i intend to give the players the Option of using a controller… but its behavior, due to my game’s mechanics will be “less optimal” than a mouse…
no one thought about it/ they discard the idea, because it makes more money to force people to buy 2 copies…
splitscreen itself is being phased out and is almost non-existant in new AAA games.
. (i know sometimes its because the graphics are too intensive to render from 2 cameras on same machine… but thats probably not really a problem most the time, but theyd lead you to believe so…)
Your general philosophy: “My desired use case is the objectively superior use case. The fact that everyone is not clamoring for this particular use case is proof positive that the rest of the world is conspiring against me, and I am its freedom fighter.”
… well, i do believe my way is superior… because i know it is… it objectively is…
iam wishing to provide MORE functionality than any other game ive seen…
…my purpose for elaborating on my “dislikes” are with the intent of understanding why the solution for this isnt widely available…
please dont troll my thread because you disagree.
re: / … i will also have Online play… your “need” to “attack” me is infantile…
… iam passionate about giving the players what theyd like… (as opposed to ‘greed tactics’)
Look, if you can get this to work, more power to you. It’ll definitely involve writing a custom plugin and digging into the internals of the OS.
I mean, I know I’ll never choose splitscreen over online play, but not everyone feels the same. If you think your players are going to prefer sharing a computer monitor compared to online play, have at it. I’d be curious to see how it goes.
It’s just the superiority complex and conspiracy theory that I’m attacking. It’s seriously infantile.
You should try Glovepie. It supports Multiple Keyboards and Mouse. I will be testing it in a couple of days. Its the easiest method as we dont have to write dll.
hmm will glovepie work with unity… ill have to check it out better,
i read a little, and it seems like its:
WSAD 1st keyboard moves player … on the 2nd keyboard you can press WSAD to move 2nd player… but its really using like IJKL … so if you press IJKL on 1st keyboard you move 2nd player…
thats lame… not what i want… although i guess its ok if its the only way…
i guess could just disable IJKL on 1st keyboard?
not totally sure, just the way it sounded… i havent read it Entirely.
or does it Really create 2 Whole sets of input keys?
try keyboard1.a keyboard2.a keyboard3.a etc… to get input from different keyboards. Check no of keyboards by keyboard.count.
I will check tomorrow and update here.
Not true. That might be reflected that way in Unity API, but the OS usually gives full information, including the device id.
You will not be able to achieve this with Unity API, you’ll have to write something custom yourself. I’d suggest looking into Raw Input API if on Windows, it allows you to enumerate keyboard/mouse devices, and then receive the events from them separately. No overlapping needed - all keyboard buttons are their own on the keyboards.
Yes, but you’ll have to write a client application for the target device and use networking to get the input across.
I just tested a set of wireless keyboard and mice with GlovePie. It works fine. I tested MouseParty script included with GlovePie and it works Great.
And here is a test Code for 2 Keyboards. This too works fine.
So GlovePie is working fine, now just have to write some code so that information can be sent to Unity.
I will use PPJoy to send Information to unity. I have done this earlier so I know it will work.