Peer-to-peer networking library for Balatro
  • Lua 90.1%
  • Python 9.9%
Find a file
2026-10-23 19:30:16 -04:00
assets Add proper icon 2026-10-23 16:39:17 -04:00
lovely A bunch of stability improvements 2026-10-22 11:16:30 -04:00
src Various fixes 2026-10-22 15:35:31 -04:00
srv Various fixes 2026-10-22 15:35:31 -04:00
.luarc.json Initial commit 2026-10-19 00:24:42 -04:00
.stylua.toml Various fixes 2026-10-22 15:35:31 -04:00
LICENSE Initial commit 2026-10-19 00:24:42 -04:00
manifest.json Add README.md 2026-10-23 19:30:16 -04:00
README.md Add README.md 2026-10-23 19:30:16 -04:00

Seance

Peer-to-peer networking library for Balatro.

Installing

Seance requires Lovely. Once it is installed, place Seance (as source code or a zip archive) into your mods directory.

Usage

-- First, connect to the rendezvous server
local matchmaker = require('seance').matchmaker.listen()
-- Once `matchmaker:ready()` returns true, send `matchmaker.slug` to a peer so they can connect:
-- ```
-- local seance = require('seance').matchmaker.connect { slug = 'ABCDEF' }
-- ```
-- Once a peer tries to connect, this will return a seance (or `nil` in the meantime):
local seance = matchmaker:accept()

-- Refuse further connections.
matchmaker:close()

-- After this point, the connection is symmetric.
-- A seance multiplexes multiple datastreams over a UDP connection.

-- This acts like TCP:
local myCoolStream = seance:open('myCoolStream', { type = 'stream' })
myCoolStream:send('my cool data')
print(myCoolStream:recv())

-- This acts like UDP:
local myCoolerStream = seance:open('myCoolerStream', { type = 'messages' })
myCoolerStream:send('This data might get lost')
print(myCoolerStream:recv())

-- When you're done, close the connection and all of its children:
seance:close()