@zep@mastodon.social
@zep@mastodon.social avatar

zep

@zep@mastodon.social

Working on fantasy consoles (PICO-8, Voxatron, Picotron) and trying to make my way back to userland. https://www.lexaloffle.com

#indiedev #pico8 #gamedev

This profile is from a federated server and may be incomplete. Browse more on the original instance.

zep, (edited ) to random
@zep@mastodon.social avatar

waveform doodling for 0.2.6

// sfx slots 0..7 can be marked as a waveform instrument, in which case the 64 bytes of data are used as looping 8-bit sample data

zep, to random
@zep@mastodon.social avatar

ok, I think it is time.

(they work the same as sfx instruments, and sfx instruments themselves can contain waveform instruments)

zep,
@zep@mastodon.social avatar

@fsouchu Each waveform is 64 int8's ( w/ linear interpolation). The sampling rate is the same as for the built-in waveforms.

zep, (edited )
@zep@mastodon.social avatar

@waporwave There isn't, but a note played at A#-0 is close and would play the waveform roughly 0.96 times per tick. ~ only the 64th value is not used if played for a single tick (and the 63rd value is lerped towards but not quite reached)

That's 1/120th of a second playing the waveform at ~7700Hz. Maybe not long enough for a drum sample but you could plausibly chain them together: e.g. use 4 waveform SFXs + 1 inst SFX to get a one-shot sample 1/30th of a second long playing at 7700Hz.

zep,
@zep@mastodon.social avatar

@Felice The built-in waveforms are calculated analytically, but since the waveforms are lerped, they could exactly reproduce the triangle instruments. Everything rendered out at 22050Hz. A#-0 is close to 64 sample values per tick, so pitches including and below that do not loop within a tick (see other reply in this thread)

zep,
@zep@mastodon.social avatar

@fsouchu @Felice Just the 8. They share the same indexing as sfx instruments, so can only have 8 waveform instruments + sfx instruments combined.

zep, to random
@zep@mastodon.social avatar
zep,
@zep@mastodon.social avatar

@fsouchu
If you have a dev folder that contains exactly the files that should be contained in a cartridge then: $cp dev_folder out.p8.png
But otherwise, I don't think there would be a special mechanism or packaging utility -- you'd need to write a custom .lua script that picks out needed files.

zep, (edited )
@zep@mastodon.social avatar

@voyager7 Thanks for the heads up -- it was kind of related: a nasty race condition (happens under heavy load) causing *empty page responses to get cached/served. It should be fixed now.

zep, to random
@zep@mastodon.social avatar
zep,
@zep@mastodon.social avatar

@fsouchu Looks like mapping gfx/video to >= 0x8000 (at 2k increments) will be in 0.2.6. Apart from that, just bugs & QOL details.

zep,
@zep@mastodon.social avatar

@Liquidream @Powersaurus I'm going to include a wee bit of music theory in the release notes to get started :D

zep,
@zep@mastodon.social avatar

@MBoffin @fsouchu

(☞゚ヮ゚)☞

zep,
@zep@mastodon.social avatar

@Ronflaix @Liquidream @Powersaurus *flamewar over the meaning of Phrygian mode breaks out, release thread gets locked *

zep,
@zep@mastodon.social avatar

@krystman Music education at highschool is whack (I'm assuming not just in New Zealand). Programming too for that matter, while I'm complaining.

zep,
@zep@mastodon.social avatar

@fsouchu unceremoniously :)

(I'll check for usage of _map_display and do stealth patches where possible though)

zep,
@zep@mastodon.social avatar

@p01 @fsouchu My reservations were partly about offering that level of specialized functionality that could be a snippet, but:

  1. It's too much fun
  2. Cheap tunnels :D
  3. I found a nice back-compat place to put it:

poke(0x5f34, 0x2)
circfill(64,64,20,0x500|col)

i.e. it extends the existing mechanism for specifying fill patterns in the colour parameter bits, which is enabled with bit 0x5f34:0x1. This feels quite natural to me and I think the two would often be used together.

zep,
@zep@mastodon.social avatar

@p01 @fsouchu

That should be: 0x1800|col

Here's what that section of the manual would look like, (changes on lines with the highlighted "inv"'s).

zep, to random
@zep@mastodon.social avatar

I tried to make a game in 20 seconds for , but I went 53 seconds over budget.

pico-8 editor being used to make a crappy game where a pink spaceship crashes into rocks

zep, to random
@zep@mastodon.social avatar

WIP waveshaping & envelopes (thx @luchak for the idea of going hard cut -> foldback)

https://youtu.be/UZ9YIaLpWmA

zep,
@zep@mastodon.social avatar

@luchak I'm very happy to hear that! One reason Picotron exists is that I couldn't bend the PICO-8 synth to sound filthy enough for Voxatron, haha

The sinusoidal foldback is cleaner, but maybe /too/ clean in some cases, so it might end up being a toggle-able flag.

johanpeitz, to random
@johanpeitz@mastodon.gamedev.place avatar

Thinking about multiplayer golf.

video/mp4

zep,
@zep@mastodon.social avatar

@tinspin @johanpeitz PICO-8's online functionality has peculiar requirements (that I can't talk about yet!) + the need to for future guarantees about cost etc make it unsuitable to use 3rd party services or even existing self-hosted solutions. The current impl is 100% C custom-built on libwebsocket \m/

zep,
@zep@mastodon.social avatar

@tinspin It is based on websockets, but the non-web clients only depend on std libraries (to do only ws://), so can still be quite small. Channel states are persisted to a b2 bucket.

zep, to random
@zep@mastodon.social avatar

lexaloffle.com is being pummeled by weird reqs today ~ is it because cloudflare's dashboard is down and bad actors are treating it like the purge?

(the server seems to be coping fine, but I turned up rate limiting so log in if you want to do many searches or something)

zep,
@zep@mastodon.social avatar

@frew the Bard crawler was using your service's search feature? That seems very aggressive!
No useragent though -- just being curl'ed (and the ip address ranges don't belong to anyone obvious), so probably just spammers.

Farbs, to random
@Farbs@mastodon.social avatar

@zep Hello! I'm writing a Lua-based game framework and seeing some stutters that look suspiciously like garbage collection. Do you have any tips on either GC tuning or custom allocators?

zep,
@zep@mastodon.social avatar

@Farbs Maybe too late to be useful but..
I think simply collecting every frame isn't a bad strategy; minimize worst-case spikes at the cost of perf over time.

PICO-8 uses the standard 5.2 incremental collector lua_gc(L, LUA_GCSTEP, 200), and falls back to a full collects if the incremental can't keep up (i.e. keeps hitting the 2MB max allocation threshold)

I tried an adaptive step amount, but that causes all kinds of chaotic behavior for carts with irregular allocation patterns.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • rosin
  • InstantRegret
  • khanakhh
  • ngwrru68w68
  • osvaldo12
  • DreamBathrooms
  • mdbf
  • magazineikmin
  • thenastyranch
  • everett
  • Youngstown
  • slotface
  • kavyap
  • provamag3
  • GTA5RPClips
  • Durango
  • cubers
  • modclub
  • tester
  • tacticalgear
  • cisconetworking
  • ethstaker
  • anitta
  • Leos
  • megavids
  • normalnudes
  • lostlight
  • All magazines