⚠️ This thread is currently for discussion only. Active development will start later, after I've gained a bit more experience with Balatro modding
After some thought and discussions with friends, I've come up with an idea for a multiplayer mod for Balatro. Since head-to-head has already been excellently done in the Balatro Multiplayer mod, I've decided to instead take inspiration from Tetris 99 and Mario 35 and go with parallel play
In summary, you will be playing Balatro alongside (hopefully) 51 other players, and the goal is to be last one alive. You won't be battling other players directly, but will have ways of interacting with them
Each of the example games has elements that would need reimplementation in this mod:
- A timer of some kind. This is in place to force players to move forward and not idle. In Tetris 99, the core gameplay loop does that by default, and in Mario 35 it's an explicit timer. In both cases, playing well (clearing lines or killing enemies) gives you more time. So a logical way of doing this would be chips countdown. At the start of the game and whenever you gain chips, they get added to a total that is constantly going down, and does so faster and faster. If it reaches 0, you lose just like if you couldn't clear a blind
- An indirect way of messing with other players. Tetris 99 has garbage lines, and Mario 35 has gray enemies. What I imagine for Balatro would be anti-tags. On some condition (maybe defeating a boss blind) you would get to pick an anti-tag (a tag with a negative effect) to send to other players. Those tags would apply effects to blinds or the run in general to handicap the other players (adding boss blind effects, messing with your jokers or money, etc). Whether this would go to all other players or specific ones with a similar targeting system to the example games is up to debate
- A reward for eliminating players. Determining if you have eliminated a player would be fairly simple, by considering that if a player dies in the blind/ante after receiving one of your anti-tag, you are credited with the elimination. This would mean multiple players could get credit. What kind of reward this could give you is to be determined, whether this would be an in-game effect (bonus mult, bonus money) or purely within the mechanics of the mode (reduced chips drain)
Finally, on the technical side, I don't believe good-faith networking like the Balatro multiplayer mod uses is possible here. 52 strangers getting into a game incurs an overwhelmingly high chance of at least one player having a mod that gives them an unfair advantage. This means server-side authority will be necessary to ensure a fair experience for everyone, which has two possibilities:
- Running a Balatro instance for each player on the server that replays the actions (sent from the client) and validates them. This has the big advantage of being guaranteed to have no differences with an unmodded client, and allows the addition of other mods fairly easily, but has the big flaw of being very inefficient. All the visual elements that could cause most of the lags are useless for the server to have and could result in the server being unable to keep up, especially if multiple games are running at once
- Reimplementing the Balatro engine in a more streamlined way. The way I see it would be to do so in Typescript, so that it could interface with Node.js. This has the huge problem of being a massive amount of work, and runs the risk of different behaviors in specific cases, and necessitate extra work for other mods. It would allow more control both over the serverside code (and allow me to write it in TS rather than lua which I will take)
There are probably other things to consider, but those are the main ones imo. Hope this sounds interesting to other people, and that I will get the time to work on this some time in the future. Thanks for reading! 