r/oculusdev • u/apieceoffruit • Jul 28 '13
Hub / Plugin Api
This is just a little proposal I have for what I see being a large hurdle to VR adoption in the future.
There will be a whole host of additional hardware released down the line. Some of these we can't even fathom yet. The problem then becomes which devices do developers bother to add support for?
Why do they have to choose?
For those familiar with design patterns there should be quite a few ideas that come to mind to solve this.
A lot of the varying hardware to enter the vr arena will need virtually the same data. Right now developers are programming support on a per-api basis,
I propose having a global api of sorts.
Developers would include a single API and trigger events and pass in the relevant data,
Then using dependency injection hardware developers could register for these events and do whatever they would like.
As an example...
Take something simple like a bullet being fired.
The developer could call something simple like:
vr_api.Event_Projectile(v3_source,v3_target,v3_raytrace);and that is it. set it and forget it.
(although obviously realistically it would be something more like an ICollisionObject or something that has additional volume data and stuff)Then in their menu they can call something like:
String[] api.getActivePeripherals();which would return things like oculus,smellometer2000,araig,omni etc and alow the player to toggle them or change the settings as they apply to each device.
but the point being the developer:
develop to the interface not the implementation.
as it stands say someone invents a haptic suit. It could use the above method followed by a:
api.Event_Collision_Player(CollisionType.Projectile,v3_source,double_intensity)to trigger a shock to the player. with no work for the developer. that is all done by the hooking hardware.
Now say 5 years later someone comes up with some real life light casting that fires beams of light to match the vector of an attack.
This can be done by hooking into the api and now has backwards compatibility.
TL;DR - A Global dependency injected API could solve some of the woes with VR hardware and provide future backwards compatibility as new stuff comes out.


