Run Balatro (and other Love2D games) natively on the uConsole

I had been streaming Balatro from my computer via Moonlight when I realized… it can probably run natively on my uConsole. Sure enough, there are posts on how to port the poker roguelite to ARM Linux-powered retro gaming handhelds. It will basically run on anything that can run the Love2D engine.

All you need to do is copy and unzip the Balatro.love file from your installation, add an entry for Linux somewhere along line 50 of globals.lua as follows:

if love.system.getOS() == 'Linux' then
    self.F_DISCORD = false
    self.F_SAVE_TIMER = 5
    self.F_ENGLISH_ONLY = true
    self.F_CRASH_REPORTS = false
    self.F_NO_ACHIEVEMENTS = true
end

Then rezip the files (there should be a bunch of files in the main directory of the archive, not a single folder), rename the .zip file to Balatro.love, and then run the game using love /path/to/your/file/Balatro.love

Everything works! Here it is running on my system in Wayland. The game plays, I could drag my save files over to .local/share/love/Balatro, and I’m able to unlock unlockables through play.

I mostly use the trackball and mouse buttons, but it should be possible to get the controller keys working with a little fiddling. Here’s the original thread: Reddit - Dive into anything

Edit: You’re also going to want to turn “CRT Bloom” off from the in-game menu, which will significantly improve performance by bypassing a minor visual effect that’s a bit too spicy for the CM4’s GPU.

Edit 2: If it still runs slowly, try setting your CPU governor to performance.

7 Likes

I have steam version,How can I get Balatro.love?

Steam > Manage > Browse Local Files

1 Like

Hello, I managed to get Balatro working with all the gamepad buttons:

To get the ABXY SELECT START buttons working, add this to your ~/.profile

export SDL_GAMECONTROLLERCONFIG="030000fdaf1e00002400000010010000785536,ClockworkPI uConsole,platform:Linux,a:b1,b:b2,x:b0,y:b3,back:b8,start:b9,"

To get the directional arrows working, you need to install jgeumlek/MoltenGamepad (you need to compile it from source, sorry I can’t post the link because the forums is saying I have too many links) and setup the following files:

~/.config/moltengamepad/gendevices/kb.cfg 
["ClockworkPI uConsole Keyboard"]
name = "kb"
devname = "kb"
exclusive = "false"
device_type = "gamepad"

key_up = "up"
key_down = "down"
key_left = "left"
key_right = "right"
~/.config/moltengamepad/profiles/uconsole.cfg
[kb]
kb.right = leftright+
kb.left = leftright-
kb.down = updown-
kb.up = updown+

If you don’t want moltengamepad to require sudo you will need to do the udev instructions on the docs. Sorry I can’t post the link because my account is brand new and this is the third link in this post.

I created a executable bash script to help me launch both moltengamepad and Balatro together:

/usr/local/bin/balatro:
#!/bin/bash

moltengamepad --stay-alive &

MGP=$!

love /usr/local/share/balatro/Balatro.love

kill $MGP

You can then create balatro.desktop files with icons and stuff for your DE but I’m using a DE with no menu or desktop shortcuts so I did not bother.

Personally, I found the performance not so good even after removing bloom effects and overclocking the CPU and GPU.

Hope this post helps someone.

Did you set the CPU governor to performance? I’m running it without overclock and the performance (without bloom) is perfect.

Thanks for the tip, it is indeed smoother with the performance governor