I want to control my pico game via html element event handlers. Given that, what memory address (pico8_gpio offset) must I poke at if I want to simulate a btn(0) event? Also, what's the offset for simulating additional player actions, say, btn(0,1)? Thanks.
from the exported html:
// When pico8_buttons is defined, PICO-8 takes each int to be a live bitfield // representing the state of each player's buttons var pico8_buttons = [0, 0, 0, 0, 0, 0, 0, 0]; // max 8 players pico8_buttons = 2 | 16; // example: player 0, RIGHT and O held down // 1:LEFT, 2:RIGHT, 4:UP, 8:DOWN, 16:1st button (O), 32:2nd button (X)
also you might be interested in this: Gamepad support in browser for PICO-8 by Krajzeg
[Please log in to post a comment]