VyrCossont [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=59109 geometry_wars <p> <table><tr><td> <a href="/bbs/?pid=103050#p"> <img src="/bbs/thumbs/pico8_geometry_wars-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=103050#p"> Geometry Wars 0.1.1</a><br><br> by <a href="/bbs/?uid=59109"> VyrCossont</a> <br><br><br> <a href="/bbs/?pid=103050#p"> [Click to Play]</a> </td></tr></table> </p> <p>Demake in progress of <a href="https://en.wikipedia.org/wiki/Geometry_Wars:_Retro_Evolved">Geometry Wars: Retro Evolved</a>, one of my favorite games of all time.</p> <p>This uses twin-stick shooter input conventions, and I strongly recommend playing it with a dual-analog gamepad using <a href="https://github.com/VyrCossont/Pinput">Pinput</a>, either with the native desktop PICO-8 player and a native Pinput build, or using the <a href="https://github.com/VyrCossont/Pinput/releases/tag/v0.1.3-alpha.1">Firefox or Chrome extensions for Pinput</a> to play it here on the BBS website.</p> <p>However, you can now also play with two alternate schemes other than Pinput's analog gamepad support. The game will ask you at startup and save your input preferences, but you can always change it from the pause menu.</p> <ul> <li>Pinput: same as the original Geometry Wars. Left stick moves, right stick aims, either trigger bombs.</li> <li>Devkit: uses mouse and full keyboard. WASD or arrow keys move, mouse aims, spacebar bombs.</li> <li>P1+P2: uses inputs from both player 1 and player 2. Player 2's D-pad moves (yes, 2), player 1's D-pad aims, press either player's O or X buttons to bomb. This is intended for keyboards.</li> </ul> <p>This demake isn't suitable for mobile devices without gamepads, because the PICO-8 BBS mobile player only provides virtual gamepad overlays for one player.</p> https://www.lexaloffle.com/bbs/?tid=45742 https://www.lexaloffle.com/bbs/?tid=45742 Sat, 18 Dec 2021 08:46:37 UTC Pinput gamepad tester <p> <table><tr><td> <a href="/bbs/?pid=102019#p"> <img src="/bbs/thumbs/pico8_pinput_gamepad_tester-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=102019#p"> pinput_gamepad_tester</a><br><br> by <a href="/bbs/?uid=59109"> VyrCossont</a> <br><br><br> <a href="/bbs/?pid=102019#p"> [Click to Play]</a> </td></tr></table> </p> <p>Pinput gamepad tester cartridge. This won't do anything useful without <a href="https://github.com/VyrCossont/Pinput">Pinput</a>, either if you download and run it locally, or if you install the <a href="https://github.com/VyrCossont/Pinput/releases/tag/v0.1.3-alpha.1">Firefox or Chrome extensions for Pinput</a> to play it here on the BBS website.</p> https://www.lexaloffle.com/bbs/?tid=45617 https://www.lexaloffle.com/bbs/?tid=45617 Wed, 08 Dec 2021 03:39:45 UTC Pinput: Extended gamepad support for PICO-8 <p>Ever wish PICO-8 had dual analog stick support? Me too, so I wrote Pinput. <a href="https://github.com/VyrCossont/Pinput">Pinput</a> is a Lua library and suite of external helper apps to provide XInput-like gamepad support to PICO-8, without requiring binary patching. The library and helpers use the GPIO area of cartridge RAM to communicate, making Pinput a sort of virtual peripheral plugged into an imaginary expansion port. (The <a href="https://www.lexaloffle.com/bbs/?tid=3909">P8T Twitter client</a> uses GPIO the same way.)</p> <p><a href="https://vyrcossont.github.io/Pinput/">You can try it now if you have a gamepad that works with your browser.</a> (You may want to test it first with <a href="https://gamepad-tester.com/">this gamepad test page</a>.)</p> <p>Demo video:</p> <p><a href="https://raw.githubusercontent.com/VyrCossont/Pinput/main/docs/Pinput-demo-web.mp4"><img src="https://raw.githubusercontent.com/VyrCossont/Pinput/main/docs/Pinput-demo-web.jpg" alt="Pinput working in web browser with Logitech F310 gamepad" /></a></p> <h1>What do you get?</h1> <ul> <li>Up to 8 players</li> <li>Per player:</li> <li>2 analog thumbsticks</li> <li>2 analog triggers</li> <li>4-way digital D-pad</li> <li>4 digital action buttons (ABXY)</li> <li>2 digital bumper/shoulder buttons</li> <li>2 digital thumbstick buttons</li> <li>2 or 3 digital menu buttons (Start and Back, plus Guide/Xbox/PS button on macOS and web)</li> </ul> <p>Pinput currently works on:</p> <ul> <li>macOS: with up to 8 gamepads supported by <a href="https://developer.apple.com/documentation/gamecontroller">Apple's Game Controller API</a> (newer Xbox One, DualShock 4, DualSense, MFi)</li> <li>Windows: with up to 4 gamepads supported by <a href="https://docs.microsoft.com/en-us/windows/win32/xinput/getting-started-with-xinput#introduction-to-xinput">XInput</a> (360, Xbox One)</li> <li>Web: depends on your OS and browser's support for the <a href="https://www.w3.org/TR/gamepad/">web gamepad API</a>, but expect USB/BT HID gamepads to work, and on Windows, probably XInput too</li> </ul> <p>Coming soon:</p> <ul> <li>rumble/vibration support</li> <li>battery level/charging status for wireless controllers (macOS and Windows only)</li> <li>Linux</li> </ul> <h1>How does it work?</h1> <p>When you initialize <a href="https://github.com/VyrCossont/Pinput/blob/main/PICO-8/pinput.lua">the Pinput library</a> in a cartridge, it writes a magic UUID to the first 16 bytes of the GPIO area. The external helpers look for this magic UUID in PICO-8's memory to identify the GPIO area. On macOS, the helper uses <a href="https://developer.apple.com/documentation/kernel/mach/vm">Mach virtual memory APIs</a> to map GPIO into the helper's address space. On Windows, the helper uses ReadProcessMemory/WriteProcessMemory from the <a href="https://docs.microsoft.com/en-us/windows/win32/memory/memory-management-functions">Windows memory API</a>. Cartridges exported in web format expose GPIO as an array of integers in JavaScript, so the web version just needs <a href="https://github.com/VyrCossont/Pinput/blob/main/web/pinput.js">a little extra JavaScript</a>. Once the helper knows where GPIO is, it can read and write gamepad data there for the cartridge to use.</p> <p>All platforms have the same interface between a cartridge and the helper, so you can run the same Pinput-enabled cartridge on macOS, Windows, or your browser.</p> <h1>Why?</h1> <p>I wanted to do a Geometry Wars demake but still have twinstick support. 😁</p> <p><img src="https://raw.githubusercontent.com/VyrCossont/Pinput/main/docs/Pinput-demo-spin.gif" alt="Claw ship firing shots at all angles" /></p> https://www.lexaloffle.com/bbs/?tid=44960 https://www.lexaloffle.com/bbs/?tid=44960 Tue, 12 Oct 2021 18:25:22 UTC