Re: [AD] Haptics

[ Thread Index | Date Index | More Archives ]

Op 29-05-15 23:56, Trent Gamblin schreef:
---- Beoran wrote ----

I admit that the API is a thin layer over the Linux API. The thing is
though, the Linux haptic API, the Windows DirectX haptic API, and one
of the two (yes two) OSX haptic API's all work very similarly, and
support the same effects (at kleast in theory). Only some OS-specific
and API specific details differ. These three APIs offer the widest
range of effects. SDL2 also uses a very similar API for the same
reason. The abstraction I implemented in very thin because it is a
widely supported abstraction.
I was going to suggest a fallback if an effect isn't supported but that wouldn't always be possible. I think most people will want to stick to effects that are supported by all pads rather than code fallbacks. That doesn't mean that some people won't want to use complex effects though. Maybe in some game types those complex effects are a must. So actually the API is good since the thin layer is mostly common across Linux, OSX and Windows (albeit deprecated on some platforms.) Thanks for the explanations. I might make a couple minor changes like function naming but nothing serious.

Actually, there is already a fallback effect that should work everywhere, namely "rumble". This can be activated very easily with al_rumble_haptic. This should be implemented on /all/ allegro platforms and gives you a simple vibration effect. . But it should be documented better, I guess?

And thanks for taking a good look at the haptics API.

Kind regards,


Mail converted by MHonArc 2.6.19+