#Pinput

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2024-01-24

i should make sure #Pinput works with modern #pico8 and #wasm4 in time for #StrawberryJam…

if you want vibrator support for your PICO-8 (most platforms) or WASM-4 (desktop only) game, Pinput is here for you codeberg.org/vyr/Pinput

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-12-10

github.com/buttplugio/buttplug

i made #ButtplugIO buzz a Dual Shock 4 gamepad on macOS today. gamepads are the vibrator everybody already has, but Buttplug's current gamepad support covers only XInput devices and only on Windows, a category that notably does not include Sony or Nintendo stuff.

since i used SDL2 for gamepad support in #Pinput, that part was easy, but Pinput's single-threaded. Buttplug isn't, instead using async code backed up by either a Tokio runtime or WASM threads, and most SDL types aren't thread-safe, which is where the actors in the previous posts came in: send gamepad control messages over mpsc channels to actors on a thread dedicated to SDL, get responses back using one-shot channels.

next challenge: figure out why the example vibe tester isn't exiting cleanly on Ctrl-C. something's still waiting to progress, i suspect. the JetBrains debugger is wildly inadequate for async stuff, where stack traces don't exist and threads are only vaguely relevant, but github.com/tokio-rs/console looks useful…

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-12-06

#Pinput now supports reading the touch/pressure sensors on the #Kiiroo Pearl 2.1 vibe (they get mapped to buttons and joystick axes), and in theory, also the sensors on the only other device that #ButtplugIO currently supports inputs from: the #kGoal Boost (although i don't have one to test with)

so if you wanted to make a #pico8 game but were holding out until you could control it with your pelvic muscles, now's the time πŸ˜„

(also, Pinput can now read the battery level of your haptic device, as it can already do for wireless gamepads on most platforms)

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-11-27

here's the #Pinput patch for #pico8's Jelpi demo, which adds short vibration events on jump and dash, and longer ones when you take out an enemy:

gist.github.com/VyrCossont/5c8

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-11-26

want to be able to do horny #gamedev with your fantasy console? here comes the πŸ“³πŸ’“! i've just released binaries for #Pinput 0.1.4-alpha1, which adds #vibrator support alongside analog gamepad support for #pico8 and #wasm4 games, thanks to #ButtplugIO.

got questions? please ask me! i've written docs, of course, but i'd love if y'all tried it and let me know your use cases and any points of confusion.

hardware-wise, check the IoST Index to see if your toys are supported: anything marked as compatible with buttplug.io should work in theory, and i've been testing with BTLE toys from #Lovense and #Kiiroo and know them to work in practice.

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-11-26

#Pinput #ButtplugIO support now works in Chrome with either Web Bluetooth or a websocket connection to Intiface Central, and Firefox and Safari with Intiface Central only

edit: it actually works fine in Firefox. likely to be user error on my part.

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-11-25

want to add #SexToy support to your #pico8 or #wasm4 game? now you can! i just pushed prototype support for vibrators in #Pinput via #ButtplugIO: Pinput PR #1. (no official binaries yet, i have some testing to do first to make sure everything still works with my collection of gamepads and vibes.)

the PICO-8 and WASM-4 test cartridges, which currently activate a gamepad's rumble motors when its triggers are held down, now also activate the rumble motors of any attached haptic devices.

does this count as #teledildonics if i hand one of my girlfriends a gamepad with a very long cord? πŸ€”

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-11-23

adding #ButtplugIO support to #Pinput by telling it that each haptics device with up to two motors is an XInput-like gamepad. close enough, right?

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-09-07

wow, it's been almost a year since the last release! please enjoy #Pinput v0.1.3, which adds modern analog gamepads with rumble to both #pico8 and #wasm4.

github.com/VyrCossont/Pinput/r

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-08-21

everything old is new again: the #wasm4-capable version of #Pinput now has a test cartridge with the same capabilities as the #pico8 version

PICO-8 test cartridge for Pinput, showing a gamepad's controls, rumble indicator, battery charge indicator, etc.WASM-4 test cartridge for Pinput, looking very similar to the PICO-8 version
Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-08-20

a few minor modifications and i have #Pinput working with WASM-4 as well as PICO-8. going to make this an official feature very soon!

#wasm4 supports Rust, and being able to reuse gamepad structs and bit masks from the Rust version of Pinput has already saved me some time with the test cartridge.

a Pinput test cartridge for WASM-04 showing D-pad and action buttons being pressed, next to a terminal running Pinput, and part of its source code
Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2022-01-02
Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2021-12-17

it just occurred to me that input recording and playback should be a #Pinput feature, not a cartridge feature

that'd make testing Pinput easier too

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2021-12-08

github.com/VyrCossont/Pinput#w i guess i know how to make web extensions. now #Pinput can run on Lexaloffle BBS web player cartridges.

i really should get this on addons.mozilla.org/ and chrome.google.com/webstore/cat so civilians can use it, but it's late

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2021-11-24
Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2021-11-22

i am serious about #Pinput hardware compatibility testing

…mostly because i have a gamepad problem. hobby? hoblem?

top to bottom, left to right:
β€’ Xbox 360 wired
β€’ Xbox 360 wireless (needs a USB adapter to be used with PCs, but i still have at least one)
β€’ Xbox One model 1708 (the first one with Bluetooth)
β€’ Ipega 9803s (Bluetooth controller/handle for tablets, goes wide enough to fit a Surface Go) <m.ipega.hk/gamehandle/53-180.h>
β€’ DualSense (PS5)
β€’ DualShock 4
β€’ Steam Controller
β€’ Logitech F310
β€’ Switch Joy-Con Charging Grip, with joycons
β€’ Switch Pro Controller

(1708 and DualSense courtesy of @millenomi)

a neat grouping of ten gamepads on a wooden floor
Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2021-10-26

the #Rust version of #Pinput for #pico8 is working on macOS now. plenty of caveats and TODOs compared to the other versions, but catching up fast. not tested on Windows or Linux yet.

github.com/VyrCossont/Pinput/t

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2021-10-14
Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2021-10-11

@Scarlet i found the first edition (free from the author at newosxbook.com/MOXiI.pdf) very readable and useful when i was writing the macOS version of #Pinput

Vyr Cossont πŸ³οΈβ€πŸŒˆπŸ³οΈβ€βš§οΈvyr@demon.social
2021-10-10

#GeometryWars 4 is gonna be awesome

#pico8 #Pinput

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst