Log In  
Follow
alexr
Follow

I have a controller connected to my laptop. To configure pico-8 for it, I did : launch Gamepad Tool > Copy Mapping String > append string to sdl_controllers.txt > relaunch pico-8. This works well.

Now, I would like to use the controller's shoulder buttons as replacements for the d-pad's dpleft (btn 0) and dpright (btn 1), respectively. Can this be done at all? Note that this is not for exported (to html) games but rather to those launched from the pico-8 console.

EDIT:
To be clear, I'd like to control a pico-8 game using a gamepad's shoulder buttons.

EDIT2:
GamepadTool mapping string, as entered in sdl_controllers.txt is this:
03000000bd12000015d0000000010000,Tomee SNES USB Controller,a:b2,b:b1,back:b8,dpdown:+a1,dpleft:-a0,dpright:+a0,dpup:-a1,leftshoulder:b4,rightshoulder:b5,start:b9,x:b3,y:b0,platform:Mac OS X,

P#71408 2019-12-26 02:50 ( Edited 2019-12-26 03:43)

Here's my 558-char TweetTweetJam3 entry, including memory poked sfx (thanks to @eruonna for documenting that).

Cart #jammerboard-1 | 2019-11-17 | Code ▽ | Embed ▽ | No License

P#69964 2019-11-17 11:40 ( Edited 2019-11-17 23:58)

How do I create a middle c note in sfx 0 programmatically? I'm not sure on the formula to calculate the offset from 0x6000.

P#69938 2019-11-16 14:03 ( Edited 2019-11-16 14:04)

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.

P#46446 2017-11-18 10:25 ( Edited 2017-11-19 00:21)

Is there a shortcut for editor code tab switching? Couldn't find it in the docs.

P#45762 2017-11-01 05:44 ( Edited 2017-11-01 20:34)

(This may sound convoluted)

Is it possible to invoke an embedded ("export html") pico-8 program's functions from an external javascript file?

In this particular case, I wrote a .js app that fetches remote data asynchronously (via ajax). I then want to map that data to a sequence of pico-8 program function names, invoking each one in turn at regular intervals.

P#32515 2016-11-15 13:51 ( Edited 2016-11-16 18:49)

I often browse the pico-8 forums on my mobile. On my phone (Samsung S4), I have to squint like a maniac because the contents of the pages are not rescaled by the browser, which they would be if the following viewport meta was on each page:

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />

Can the person responsible for these forums (and web site in general) add that so that I can go back to "squintless" reading. :)

Cheers
Alex

P#25567 2016-07-19 15:19 ( Edited 2016-07-20 02:30)

Hi all.
The following code doesn't work -- players don't get drawn.
What am I doing wrong?
Thanks in advance.
Alex

players = {}

function make_player(col)
  local p = {}
  p.x = 0
  p.y = 0
  p.color = col
  return p
end

function draw_player(p)
  rectfill(p.x-2,p.y-2,p.x+2,p.y+2,p.color)
end

function _init()
  players.home = make_player(1)
  players.visitor = make_player(8)
end

function _draw()
  cls()
  foreach(players, function(p) draw_player(p))
end
P#14559 2015-09-24 10:12 ( Edited 2015-09-25 01:57)

Could someone explain how glitch effects similar to Benjamin Soulé's Mr.Beam were done? No code as much as an overview.

Thanks in advance.
Alex

P#13533 2015-09-01 22:44 ( Edited 2015-09-02 04:55)

Follow Lexaloffle:        
Generated 2020-02-27 05:41 | 0.086s | 4194k | Q:42