• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 13
Player Manager
#1
Our input system is a combinatorial explosion of possibilities. Basically everything can emulate everything. We need a player/port manager that can handle this mess with a simple remote-friendly dialog.

Here's our basic input requirements:
  • Any controller can emulate any other controller
  • A controller can emulate a mouse and keyboard
  • A keyboard can act as a keyboard
  • A keyboard can emulate multiple controllers
  • A mouse can act as a mouse

Here's our basic game system requirements:
  • A game system can have a variable number of ports
  • A port can support different types of devices
  • Max player count? (12)
  • Multitap? (problematic for some cores)

Here's our player requirements:
  • Players should control which port they use
  • Players should be able to customize their button maps (possibly per-game or per-platform)
  • Players should be able to customize their controller icon

Here's some restrictions we're working with:
  • We can't always uniquely identify controllers, keyboards or mice
  • We can't always identify controller icons or button appearance
  • We don't have a game database yet, so configuring per-game or per-platform is difficult

There's been some artwork posted in the Input thread, which I'll show below:
Reply
#2
Serg86 (post)

Image



grumpygamer (post)

Image

Image



Another concept by Serg86 (post)

Image

Image

Image

Image
Reply
#3
Would player assignment happen when launching every game? Or only when an unassigned controller is detected? Or only as a context menu item? Assignment should be easy enough to access from any Retroplayer screen with any controller.
Reply
#4
(2016-11-01, 20:53)MrTarantula Wrote: Would player assignment happen when launching every game? Or only when an unassigned controller is detected? Or only as a context menu item? Assignment should be easy enough to access from any Retroplayer screen with any controller.

Initial player assignment happens using the order the OS presents the controllers. I think we should have a link to the player manager while playing a game, both by a hotkey and by a button in the game OSD (which should probably use something better than a repurposed video OSD).
Reply
#5
A good way to look at it is, why reinvent the wheel? The sub-menu, as done on Wii or WiiU for example (via the home button), is basically all that should really be needed, right? That may be the benchmark right there.
Reply
#6
(2016-11-03, 02:32)Anonymous Coward Wrote: why reinvent the wheel?

Unfortunately, we have different requirements than wii. We accept all controllers, not just the Wii remote/controller. We emulate all systems, not just the Wii. We allow more than 4 players (at least we don't have any technical restrictions that prevent this). Systems can support different devices per port, such as controller or mouse or lightgun. Keyboards can act as keyboards or emulate (possibly multiple) controllers. Controllers can act as controllers or emulate the mouse/keyboard. We can't always uniquely identify controllers.

The combinatorial explosion of possibilities, along with the requirement that we're restricted to simple remote control navigation, makes this a much more difficult problem.

We should start by clearly outlining our requirements. I'll modify the OP with the list here.

(2016-11-03, 02:32)Anonymous Coward Wrote: The sub-menu, as done on Wii or WiiU for example (via the home button)

Can you find a picture of this?
Reply
#7
Getting so excited for this to finalize! The work you guys are doing is tremendous and that first screenshot in this thread made me drool.....
Reply
#8
As I can think of two local databases: One to store a list of players, a second one that stores the emulated devices.

I'd like to suggest a system similar to the one of the PS4. Each time a controller is plugged in, kodi should ask which player is using this device. For emulated controllers and other non detectable device there has to be a manager where you can (each time you want to use it) enable it (emulated plug in) and as it gets enabled kodi should ask which player is using it. Then when launching a game a screen similar to Serg86 last suggestion or FIFA Teamselect should appear that asks the player to press a button, in the order of the pressed buttons they should get assigned to the ports of the emulated system.

To sum this up there always has to be a link between player and device. The link between player/device to emulated system should be made dynamically each time a game is started. That way information about controller layout can be stored in the player db and each time a new device is assigned to the player the information of the configuration can be stored also in the player db.

Cheers, keep up that great work
Reply
#9
Although a local db of mapped controllers would be nice, I don't think it qualifies as must-have. A simple splash screen upon starting a game would be easiest. I like the idea of Serg86. It looks simple enough. I'd start out with 1 player and a carousel or accordion to select the control option. When a controller is selected, the player is prompted to 'push any key/button on the desired controller'. Next option is 'add player/done'.

The result can be stored in a local db for future reference when starting this game ('use stored config? yes/no') for that specific game on that specific emulater for that specific system.

Anything else does not seem very Agile to me Smile
Reply
#10
I believe the most controllers any system has ever supported is the 12 controllers supported on the Sega Saturn, so that gives you an upper limit to work with. Even then the number of games on the Saturn that actually supported that number can probably be counted on one hand. Ideally, the game database will store the max number of players so the GUI can tailor to that and if needed, the multitap features in the core can be enabled. Games not developed to handle a multitap tend the behave oddly when one is connected so just blanket enabling them for every game is unfortunately not an option.
Reply
#11
(2016-11-03, 14:24)Scourge Wrote: A simple splash screen upon starting a game would be easiest.

True, this would be easiest, but it adds friction when starting a game. Things should "just work", and a local db that allows tracking players and their controllers enables this.

(2016-11-03, 14:24)Scourge Wrote: The result can be stored in a local db for future reference when starting this game ('use stored config? yes/no') for that specific game on that specific emulater for that specific system.

Unless it's unavoidable (like with savestates) everything will be per-system and not per-emulator. Like with the controller dialog. This level of abstraction is one of the bigger differences between us and our competition.

(2016-11-04, 17:11)OmniBlade Wrote: I believe the most controllers any system has ever supported is the 12 controllers supported on the Sega Saturn, so that gives you an upper limit to work with. Even then the number of games on the Saturn that actually supported that number can probably be counted on one hand. Ideally, the game database will store the max number of players so the GUI can tailor to that and if needed, the multitap features in the core can be enabled. Games not developed to handle a multitap tend the behave oddly when one is connected so just blanket enabling them for every game is unfortunately not an option.

Do you recall which games these were, by any chance? Multitap makes things difficult. I'm not sure if this logic should be in Kodi or the emulator. ATM the libretro API doesn't seem to support multitap, so it has to be done in the emulator. I was thinking of making multitap a driven parameter, e.g. if you connect 4 controllers then Kodi automatically connects a multitap and maybe even shows this in the GUI somehow.
Reply
#12
(2016-11-03, 10:24)lostwithouthope Wrote: I'd like to suggest a system similar to the one of the PS4. Each time a controller is plugged in, kodi should ask which player is using this device.

Does this require player profiles? Like with avatars and such? Kodi already has quasi-profile support, but the implementation is poor and we probably can't use this for games. We would have to rip out Kodi's profiles and reimplement them such that they are amicable to games.

To avoid this herculean project, I'm thinking of creating dynamic profiles, e.g. when a controller is plugged in a new "profile" is created dynamically, and that profile follows the controller. This has the advantage of being zero-configuration (my primary goal), but the downside is that we know very little about the player. How would we identify players in the GUI? We don't have a name or avatar. We don't even have a controller icon. We know the controller name, but controller names can be LONG so this limits the number and orientation of names shown in the GUI. Also, there may be multiple controllers with the same name.

A funny name generator would be cool, but this doesn't generalize to all languages. Maybe an avatar generator? Bust out some awesome 8-bit character art? I saw a site called OpenGameArt on hackernews a few days ago.
Reply
#13
(2016-11-04, 17:47)garbear Wrote:
(2016-11-03, 10:24)lostwithouthope Wrote: I'd like to suggest a system similar to the one of the PS4. Each time a controller is plugged in, kodi should ask which player is using this device.

Does this require player profiles? Like with avatars and such? Kodi already has quasi-profile support, but the implementation is poor and we probably can't use this for games. We would have to rip out Kodi's profiles and reimplement them such that they are amicable to games.

I would not say that this is required for the first shoot. But I don't think that zero configuration is the right thing to aim for in this particular case. I think that the information who is using which controller is quite importend and enables a lot of use cases for future implementations. As you said the profile can be generated also dynamically if nothing has to be stored for a player. In that case I'd suggest to bring up a window when the controller is connected/enabled and asks something like "player X ready?" where x can be the number of player connected to the system with the options "ok" and maybe "change name"

But as long time goal, really, really long time goal, the integration with kodi profiles would be awesome Smile
Cheers
Reply
#14
(2016-11-04, 20:21)lostwithouthope Wrote:
(2016-11-04, 17:47)garbear Wrote: Does this require player profiles? Like with avatars and such? Kodi already has quasi-profile support, but the implementation is poor and we probably can't use this for games. We would have to rip out Kodi's profiles and reimplement them such that they are amicable to games.

I would not say that this is required for the first shoot.

That's not how I do things. I work in two stages: A concept/requirements stage, and then an implementation stage. The concept stage I aim to do exactly once, and the implementation stage is a long, rolling process with many attempts and which I never truly finish.

The reason is because this is such a big project. The controller work, including the configuration utility, is now at 14,000 lines of code, not counting 6,500 lines of comments. Every time I touched the original concept, I spent HOURS refactoring hundreds of lines of code. This really is a "think twice, cut once" kind of project.

So we really do need to decide now if our requirements include avatars or not, and if the dialog is shown when a controller is plugged in or a game starts or whatever. Changing requirements after implementing thousands of lines of code is not something I ever hope to do again.

(2016-11-04, 20:21)lostwithouthope Wrote: But I don't think that zero configuration is the right thing to aim for in this particular case. I think that the information who is using which controller is quite importend and enables a lot of use cases for future implementations. As you said the profile can be generated also dynamically if nothing has to be stored for a player. In that case I'd suggest to bring up a window when the controller is connected/enabled and asks something like "player X ready?" where x can be the number of player connected to the system with the options "ok" and maybe "change name"

I agree, if Kodi is used for gaming then player-to-controller mapping needs to be visible and configurable. But what if the user only uses a controller for movies, not games? Showing player numbers and names and avatars and such is confusing in this case.

My general goal is "zero configuration, powerful re-configuration". I think an instantly-accessible player management dialog, such as by pressing the Guide button, is the way to go.

(2016-11-04, 20:21)lostwithouthope Wrote: But as long time goal, really, really long time goal, the integration with kodi profiles would be awesome Smile
Cheers

This will never happen in Kodi's current state. Like I mentioned earlier, concept is critical. The profiles code has none. It is years and years of hacks and features spread throughout the codebase. It needs to be removed entirely and reimplemented before our game code can depend on it.
Reply
#15
(2016-11-04, 22:07)garbear Wrote:
(2016-11-04, 20:21)lostwithouthope Wrote:
(2016-11-04, 17:47)garbear Wrote: Does this require player profiles? Like with avatars and such? Kodi already has quasi-profile support, but the implementation is poor and we probably can't use this for games. We would have to rip out Kodi's profiles and reimplement them such that they are amicable to games.

I would not say that this is required for the first shoot.

That's not how I do things. I work in two stages: A concept/requirements stage, and then an implementation stage. The concept stage I aim to do exactly once, and the implementation stage is a long, rolling process with many attempts and which I never truly finish.

The reason is because this is such a big project. The controller work, including the configuration utility, is now at 14,000 lines of code, not counting 6,500 lines of comments. Every time I touched the original concept, I spent HOURS refactoring hundreds of lines of code. This really is a "think twice, cut once" kind of project.

So we really do need to decide now if our requirements include avatars or not, and if the dialog is shown when a controller is plugged in or a game starts or whatever. Changing requirements after implementing thousands of lines of code is not something I ever hope to do again.
Maybe this were the wrong words. I totaly agree with this kind of philosophy as this is exaktly the same way as I work. Always have the big picture in mind. So what I tried to say is, the thing that is really necassery to start with are the names of the players. This can be relatively simple to implement. But already prepare the interfaces for the pictures/configurations/avatars.

So thats my coding philosophy, start with the concept and break it down into managable pieces and order the implementation in a way that makes the whole thing usable as soon as possible, so you can reach a milestone relatively often and thats always a good feeling Wink (also to attract other developers to jump in when they see it is already working and everything is in place to add another feature and by that implecitly control where and in which way the feature gets added).

And again as I wrote before, thank you for all the time and effort you put in this project.

(2016-11-04, 22:07)garbear Wrote:
(2016-11-04, 20:21)lostwithouthope Wrote: But I don't think that zero configuration is the right thing to aim for in this particular case. I think that the information who is using which controller is quite importend and enables a lot of use cases for future implementations. As you said the profile can be generated also dynamically if nothing has to be stored for a player. In that case I'd suggest to bring up a window when the controller is connected/enabled and asks something like "player X ready?" where x can be the number of player connected to the system with the options "ok" and maybe "change name"

I agree, if Kodi is used for gaming then player-to-controller mapping needs to be visible and configurable. But what if the user only uses a controller for movies, not games? Showing player numbers and names and avatars and such is confusing in this case.

My general goal is "zero configuration, powerful re-configuration". I think an instantly-accessible player management dialog, such as by pressing the Guide button, is the way to go.

Hm, I see your point, but isn't that something that is necassery only once? If you want this kind of feature make it the other way around: add a auto login feature. So when a new cotroller is plugged in ask who is using it and add an option that this controller should be assigned automatically to the selected player. For the use case that one controller is only used for kodi control, it would be the automatically generated player 1 and after onetime configuration the use will never see this diolog again. As I consider this the special case and not using controllers for play.

(2016-11-04, 22:07)garbear Wrote:
(2016-11-04, 20:21)lostwithouthope Wrote: But as long time goal, really, really long time goal, the integration with kodi profiles would be awesome Smile
Cheers

This will never happen in Kodi's current state. Like I mentioned earlier, concept is critical. The profiles code has none. It is years and years of hacks and features spread throughout the codebase. It needs to be removed entirely and reimplemented before our game code can depend on it.

And again maybe the right thing would be to concept your player manager in a way that someday and not necasserly by you it can be expanded to become kodi's profile manager. Meanwhile it has to exist in paralell anyway.

Cheers Smile
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 13

Logout Mark Read Team Forum Stats Members Help
Player Manager1