Code Monkey home page Code Monkey logo

Comments (10)

ed-mw avatar ed-mw commented on July 24, 2024

Great idea!

There are some other controls like "shifter" that are included with steering wheel devices (e.g. the Momo), and "pedals" with wheels and "flightstick" type devices.

Does there need to be a separate designation for the buttons on the underside of the device like the Steam Controller has?

It'd be great if this could be extended to include an image with the layout and location of the controls for on-screen mapping and testing... but that's a tall order. I expect that's the kind of thing the "hint" field is for, to give a general idea of the physical layout of the controls.

from sdl_gamecontrollerdb.

p-groarke avatar p-groarke commented on July 24, 2024

Good point on the pedals and shifter boxes! I'll have to look into that and see if it can fit in with the current setup. Thx.

The underside or extra buttons, since they don't actually map to the xbox controller, are ignored. At that point, you'd want to detect the controller directly in your game and do fancy things. The same can be said with gyros, accelerometers or touchpads. The db is for basic (but full) support. The extras aren't supported.

The hint is indeed for graphics. Here is a pack of awesome graphics for many different controllers. It's released with cc0 license (public domain, fully free) https://opengameart.org/content/free-keyboard-and-controllers-prompts-pack

In the extreme long-term (aka years), I'd like to provide some generic svg graphics for all buttons, but not styled to the brands. If that makes any sense. For now though, graphics are out of the question ;)

from sdl_gamecontrollerdb.

p-groarke avatar p-groarke commented on July 24, 2024

@EddieRay Quick note on driving peripherals, they are considered joysticks and don't use this database (which is for gamepads only). So we are all good there.

from sdl_gamecontrollerdb.

mbenkmann avatar mbenkmann commented on July 24, 2024

I am working on generic SVG for controllers for a game I'm creating. The idea is to do away with names altogether and instead use parts of the whole controller image with the respective button(s) highlighted. So after the user has selected (or it has been pulled from a database) the proper image for his controller, all references to buttons are purely via small graphics.

With respect to your new database, I don't think button name mappings are enough. I would definitely add controller geometry to the data. Not precise geometry but simply a list of elements that are present on the controller. Look at this image

foo

It reasonably covers many common controllers, when you combine it with a list of elements that are actually present. So for each controller you have a list of elements from all the possible elements together with the name.

from sdl_gamecontrollerdb.

mbenkmann avatar mbenkmann commented on July 24, 2024

This approach would allow game programmers to auto-generate controller images with their own graphics assets. So I could put that database in my game and it would tell me e.g. that the XBox 360 controller has no touchpad and only 4 main buttons in the top right. I would then paint my SVG with the non-existent elements removed.

from sdl_gamecontrollerdb.

p-groarke avatar p-groarke commented on July 24, 2024

You have to remember the purpose of this database is to map everything to a 360 controller. That is the geometry. There wont be any funky controls information present (like the DS4 touchpad). However, you can get this information easily with controller names in the database if you want.

Generating your own graphics is interesting, but a marginal use case nonetheless. The hints are there to help with what you want to do though.

If you read a button name mapping that has hint SEGA for example, you know where the buttons are going to be (somewhat). The image below is the current guideline. However that is new, so not all mappings will be correct (thats another problem that will need dealing with).

Basically, you should be able to get most of the information you need from what is present, but it will not be perfect. Realistically, it cannot. There are too many controllers out there with various geometries. Asking contributors to measure their controller is also too much to ask.

mappings

from sdl_gamecontrollerdb.

cxong avatar cxong commented on July 24, 2024

Has this idea been abandoned? It overlaps with this project: https://github.com/cxong/SDL_JoystickButtonNames which aims to map button names as well as button colours.

from sdl_gamecontrollerdb.

p-groarke avatar p-groarke commented on July 24, 2024

@cxong Pretty much yes. The problem is there was no standard layout recommended in the database till recently, and we have no way of knowing what buttons users mapped to the xbox buttons. You can check branch button for some layouts I had created. I personally wont be taking care of this.

The project you linked to has been inactive for ~3 years, and it is also quite different than my original goal.

from sdl_gamecontrollerdb.

JayFoxRox avatar JayFoxRox commented on July 24, 2024

The mapping recommendation for SEGA and Arcade looks flawed.

The SDL gamecontroller mimics the Xbox 360 gamepad. The original Xbox is similar to SEGA layout (6 face buttons).

original Xbox controller with 6 face buttons

Microsoft, the maker of the original Xbox and Xbox 360 layouts, made the "official" mapping between Xbox and Xbox 360 for backwards compatibility (playing original Xbox games on Xbox 360). Due to similarity with the SEGA pad, we have an implicit, official mapping between Xbox 360 (SDL gamecontroller) and original Xbox ~ 6 face buttons ~ SEGA.


Where SEGA has Z / C, original Xbox has white / black. In original Xbox games on Xbox 360 (and also many successors to existing games), these games use LB=White and RB=Black to replace the missing face buttons.

This would mean:

  • Xbox 360 → original Xbox: LB=White & RB=Black
  • SEGA ↔ original Xbox: Z=White & C=Black

So, shouldn't it be:

  • SEGA → Xbox 360: Z=LB & C=RB

So SEGA would be:

X Y LB
A B RB

And a similar mapping for Arcade:

X Y LB LT
A B RB RT

That would also mean that all digital buttons will be mapped to digital buttons, leaving the analog triggers for other tasks.
Maybe Arcade should even use Left/Right downward-stick-presses (leftstick / rightstick) instead of LT / RT.

from sdl_gamecontrollerdb.

offalynne avatar offalynne commented on July 24, 2024

I agree with @JayFoxRox's proposal. Making the transition would prove tricky because in many cases it looks like maps do not match the existing spec and ie, follow the button labels on a given arcade stick's equivalent gamepad labels rather than the format proposed by the readme graphic.

Saturn pads have shoulder buttons, and it makes sense in my opinion to map LB/RB on Z/C and put the triggers on L and R.

from sdl_gamecontrollerdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.