Log In  

Hello! I'm new to PICO-8, and loving it. I'm not new to programming or game dev.

I've collected a list of questions/thoughts, in no particular order...

  1. Sharing: I've uploaded my first game to itch.io, rather than here, so I can customize the HTML around the player. Is it bad BBS etiquette to link to games on itch? It seems popular to directly share games here, not link to self-hosted or third-party.

  2. Single-player: Is there a way to indicate a game is single-player? Maybe a register to Poke()? Ideally it would remove the "Player 2" controls from the Controls screen.

  3. Exporting: I like that you can EXPORT the map, spritesheet, etc. "headlessly" via the commandline. Personally I love build scripts, and automatically exporting things. But is it impossible to export a cartridge (.p8.png) and music (.wav) by headless commandline? I must open the editor and type the commands?

  4. Music: Does the Speed of a SFX correlate to a traditional BPM? Is there a formula? Or, is it not guaranteed to play back at one BPM depending on platform, etc. (I have seen this other thread, about roughly tracking the state of the music player https://www.lexaloffle.com/bbs/?pid=10719#p10719 )

  5. HTML Export: When the p8 file contains a label image, and title (first comments in code), it would be neat to generate OpenGraph meta tags for the HTML (so you get a sleek preview card, when sharing your game)

  6. Binaries: Is there a way in-code to know what platform you're playing on? Windows/Mac/HTML with touch controls, etc. Currently I detect HTML with/without touch by writing GPIO bytes from the HTML page.

  7. Conventions: The "O" and "X" buttons... is the "O" conventionally Action/Confirm and the "X" is Secondary/Cancel? Like a Game Boy layout?

  8. Menus: When you add a custom menu item, such as "TOGGLE MUSIC", and the callback function is triggered, is the game supposed to update/advance one frame? It seems to happen to me, but not 100% of the time, inconsistently. Maybe a bug?

That's all for now. I left out some other questions I've mostly solved.

Thanks for any guidance!

P#95372 2021-07-28 03:49

> Binaries: Is there a way in-code to know what platform you're playing on? Windows/Mac/HTML with touch controls, etc. Currently I detect HTML with/without touch by writing GPIO bytes from the HTML page.

wah I would like to know this one as well xD scouring from the doc page I haven't found any clue (my guess is that it should be placed in stat function). What I do right now is simply passing the -p argument from command line then read from stat(6), since I'm using GPIO intensively for networking, don't want to waste it

P#95375 2021-07-28 04:28
:: merwok
1

1: It is very common to share on the bbs, which makes games playable in browsers (with up-to-date pico8 version), in splore and on custom off-line devices (by downloading the cart). The cartverse expands thanks to all game devs, and access to the source helps everyone learn things. A game that’s only on itch is not part of the cartverse; people do that to hide their code (although it’s not a perfect protection), or because the game requires something custom built with the javascript gpio interface. In that case, you could make a bbs post to show some pictures and give the address to the game! At least it can be played in the browser.

2: Not that I know of. I think maybe a majority of games are single-player, players just get that because there’s one character on screen, and nobody worries about the controls screen.

3: It should be possible to save a cart in headless mode, see https://www.lexaloffle.com/bbs/?tid=38271

4: A few people have made youtube videos that go in depth into pico8 music (gruber, algorhythmic), maybe you’ll find something. Or come on the discord server and ask in the music channel!

5: You can use your own HTML template for exports, but there are no variables available with game metadata to use. You can try making a feature request (with a bbs post in the right category), but I’m not sure zep would add it. There’s no command to export the cart image for now, also the first two lines being title and author are only conventions, not hard rules. I think you’re better off doing your own templating in a pre- or post-process step to fill in metadata. (A tip: after the initial 'export index.html', you only need 'export index.js' when you update your game, so you don’t lose your customized HTML page.)

6: We can detect bbs and other websites (https://pico-8.fandom.com/wiki/Stat#.7B100.E2.80.A6102.7D_BBS_information), but I think we can’t make a difference between binary exports and regular cart running with pico8.

7: There’s an old debate about whether the button layout is OX or XO, so no. Some games allow switching controls with a menu item.

8: I think that’s a known bug in the latest release and will be fixed in the next one.

P#95391 2021-07-28 16:14
2

Sound effect speed is a multiple of approximately 1/120th of a second per note. For example, a speed of 15 is 15/120 seconds per note, or 8 notes per second. If you write music with a beat every 4 notes, then it's 2 beats per second or 120 bpm.

P#95415 2021-07-29 06:18
:: touk

Thanks dddaaannn for the sound info! (Also I now realized I could sequence some dummy music, export to WAV, and correlate the length/speed in the tracker to the exported WAV length...)

merwork, thanks for info about every bullet point!

  1. For my first game, I did tweak the HTML skin and use JavaScript GPIO bytes, so I may just share the itch link.

  2. Yeah it's harmless. But coming to PICO-8 with fresh eyes, it seemed silly that it always displays Player 2 controls regardless of the game!

  3. You're right! I confirmed I can export a .p8.png by commandline. I assumed it wouldn't work since that's internally a SAVE command, not an EXPORT command.

  4. Right, I created a template.html with OpenGraph metadata, color tweaks, GPIO calls, and when I EXPORT to HTML, I copy that template over.

  5. I knew about some Stat() vars, but not all those! Clipboard contents, time of day... cool!

  6. I know OX vs XO is a bit of a culture thing, in fact Sony just swapped them:
    https://www.eurogamer.net/articles/2020-10-05-in-a-historic-move-playstation-5-swaps-x-and-circle-button-use-in-japan

  7. OK about the menu bug. I could post a cartridge to demonstrate, if needed.

Thanks!

P#95478 2021-07-30 03:04
1

Oh! Something I noticed recently re: the whole "is O confirm or X" question: if you use the experimental devkit inputs, one of the flags you can set is to treat the mouse buttons as controller buttons ... and I believe it assigns the left mouse button to X.

It's a very weak implication of which button serves which purpose, but it is an implication.

SPLORE and the pause menu both treat both buttons as confirm, I hasten to note.

P#95536 2021-08-01 01:35

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-09-28 20:29:24 | 0.009s | Q:15