maji-git / multiplay-core

Develop Online, Multiple Controller and solo multiplayer game at once!
MIT License
123 stars 7 forks source link

Mixed Local/Online Multiplayer #28

Open gbillus opened 1 week ago

gbillus commented 1 week ago

Is it possible to connect to or be a host, while two local players are connected.

PEMI-len commented 1 week ago

with how the system currently works, it seems like it always expects either one player playing online or multiple players playing locally i'd love to see multiple local players being able to play online on servers, awesomenauts style its an underrated feature

maji-git commented 1 week ago

If I understand correctly. I've worked on this before, proof of concept is in this branch. The idea is to allow local/online player to create their own player node, each assigned to their preferred input method(such as keyboard, joypads).

It would allow for more flexibility. However my only concern is that it'll cause many breaking changes. I'm still trying to find a way to reduce this issue, but it's not entirely avoidable. Because this would change how MPC works in general.

I'll definitely check back after v1.1 beta

Some screenshots:

image image

PEMI-len commented 1 week ago

i really like what i'm seeing though i don't like the idea of separating keyboard and gamepads into two separate entities id rather have both of these treated as equals, like inputs are treated like right now in the current MPC version think steam controller that can have gamepad buttons and analog sticks, but can also emulate a mouse with gyro or touch pads better be flexible and build a system that can allow for that rather than draw arbitrary limits

maji-git commented 1 week ago

i really like what i'm seeing

though i don't like the idea of separating keyboard and gamepads into two separate entities

id rather have both of these treated as equals, like inputs are treated like right now in the current MPC version

think steam controller that can have gamepad buttons and analog sticks, but can also emulate a mouse with gyro or touch pads

better be flexible and build a system that can allow for that rather than draw arbitrary limits

I do agree, but unfortunately it's how OS handles input. All keyboard/mouse devices input are merged as one. There's no way of separating them as of now.

In the proof of concept, there's a workaround for this like "All" input type, which accepts everything. Works for games that only allow client to create one player node.

I'll work on this based on developer feedbacks. It'll definitely require a lot of opinions.

PEMI-len commented 6 days ago

I do agree, but unfortunately it's how OS handles input. All keyboard/mouse devices input are merged as one. There's no way of separating them as of now.

In the proof of concept, there's a workaround for this like "All" input type, which accepts everything. Works for games that only allow client to create one player node.

its not a big deal, because i'd have to implement button remapping anyway some buttons would have to be applied to one player, and some buttons for another might aswell cut out the middleman and have mpc already contain such a feature the limitation you described is not a big deal if mpc would already have action remapping built in maybe as an addon for mpc if it ends up bloating the base plugin and its something people would rather opt in to