2018-11-14 00:07:37 (edited by JLove 2018-11-14 00:08:16)

Is it possible to incorporate xbox/PS controller support with BGT, and if not, what's the better language to use?

2018-11-14 02:24:17

The joystick class works with PS controllers for me. I could never get Xbox to work on Win8 in general, so not sure how BGT feels about it when it does work.
With Java, 10 years ago at least, I used Jinput. I think Pygame comes with controller support, but I haven't checked to be sure.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2018-11-14 06:04:16 (edited by JLove 2018-11-14 07:23:27)

I've got an XB controller, but I know others in the community use PS controllers.  I'd want both of them to work correctly.  I use Windows 10, and I have no issues using an XB controller.  I know that it's possible to use an XB controller on Windows 8.1.  I don't know Python, so I'm not sure how hard Pygame would be to learn.  I also have no idea how easy it would be to use sounds in Python in terms of audiogames, getting them placed in a field where I want them, or having them adjust position based on where the player is.  I do know that in C++ DirectX is a fucking nightmare.

2018-11-14 07:25:38

Some of the more recent versions of Pyglet have some [joystick support], I think pulled from SDL2. So does SFML and by extension pySFML. I also have a variety of OpenAL examples for Pyglet and PyAL in a repo for things like 3D positional audio, HRTF, EFX, etc. if you'd find those useful.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2018-11-14 08:59:53

for python, pysdl2 is a great way to go. it has support for joysticks, keyboard input, window, and anything that you can emagine.
it is a wrapper towards sdl2 using ctypes, so, it is really fast.

2018-11-14 09:11:40

What about learning the language itself?  I don't know python at all.

2018-11-14 09:59:47

Well that depends on whether or not you want to dig into it for your project, there's lots of free books and resources available for it, like [Dive Into Python], huh... seems the Dive into Python site has gone vaporware. Anyway, there's also [How To Think Like A Computer Scientist], [Think Python], etc. There's also plenty of folks here who can help if you have any questions or provide examples.

-BrushTone v1.3.3: Accessible Paint Tool
-AudiMesh3D v1.0.0: Accessible 3D Model Viewer

2018-11-14 13:58:32

It's like bgt, but with fewer symbols and more indentation. Also softly typed (it doesn't care if a variable is an int or a string until you actually do operations on it).
I'd try BGT with the Xbox controller, just to see if it works. BGT's big weakness is that it only let's you use one axis control, instead of the 3 that most controllers have these days. Ex, for PS4, it only uses the left stick, and not the right or the d-pad.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2018-11-16 05:42:06

@Post 2, you know that's really weird. I have like 4 PS controllers but I can't get them to work. Maybe they don't work on Windows 10? I'm getting a new gamepad on amazon, any iddea how to get the ps controllers to work?

Ivan M. Soto.
Feel free to check out my work and services.
http://ims-productions.com

2018-11-16 12:34:00

Pygame supports joysticks, but I haven't found anything so far that will support XInput directly to take advantage of rumble feedback.

Much less active on this forum than in the past.

Check out my live streams: http://lerven.me
follow me on Twitter: http://twitter.com/liamerven

2018-11-16 15:17:14

@9: They work for me on Win8 without anything extra. It seems weird that they wouldn't work on 10. I mostly just use PS1 controllers via USB adapter, since I'm the one person who prefers the d-pad, but PS4 has worked whenever I've tested it.

看過來!
"If you want utopia but reality gives you Lovecraft, you don't give up, you carve your utopia out of the corpses of dead gods."
MaxAngor wrote:
    George... Don't do that.

2018-11-16 16:38:53

@10, pysdl2 has support for force feedback if thats what's your looking for