#Balatro the electronic board game

1 messages · Page 1 of 1 (latest)

zenith anchor
#

Using this to document and discuss my project. My goal is to make a relatively cheap version of balatro as a physical game.

#

Here is some of the progress I have made.

#

The game uses ntag215 nfc stickers to read and write to cards.

fading ridge
#

fire

zenith anchor
#

I will be posting updates and everything on this as things go on. And feel free to ping me and ask questions. It only helps with the process

#

NFC tag playing card architecture

frigid river
#

Keen to see how this progresses

frigid river
zenith anchor
#

It’s like trying to talk to 3 different people named Dave. You have to start calling them by their last names

#

Or else all three will thing you are talking to them

frigid river
#

You mentioned a moving dolly here #💻・modding-dev message, have you got that assembly to a functional point already? I've found a lot of frustration trying to do fine motor control on STM boards, is the ESP32 friendly with that sort of thing?

zenith anchor
#

That part is actually over built rn

#

I need to find a cheaper stepper motor for the project.

#

The one I am using was ripped out of an old 3d printer

frigid river
#

I was going to say "no such thing as over built", but yes perhaps using a 2A motor to move a plastic tray is somewhat overkill

zenith anchor
#

Yeah, i am using a hand made wooden cart rn, but I am working on a 3d printable trolly

#

3d printer will be much lighter and much faster

#

I need to refine down how many ball bearings I have to use for it though

zenith anchor
#

I have also been trying to track down a decent supplier for nfc tags from china

#

The small amount I have I had to play close to .50$ a pice for them

#

60 for 30$ is crazy

zenith anchor
#

The price I have found for nfc tags from china is .06$ a piece

#

Even Paying for 20 dollar shipping it’s still significantly cheaper

zenith anchor
#

Chinese goods secured

frigid river
#

The concept behind NFC tags is so far into the realm of technology-as-magic. It's mind-blowing that it's even possible at all, let alone possible for 5c per chip

zenith anchor
#

I got tipped well at work yesterday. So I can afford things

#

Yeah bulk pricing is great.

#

Minimum order of 1000 pieces

#

Free shipping from china too

frigid river
#

Wirelessly powering a chip with a magnetic field from a phone 20cm away, and then communicating to and from it at a speed 10x higher than my dial-up internet of 20 years ago? Wizardry and black magic

zenith anchor
#

It really is black magic tbh

#

The tags i am using can store 577 bytes of data

#

The ones I bought store 144 bytes

#

So I have to reformat my read program to adjust for it

frigid river
zenith anchor
#

I am using 7 bytes

#

So yeah

#

Massive over head

frigid river
#

So much more room for... Activities?

zenith anchor
#

No clue. I could make the whole stake markers really easily

#

Show what stakes you have won with a card

#

Not too much to do with the extra room

frigid river
#

It's not anywhere near enough to store it all as plaintext, but you won't have to worry about future additions if LocalThunk wants to add more suits / editions / seals / jokers

zenith anchor
#

I was being efficient to make read/writes fast and to keep processing as low as possible

zenith anchor
#

Plain text is not easy

#

It is just cheaper for me to use a spi based flash module to store the joker descriptions

frigid river
zenith anchor
#

If the seed does not match the machine defaults to the card’s base version

#

And then it rewrites the seed to be the correct one

#

This reduces the amount of resetting you have to do between games

frigid river
#

Ah, ok. Not identical to Balatros 8-character seed, just your own rng seed

#

You've got enough overhead that you could use 42 bits and aim for parity with Balatros rand implementation, but it's almost certainly not worth the effort

zenith anchor
#

Yeah, that would be hell to do in the C programming language

#

That’s what I am coding in

#

I might expand it to 16 bits for the seed though

#

Just because I don’t want to risk 1/256 for the game not to reset right

frigid river
#

255 different game possibilities is very small. Even 65535 might be overly limited

zenith anchor
#

I have not played with any rng yet

#

So I will have to keep messing with it

frigid river
zenith anchor
#

True, that would reduce it. I will have to see if connecting rng to a seed would be worth doing

frigid river
#

Ah, although if you use a card that hasn't been used in a few games that won't be true. Hmm

#

How about a timestamp?

#

No risk of collisions that way

zenith anchor
#

It would be unreliable as a time stamp just no easy way to do it with the cheap processor I am using

#

I think just a larger seed will work

frigid river
#

A simple counter would also do the same job. Increment by 1 for each game, overflow back to 0. Even 16 bits gives you 65000 games with 0% chance of a collision, which is more than anyone would ever play.
The nature of probability is that relying on chance will mean it would fail eventually for somebody, and it would be a very confusing problem to stumble onto

#

Say someone played 10 games, and used a different subset of the ~300 cards each time. Now you have dozens of cards with a different seed, and your chance of collisions increases with each new game

zenith anchor
#

Yeah, I could do that if I did not want to tie rn to a seed

zenith anchor
frigid river
#

I just mean for the validation bytes. You might as well store the RNG seed separately too, with so much headroom

#

Would the data be reset on every single card there player used that game? How would you do that?

zenith anchor
#

(Original card) (seed) (current card)

#

If seed does not match the seed is writen to be the new one

#

And the current card is erased and a copy of the original card is written to it

frigid river
#

But in the case of a collision where the seed of a previous game is the same as the current game, the controller won't know to reset the card state

zenith anchor
#

Yup

#

That’s why I would need a bigger seed

#

Or a double check to make sure no repeats happen

frigid river
#

And the simplest way to make sure no repeats happen is to just increase the number by 1 each game

zenith anchor
#

Another thing I have to figure out is audio.

#

I have not touched that yet

frigid river
#

bleep bloop lo-fi balatro

zenith anchor
#

Like I could do Basic mp3 stuff but those transitions between songs in the shop will be really hard

zenith anchor
#

Today's effort is going towards hand logic

zenith anchor
#

Ok I have it recognizing the groups of a kind now.

#

Including 2 pair and full house

zenith anchor
#

Taking a small break on this project to figure out some stuff with college.

#

Turns out my campus is shutting down in 2 years

#

Got to love it

#

I am a freshman with 3 years needed

#

So I need to get a plan around to speedrun college

plucky plover
#

christ what is this.

zenith anchor
plucky plover
#

you poor soul

zenith anchor
#

So we chilling

#

Finally got my screen in

#

Ignore the gaping hole in my phone

#

I was not the one to do it

plucky plover
#

how're you gonna make the jokers work? with a scanner?

zenith anchor
#

On the back of printed jokers

#

The machine does all of the math for you

plucky plover
#

that's

#

huh.

#

not to mention you could easily make custom jokers too

zenith anchor
#

I have yet to add a joker system into the scoring yet. But when I do it should just be a matter of defining a few things

#

Like scoring priority and other things

#

Telling the machine where to put the effect in the calculation

zenith anchor
#

Update, basic UI

undone geyser
#

I’ve just kinda been lurking and stalking here but this is actually such a cool project lol

#

good shit

livid sphinx
zenith anchor
livid sphinx
zenith anchor
#

I am trying to build it on a budget too. Hoping to make a video on the project and maybe work with the right people to make it a product.

livid sphinx
#

lmao

zenith anchor
#

Making the best use of my freshman year of college. Got a lot of freetime.

cloud seal
#

this looks great

zenith anchor
#

Good to see that the project is picking up traction

#

I need to work more on the ui. The little chip I am using is made by hand using draw functions. I think I can make it better by using bitmaps

#

Get it closer to the in game sprites.

#

The sprite has perspective.

#

I can't do warped circles with the lib I am doing so bitmaps might be my only option

#

I would love to figure out the shifting green effect for the backround color aswell

#

one set le me send a photo of the updated ui color scheme

livid sphinx
zenith anchor
#

Yeah maxc0rd be wild

livid sphinx
#

truly

zenith anchor
#

3 years of my life I will never get back spent on maxc0rd

#

Upside, I was able to convince a mod to create a yugioh thread that survived the great thread purge

#

Here is a little something I have been working on

#

A super basic prototype for the moving nfc read/write modules

#

Gives you the ability to play any amount of jokers without needing more then 2 nfc readers

livid sphinx
#

oooh

#

this is how I can tellyour budget was small

zenith anchor
mint berry
#

real

zenith anchor
#

Here is a break down of the project so far:
(1): Displays Mult and chips while scoring
(2): Buttons for Play, Discard, Inspect and Skip.
(3): Main display, Give general info about everything from the shop to what every card does.
(4): Displays the Ante
(5): Displays money
(6): LEDs are lit for how many discards are left.
(7): LEDs are lit for how many hands are left.
(8): NFC reader/writer that is on a moving part underneath the play area. reads all cards in the Joker card row.
(9): NFC reader/writer that reads played playing cards in the Playing card row.
(10): Displays scoring information, like joker activations, how much a card is worth scoring wise and many others. The LEDs display if the effect is a Mult, Chip or Money related effect.
(11): NFC reader near deck, reads cards drawn to allow for the existance of in hand card effects.

#

Hopefully this puts the project in a bit of a clearer scope

#

(Wish I could pin the message but no perms)

#

I haven’t even messed with audio yet

zenith anchor
wanton ice
#

Wh

#

Whoa

#

Well this is craaaazy

zenith anchor
# wanton ice Well this is *craaaazy*

I do a little something something. Hoping to reach out to thunk once I have a fully functioning prototype to see if he would be interested in making it an actual product.

zenith anchor
#

Working on some proof boards

zenith anchor
#

I also sat down to work through the logistics of audio output

#

I need to sit down and watch a video on the i2s protocol used by the board I am working with

#

I also have a hell of a lot of optimization to do with the code as well

#

I also kinda want to rewrite what I have to use freertos. Because multithreading

#

I needed more memory… so I figured something out

#

I feel like I committed a crime

nova marsh
zenith anchor
#

Less cursed adapter has been made

wanton ice
zenith anchor
#

Yippie

zenith anchor
#

Got parts for audio coming in the mail soon.

#

Without audio it will just sound like a 3d printer

cloud seal
#

nice

mint berry
#

does this constitute as modding balatro on a different platform 😡😡😡😡

#

not on my watch

#

smh can't people just play the real game fr

#

-# (this project is so cool i wanted to do hardware stuff but I'm too stupid)

exotic siren
#

ahh is this the budget option for people who cant afford the basse games

#

makes sense

zenith anchor
#

The screen I am using is pricy

#

close to 30$ a piece

#

I would like to find one closer to 10$ or less per unit

zenith anchor
#

I just don't know enough about the proticol used for driving lcds yet

zenith anchor
#

I cna make a write-up of the costs when I make a video about it

#

But I can easly say that I have spent around 150$ on parts already

#

Because I needed nfc tags

#

and you could only buy them in bulk

#

so 60$ of my budget went to 1000 nfc tags

zenith anchor
#

It’s 2:30 Am but I woke up from a dream and had a revelation on how to reduce the part count of this board

#

I can use 2 74n595s if I use a form if software multiplexing.

#

By using the first shift register to select what I am displaying and the 2nd to output the information needed for each part I can cut a 5 shift registers out of the board

#

This will make wiring much easier and will make the end product cheaper

#

I am writing this down so I don’t forget

#

At .75$ a piece that reduces my price by 4.50$ just by implementing that

#

I also think I figured out software i2c multiplexing but it that needs to be tested

#

If that works I might be able to reduce the price further by 1.25$

#

I will keep cooking more price reductions and simplifications for the project

zenith anchor
#

1000 nfc stickers have arrived

undone geyser
#

holy shit lol

#

also out of curiosity, how are you going to deal with enhancements, editions, and seals?

#

mainly in terms of converting/recognizing playing cards as being non-standard, and making that clear to the player

zenith anchor
#

There is also a clear layer to write on with a dry erase marker for rank and suit changes

#

Internally I have a system for everything in my nfc tag bit architecture

zenith anchor
undone geyser
#

and yea I figured the game would keep track of it itself

zenith anchor
#

Yeah, trying to get the player to keep track of them is the hard part

#

My original idea was using e-ink displays for the cards but that was too pricy and the displays are very slow to refresh

zenith anchor
#

BIG UPDATE

#

I just got access to a pick and place machine along with everything else to do custom pcb work.

zenith anchor
#

ok did some work

#

set up the multiplexing circuit but also included a microprocessor that I can use to take over the entire process of multiplexing everything

#

This was built with what I have but I could easly use a much cheaper one

#

or even better, just cut out the shift registers

#

I am in a weird trigangle here. Price, size and processing power.

#

If i want a low price and a low size then it takes a lot fo processing power

#

If I have a small size and lower processing power it is going to be more expensive.

undone geyser
#

I would say to prioritize cost without sacrificing gameplay if possible, since you want to try and turn this into a real product

zenith anchor
#

I won’t be able to make much progress on this for the next few days due to being out of town.

#

Also I can feel a new hyper fixation on 4th dimension physics and special relativity coming on

#

So i am going to try to get that out of my system before getting back to the project

warm pier
#

real

tall dirge
#

4th dimensional balatro

zenith anchor
nova marsh
zenith anchor
#

Alrighty, done with my trip and ready to get back to work on this

#

I think next up on my chopping block is the scoring system or game rng

zenith anchor
#

I think I am going to lay out the scoring process and work on that.

zenith anchor
#

Wrote out the main gameplay loop

zenith anchor
#

Here is a more in depth view of the scoring system

zenith anchor
#

OK so I have been working on a few things

#

I have been laying out a custom pcb for the project.
And I have been working on a 3d printable shell for it all to be in

#

I do need a tiny bit of feedback.

#

I am thinking of making the playing surface have a green felt layer over it.

#

Almost like an old card table

#

Something like this for the playing surface.

undone geyser
#

that would be fun

#

I would at least try it and see how it comes out in terms of price and practicality

#

because it would add a lot to the aesthetic imo

zenith anchor
#

I want to print it in red, I feel like the green would be a good accent

#

All of the physical lettering will be in white plastic

#

I don’t exactly know how to mix blue into the theming

zenith anchor
#

Working in the shell

zenith anchor
zenith anchor
#

Put in a few more hours

#

Total hight 2.5 inches.

#

Then it’s 11.5 by 20

#

Inches

tall dirge
#

I'm obsessed. That looks awesome

zenith anchor
#

Check this out

undone geyser
#

holy

#

I figure that bit in the middle is the card reader?

zenith anchor
#

That little thing has a little screen that tells you what is happening

#

Like +mult

#

Or chip+30

#

Then There are 3 leds on there to show how what kind of thing is being added

#

Red, Blue and yellow

undone geyser
#

ohhh, okay

zenith anchor
#

It will also have a little arrow that points up and down to tell you which joker\card is doing the thing

undone geyser
#

got it

#

and the jokers go on the raised part with the playing cards below I assume

zenith anchor
#

Yup

exotic siren
#

how will stuff like death and things that change the cards be implemented?

undone geyser
#

believe he mentioned before that the game can detect changes in cards with the NFC tags, and visually there’s gonna be clear card sleeves and a marker you can use to draw on the cards to tell if they’re different