Luomu's Recent Forum Activity

  • Interesting, I wouldn't have ever figured that out on my own.

  • How would I implement a For each... -style condition in my object? SVN does not have examples on this, such as Array::For each element.

    Is it just a matter of (pseudoish code):

    long ExtObject::cForEachThing(LPVAL params)
    {
        if(things.size() == 0)
            return false; //no things, no for each
    
        currentThing++;
    
        //reset counter if at end
        if(currentThing == things.end());
            currentThing = things.begin();
    
        return true;
    }
    [/code:vo7952n6]
    and then an expression to retrieve data from currentThing. Doesn't this just get called once per frame, when I want to go through each object on every frame?
  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • So, I went ahead and created a page: https://sourceforge.net/apps/mediawiki/ ... ty_Plugins

    Good? Bad? Change it! Each plugin should have a short description.

  • New version 1.02

    Updated to Wiiyourself API 1.15RC2. New feature in this version is Balance board support. Theoretical support, since I don't have one to test with.

    With BB use the plugin as with a remote. Optionally you can check with the "Is balance board" condition if BB is present. To pair BB with your bluetooth adapter, press the button inside the battery compartment.

    New ACEs, all BB related:

    == Actions ==

    Reset weight calibration (recalibrate BB at rest)

    == Conditions ==

    Is balance board (checks if this remote is actually a BB)

    == Expressions ==

    Total weight (in KG)

    Top left weight

    Top right weight

    Bottom left weight

    Bottom right weight

  • Give some feedback then! Right now I'm not very happy how rough IR pointing is and accelerometer values could be smoother (but smoothing them can also make it feel unresponsive). I'll release an update this weekend.

  • Can I get privileges for Luomu82 please

  • I just updated my old Wiimote plugin so might be time to add it to the list: http://www.scirra.com/forum/viewtopic.php?f=7&t=4847

  • Updated this for 99.82: Wiimote-1.01.zip

    This version adds Nunchuk support. Updated ACE list:

    == Actions ==

    Connect (connect to the first available remote)

    Disconnect

    Set report level (buttons only/+accelerometer/+infrared, higher settings use more power)

    Set rumble (on/off)

    Set LEDs (1/0 for each led)

    Set joystick deadzone (0.0 - 1.0, default 0.03, 1.0 would filter out everything )

    == Conditions ==

    Connected

    Connection lost

    Button pressed

    Button down

    Button released

    Nunchuk connected

    == Expressions ==

    Pitch (In degrees -180 to 180)

    Roll (In degrees, -90 to 90, 0 is level, remote can't detect upside-down)

    Orientation X

    Orientation Y

    Orientation Z

    Acceleration X

    Acceleration Y

    Acceleration Z

    Battery level (percentage)

    IR X (interpolated 0-1.0 from all leds)

    IR Y (same as above)

    IR Z (Estimated led size, very rough)

    Raw IR X (led number 1-4)

    Raw IR Y (led number 1-4)

    IR Report level

    LED status (Sensor bar led groups seen, bar has 2 but remote can track 4)

    Update age (in milliseconds, if age is too much orientation data might be

    unreliable)

    Joystick X

    Joystick Y

    Nunchuk pitch

    Nunchuk roll

    Nunchuk acceleration X

    Nunchuk acceleration Y

    Nunchuk acceleration Z

    Nunchuk Orientation X

    Nunchuk Orientation Y

    Nunchuk Orientation Z

    Nunchuk Update age

    Nunchuk Deadzone X

    Nunchuck Deadzone Y

  • Great plugin, I'm hoping you could submit it to Ashley and co. so it has a better chance of staying compatible with future Construct versions.

  • I can definitely expose the raw data from Motion Plus, though someone else has to test as I don't have a MP yet.

  • == Actions ==

    Connect (connect to the first available remote)

    Disconnect

    Set report level (buttons only/+accelerometer/+infrared, higher settings use more power, balance board does not use this setting)

    Set rumble (on/off)

    Set LEDs (1/0 for each led)

    Set joystick deadzone (0.0 - 1.0, default 0.03, 1.0 would filter out everything )

    Reset weight calibration (recalibrate BB at rest)

    == Conditions ==

    Connected

    Connection lost

    Button pressed

    Button down

    Button released

    Nunchuk connected

    Is balance board (checks if this remote is actually a BB)

    == Expressions ==

    Pitch (In degrees -180 to 180)

    Roll (In degrees, -90 to 90, 0 is level, remote can't detect upside-down)

    Orientation X

    Orientation Y

    Orientation Z

    Acceleration X

    Acceleration Y

    Acceleration Z

    Battery level (percentage)

    IR X (interpolated 0-1.0 from all leds)

    IR Y (same as above)

    IR Z (Estimated led size, very rough)

    Raw IR X (led number 1-4)

    Raw IR Y (led number 1-4)

    IR Report level

    LED status (Sensor bar led groups seen, bar has 2 but remote can track 4)

    Update age (in milliseconds, if age is too much orientation data might be

    unreliable)

    Joystick X

    Joystick Y

    Nunchuk pitch

    Nunchuk roll

    Nunchuk acceleration X

    Nunchuk acceleration Y

    Nunchuk acceleration Z

    Nunchuk Orientation X

    Nunchuk Orientation Y

    Nunchuk Orientation Z

    Nunchuk Update age

    Nunchuk Deadzone X

    Nunchuck Deadzone Y

    Total weight (in KG)

    Top left weight

    Top right weight

    Bottom left weight

    Bottom right weight

  • Download here! Contains plugins and a test .cap. Link Updated 15. Jun 2010

    Source code here!

    Earlier this year I made a plugin that enables using a Wii remote in construct applications via bluetooth. Mostly it worked well but there was also issues I couldn't overcome. In addition, the Wiiuse API I used stopped being updated.

    I have started again, with cleaner code and a new API, Wiiyourself. It doesn't provide as nice readily-processed data as Wiiuse but has more functionality and is still in development. I didn't reuse anything from the old plugin so it's back to square one. No extra .dll is required any more.

    Requirements:

    • Wii remote
    • A bluetooth adapter
    • Wii sensor bar or similar infrared source for pointer functionality

    (two candles should work... )

    I have a cheapo Billionton bluetooth adapter. It uses the Toshiba bluetooth stack. I can't give instructions for every adapter out there but the procedure is usually similar: Hold 1+2 on your Wiimote until the lights begin to blink and tell your adapter to look for new BT devices. It's a relatively painless procedure but must be done every time you start your PC. The connect command on the plugin itself takes only a second.

    This first release has support for all the remote buttons (can be used as controls) and raw data from accelerometer + IR pointer. While gesture recognition (shaking, swinging) would be nice it's not trivial.

    Known issues:

    • Pointer does not correct for rotation
    • Values could be smoother

    Also worth noting: unlike the Xbox360 pad plugin, you need to add a new Wiimote plugin for each remote. This avoids have a controller number parameter in every ACE.

    (ACE list in next post)

Luomu's avatar

Luomu

Member since 7 Jan, 2009

Twitter
Luomu has 1 followers

Trophy Case

  • 15-Year Club

Progress

15/44
How to earn trophies