Skip to main content
Inspiring
July 4, 2013

Why is Oculus writing a (non-VR) general purpose library?

Let me preface this by saying that I love my Rift, and I think that Oculus VR has a big future ahead of it. But its becomeing clear to me that OVR is spending valuable developer time writing general purpose classes. These classes duplicate existing free functionality.

Some examples:

    OVR_Atomic.h - A set of classes for atomic operations against types

    OVR_String.h - A basic String class

    OVR_List.h - A basic linked list container class

    OVR_Array.h - A basic linked vector container class


Basically everything in the LibOVR/Src/Kernel subdirectory is an example of this. I'm really concerned about it, because every hour spent on extending this is an hour not working on VR specific stuff, or features the community wants. Writing a string class or a linked list class is something you do in a job interview, not in an SDK, or any kind of production code. These are solved problems. Right now almost half of your total lines of code in the SDK are in the Kernel subdirectory, implying almost half your development time has been spent doing stuff no one outside of OVR cares about or is ever going to use.

I've honestly tried to hold my tongue about this, but the lastest SDK version shows that OVR is not only not slowing or reversing this trend, but appears to be doubling down with the new inclusion of a JSON parser, again written from scratch and again, increasing the internal dependence on other duplicated functionality, like the String class. How much earlier would the Linux port have been released if writing a JSON parser you'd simply written #include <boost/property_tree/json_parser.hpp> or instead of writing a string class you'd written #include <string>.

I really can't understand why OVR would be doing this unless it's developers are either unaware of Boost and the Standard Template Library, or have a serious case of not-invented-here syndrome. If it's the former, I suggest you do a little bit of reading up, but if, as I suspect, it's the latter, I suggest you get over it and start focusing on your core deliverables, not these diversions. I know it's actively impeding my integration of your software, and I suspect I'm not alone.

    30 replies

    jhericoAuthor
    Inspiring
    July 4, 2013
    "densohax" wrote:
    This comes from EASTL, which is known to be faster than STL simply because of memory allocators..


    The core STL supported custom allocators when I used it last professionally.

    "densohax" wrote:
    As to why they do that.. I believe they want to be much more than a headset company, don't you think? They could be in the making of the universal VR library..


    The universal VR library has no business including a string class or a list class. And if they wanted to write a better moustrap in terms of core C++ functionality, they should have done a kickstarter for that.

    "densohax" wrote:
    Also, have you seen those projects that use every possible libraries to do their work? These projects sucks, they are slow and ugly.


    Go play a AAA game some time and look at the credits, or even better, pause and really look at the opening screen where they list all the third party technologies they use. Things like the Havok engine for physics and the Bink engine for video. Engines for procedural trees and engines for realistic water. Most modern games are nothing but a bunch of glued together libraries and a bunch of resources specific to the game. And again, I'm not talking about using some off the wall library. Even disregarding boost, they could probably drop 80% of that code by using the STL, which is part of the C++ specification.

    "densohax" wrote:
    But who are we to judge them?


    People who gave them money for a development kit. People who expect a reasonable SDK in return. We are the very people upon whom they rely: developers. They can have all the VC funding in the world, but in the end, OVR needs excited developers writing software that will make other people excited. The more time I spend fighting the SDK instead of using it, the less time I'm putting OVR on the map.

    "densohax" wrote:
    Oh and a lot of these classes are just ports from scaleform (search for the word scaleform in there) or some other projects they already have, no big deal.


    Yeah, no big deal as long as they have rights to the code, free and clear. Granted, two of the Oculus heads are the co-founders of Scaleform, but that doesn't always make code ownership clear cut.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Up and Coming
    July 4, 2013
    Having worked at a AAA publisher and having seen many projects, yes they do use third-parties, that's true. But the core is normally done in-house.

    Anyways, I personally don't have a problem with the SDK as is. :)


    People who gave them money for a development kit. People who expect a reasonable SDK in return. We are the very people upon whom they rely: developers. They can have all the VC funding in the world, but in the end, OVR needs excited developers writing software that will make other people excited. The more time I spend fighting the SDK instead of using it, the less time I'm putting OVR on the map.


    You should stop fighting and just start using it.

    Btw you are NOT an investor and you most probably don't have as much experience in software development than the guys they have in-house.. I think you should focus your effort on something else than making a github copy of oculus sdk.
    jhericoAuthor
    Inspiring
    July 4, 2013
    "atavener" wrote:
    When I backed the Kickstarter, the impression I had was that it was for an HMD, not software. So when I saw the SDK (which is unappealing to me for many reasons), I was disappointed, but I certainly didn't feel gypped! The HMD is great!


    Yeah, I'm probably working myself up into a froth for no particular reason. I think the HMD is awesome in every way, and I don't feel cheated. I guess I just feel like OVR could be making better use of its limited resources.

    "atavener" wrote:
    To chime in on STL/Boost for gamedev: memory allocation. I've never worked on a game (or console) without making or using a custom allocator -- often several.


    I've worked with custom allocators in STL before, and even had to write a block allocator to replace the existing allocator in the Microsoft STL implementation (back in VC6 days). But even so, none of that is necessary here. The core functionality of the SDK requires reporting HID notifcations back to the calling app. If you disregard the sensor fusion stuff, you could do 90% of what you need to do with a single file descriptor and a static 62 byte buffer.

    "atavener" wrote:
    I'm also guessing that the code in the Kernel subdir pre-existed as part of someone's (Antonov?) common library to work from. We all have libraries similar to this, don't we?


    I used to have something similar, back in 1998. I haven't needed it in a long time. I also had something similar for Java, but even that's been supplanted by easily accessible library functionality.

    "atavener" wrote:
    However, I would have preferred the official SDK having a low-level layer with minimal dependencies, minimal code... just a hardware abstraction. Look at how small OpenHMD or libovr_nsb are. Having a "framework" on top of this to start from makes sense for demos or getting started from scratch. But as I said... don't we all have libraries to handle these higher level issues already? And generally coming along for the ride as part of our engine? Therefore... leave this high level as optional for making demos or those without an existing codebase.


    Precisely. That's why the Java code I've added to my copy of the SDK on GitHub basically focuses on just the HID aspect... fetching and setting the HID reports, and setting a callback for receiving HID messages from the tracker.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    jhericoAuthor
    Inspiring
    July 4, 2013
    "densohax" wrote:
    Btw you are NOT an investor


    I never said I was an investor. However, the one thing that I've asked for in terms of SDK features (support for strabismus correction, i.e. an additional transformation matrix so that you can change the viewing angle of one eye and correct for double vision, something that would have slotted quite easily into their new 'profile' functionality) got blown off. The new Linux support in the SDK uses Xinerama instead of XRandr for display manipulation. And my target platform is now Raspberry PI, which means the SDK as is isn't going to cut it. So I think its reasonable that I'm mildly upset when I see where the efforts have been going.

    "densohax" wrote:
    I think you should focus your effort on something else than making a github copy of oculus sdk.


    I'm pretty sure I'm not the only one who feels like I'm not getting heard or getting the kind of results I'd like to. The Github instance is meant to serve as a focal point for people who want more than they're getting from the SDK and it's release process as it stands. It's actually meant to serve OVR, not compete with them, since they're free to take anything that happens there and roll it into the full SDK. They're also free to ignore it.

    The work I'm doing against it is work I would have done anyway, so if it gets no traction, I've lost nothing but the time it takes to do a git-push.
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action
    Up and Coming
    July 4, 2013
    I actually agree with you on all you've just said in that previous post !
    Up and Coming
    July 4, 2013
    This thread has been a fascinating read. I too am doing the "Pi" thing. But I am going native (no OS) and using the GPU assembler (mostly reverse-engineered). Let the CPU just be a little GPIO coprocessor for the "real" computer in the Pi (the GPU)...
    This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
    Up and Coming
    July 4, 2013
    "geekmaster" wrote:
    This thread has been a fascinating read. I too am doing the "Pi" thing. But I am going native (no OS) and using the GPU assembler (mostly reverse-engineered). Let the CPU just be a little GPIO coprocessor for the "real" computer in the Pi (the GPU)...
    ;)


    Gm, going old-school! I like that!
    Up and Coming
    July 4, 2013
    "densohax" wrote:
    Gm, going old-school! I like that!

    Hey! I *am* "old school". I taught there! ;)

    Literally, I had a keypunch machine in my basement, and a teletype with paper tape punch and reader in my living room, and three phone lines with two "online" (acoustic modems) almost all the time. If that is not "old school", then what is?

    Those native mode bare metal Raspberry Pi guys want to incorporate the RasPi GPU assembler into a real C compiler, eventually. I was thinking it may not be that hard to add it to the ARM port of TCC (TinyCC). I was never successful at building that from source myself though, so I just "stole" somebody else's binary for my ARM tcc installer:
    http://www.mobileread.com/forums/showthread.php?t=175834

    I *love* programming on the bare metal, and now the RasPi gives me a great excuse... ;)
    This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
    Up and Coming
    July 4, 2013
    "geekmaster" wrote:

    I *love* programming on the bare metal, and now the RasPi gives me a great excuse... ;)


    People like us are few and far in-between :)
    jhericoAuthor
    Inspiring
    July 4, 2013
    "geekmaster" wrote:
    This thread has been a fascinating read. I too am doing the "Pi" thing. But I am going native (no OS) and using the GPU assembler (mostly reverse-engineered). Let the CPU just be a little GPIO coprocessor for the "real" computer in the Pi (the GPU)...
    ;)


    That sounds pretty ambitious. Is there a reason you're not using Open GLES?
    Brad Davis - Developer for High Fidelity Co-author of Oculus Rift in Action