Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Wiimote support #1563

Merged
merged 21 commits into from
Jul 15, 2015
Merged

Add Wiimote support #1563

merged 21 commits into from
Jul 15, 2015

Conversation

larsiusprime
Copy link
Member

This adds wiimote support using either the MayFlash Dolphin Bar or the HID-Wiimote driver.

Currently works and tested in flash and legacy. Does not currently work in next for some reason, but doesn't break anything, either. I think it just isn't detecting the gamepad ID for some reason.

Legacy support needs this (simple) pull request to lime to work:
openfl/lime#499

…s for it that work, and thus no predictable hardware ID's. The most common use case for it is to install a tool that makes it mirror a 360, at which point the Flixel API will just think it's a 360 and neither the user nor the API will be the wiser.
@Gama11 Gama11 changed the title Wiimote Add Wiimote support Jul 14, 2015
analog = new FlxGamepadAnalogList(this);
}

public function traceAxes(f:FlxTimer):Void
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These trace functions look like debug code?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

they are, but could be useful to keep around in the API if they're not actually called... maybe? I use them all the time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh, not sure I'm a fan of having that be part of the API... Perhaps we could have a FlxGamepad tracker profile instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It takes five seconds to add them in when I need them, I'll just trash em.

@@ -33,6 +37,12 @@ class FlxGamepad implements IFlxDestroyable
public var model(default, set):FlxGamepadModel;

/**
* For gamepads that can have things plugged into them (the Wii Remote, basically).
* Making the user set this helps
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"helps..." what?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha, I did forget to finish that didn't I.

return model;
}

private var t:FlxTimer = null;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think this is used anywhere (anymore)?

…flash on google chrome, added missing y axis inversion case for flash on windows standalone player
…flash player, not google+chrome as reported. I'm restoring to just flipping AdobeWindows and not GooglePepper so someone can try to repro and confirm.
@larsiusprime
Copy link
Member Author

How bout now?

@Gama11 Gama11 mentioned this pull request Jul 14, 2015
@Gama11
Copy link
Member

Gama11 commented Jul 15, 2015

HTML5 builds are failing (see travis).

@Gama11
Copy link
Member

Gama11 commented Jul 15, 2015

I can't test if the whole Wiimote stuff actually works, but the API looks ok to me now (and the Xbox 360 stuff still works). Thanks! 👍

Gama11 added a commit that referenced this pull request Jul 15, 2015
@Gama11 Gama11 merged commit f401880 into HaxeFlixel:dev Jul 15, 2015
@larsiusprime
Copy link
Member Author

Does the fact that we test HTML5 in travis imply that flixel works in HTML5? If so I can hook up the gamepad ID's for that too... are there any special instructions? (I just tried and got a black screen).

@Gama11
Copy link
Member

Gama11 commented Jul 15, 2015

That alone just implies that it compiles.. but, yes, in general it should also work. Mode works fine for example.

Getting any errors in the js console? What browser? Browsers other than Chrome have some issues atm I think.

@larsiusprime
Copy link
Member Author

Cool, that's a good starting point, I'll go from there. Are we using canvas or GL, and/or what custom backend/add'l dependencies, if any?

@Gama11
Copy link
Member

Gama11 commented Jul 15, 2015

You shouldn't need to add anything. I think OpenFL uses canvas by default, haven't tested GL.

I'm not sure Lime's gamepad API is even implemented on HTML5 right now?

@sruloart
Copy link
Contributor

BTW, If the black screen issue continues see here and here.

(and AFAIK for dev it's canvas + Openfl (legacy) html5 backend).

@larsiusprime
Copy link
Member Author

This should help with setting up gamepads for HTML5, I think:
http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html

@sruloart
Copy link
Contributor

It's only implemented in bitfive, looks like, not openfl...

@larsiusprime larsiusprime deleted the wiimote branch August 28, 2015 17:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants