Kinect Game Template – A christimas gift for the monkeys (34 posts)

  • Profile picture of glaucomardano glaucomardano252p said 4 months, 3 weeks ago:

    Hi fellows,
    I’m working on a kinect input implementation for jME3 that can be easily manipuled with the inputManager. It does work both for Windows, Linux and Mac as well. So I’ve uploaded a Kinect Game Template that can be downloaded via jmp-contrubutions repository http://code.google.com/p/jmonkeyplatform-contributions/downloads/list. As the project was created on jMP it can be opened on Netbeans or jMP, if you want to use it on Eclipse or any other environment, just copy the “/lib” folder and add it to your project classpath. About the assets, it’s the same as for the BasicGame template. It was built by using the lastest unstable OpenNI and NITE versions, install details can be found in project root folder, it’s a README file. The usage is very simple, first you have to enable the kinectInput object via AppSettings (like the joystick input) :

            settings.setUseKinect(true);
    

    Then you register a kinect mapping of your choice via inputManager:

            //add a "wave" mapping for listening to "wave" gestures
            inputManager.addMapping("wave", new KinectTrigger(kinectInput.WAVE));
    

    Then register a KinectListener to the chosen mappings via inputManager too:

    inputManager.addListener(myKinectListenerImpl, "wave");
    

    Then in your kinect listener you implement the onWaveEvent:

        public void onWaveEvent(String name, NullEvent evt, float fps) {
            //do whatever here
        }
    

    But first you have to perform a “click” or “wave” gesture to start the session. Once started, the kinect will start detecting your gestures ;) .

    Usage details can be found in Main.java class inside the project src.

    The kinect input is “Multi-threaded” updated by inputManager. It avoids low fps.

    Here’s a test that I did on my windows 7 64. FPS not bad ;) :

    EDIT: Oh! I forgot to say that it’s me controlling the standalone box with my hand movements xD .

    EDIT2: Oh. Also, there’s a book called “Killer Game Programming” where there’s chapters teaching how to create kinect applications in java by using the openni and nite libralies. Check it out http://fivedots.coe.psu.ac.th/~ad/jg/index.html and go to the “Natural User Interface (NUIs)” session.

    -Glauco Márdano

  • Profile picture of wezrule wezrule190p said 4 months, 3 weeks ago:

    sweet man that looks fricking awesome :D , its possible to see a visual demonstration as well? :D

  • Profile picture of glaucomardano glaucomardano252p said 4 months, 3 weeks ago:

    Oh yeah. Nice idea :D . I’ll see what I can do ;) .

  • Profile picture of normen normen1271p said 4 months, 3 weeks ago:

    Awesome job :) Gotta look into this after christmas, maybe theres some money left for a kinect ^^

  • Profile picture of Setekh Setekh14p said 4 months, 1 week ago:

    O_O I love you man.

  • Profile picture of glaucomardano glaucomardano252p said 4 months, 1 week ago:

    @Setekh: Hi, good to see you here again :) . Any question just ask ;) .

  • Profile picture of ameenul ameenul2p said 4 months, 1 week ago:

    I have successfully installed kinnect on my laptop, and runing Kinect Game Template , everything run good but not with my jmonkey sdk, why my jmonkey sdk show windows error message that Appcrash OpenAL32.dll_unloaded, is there anyone can solve this ?

  • Profile picture of glaucomardano glaucomardano252p said 4 months, 1 week ago:

    Weird, I’m having a similar issue, but it happens when I run a specific project :

    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    #  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000007feee7125a5, pid=4136, tid=8012
    #
    # JRE version: 7.0-b147
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (21.0-b17 mixed mode windows-amd64 compressed oops)
    # Problematic frame:
    # C  [XnVFeatures64_1_5_2.dll+0xc25a5]
    #
    # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
    #
    # An error report file with more information is saved as:
    # D:SHAREjMonkeyProjectsjme-jdktrunkenginehs_err_pid4136.log
    #
    # If you would like to submit a bug report, please visit:
    #   http://bugreport.sun.com/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.
    #
    AL lib: ReleaseALC: 1 device not closed
    Java Result: 1
    

    Btw when your JDK crashes? When you load any project?

  • Profile picture of ameenul ameenul2p said 4 months, 1 week ago:

    this is my appcrash :

    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: java.exe
    Application Version: 6.0.240.7
    Application Timestamp: 4d4a0b93
    Fault Module Name: OpenAL32.dll_unloaded
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 4ea646d0
    Exception Code: c0000005
    Exception Offset: 1755914a
    OS Version: 6.1.7601.2.1.0.256.1
    Locale ID: 1057
    Additional Information 1: 0a9e
    Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional Information 3: 0a9e
    Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

    Read our privacy statement online:

    http://go.microsoft.com/fwlink/?linkid=104288&clcid=0×0409

    If the online privacy statement is not available, please read our privacy statement offline:
    C:Windowssystem32en-USerofflps.txt

  • Profile picture of glaucomardano glaucomardano252p said 4 months, 1 week ago:

    Btw I didn’t understand how you got to run the kinect template if your SDK is down.

  • Profile picture of ameenul ameenul2p said 4 months, 1 week ago:

    kinect template can run well, but sometimes that error show when I close jmonkeyNetbeans and sometimes while I run the project but not often,, this is so annoying

  • Profile picture of Setekh Setekh14p said 4 months, 1 week ago:

    Well i’ll be keeping a close eye on this topic :D . Also i’m planning to start working on a game finally.. and buy a kinect, seeing this inspired me, ty :P

  • Profile picture of ironfrown ironfrown2p said 3 weeks, 1 day ago:

    Any progress on Kinect interface? Should I invest $200 in the box?

  • Profile picture of glaucomardano glaucomardano252p said 3 weeks, 1 day ago:

    I bought a kinect and created the kinect template because I needed to create a kinect game for my thesis, and I did it :) . But after that, the kinect template is retired for a while, I used it for gesture recognitions (full body gesture recognitions), but I don’t have any kinect project in mind at moment. Suggestions are welcome.

  • Profile picture of normen normen1271p said 3 weeks, 1 day ago:

    Well.. bone animation recording maybe? :D Its a biig topic though, retargeting animations from one skeleton to another isn’t exactly easy. Also I think the OSS kinect software doesn’t really give you the full skeleton stuff yet or does it?