Git Product home page Git Product logo

balatrolator's Introduction

Hey! I’m Philipp and I’m a front-end developer and open source contributor living in Hamburg, Germany.

Go to to my website!

balatrolator's People

Contributors

kleinfreund avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

balatrolator's Issues

Shorter state URLs

Right now, the state URLs are very long; for example:
https://balatrolator.com/?state=N4IgFghgdgJgziAXARgDQhgSzgYwgJ3iQAZ0BbAeygFMBPE9AIwBtNYlQoIzqkQBlMhGbMABACFW7dNgCCOAC6YAbr0QL8AV2oBfdDGo4A1nwBK1GKIAihk%2BkiwAMtVXMEiUADFmmuGFGeKmqgzC7UzEhoIAAOzBC07sR6IN6%2B-gASFL7BIKGukeix8YnJgaqiFABmohCiANJsMBy5YREohXEJJMn8GhCYAOZgCgE%2Bfs154QUxnSXonln4FdW1DeweLfntM8Xd85oiopnZE63TRV2ISfNjYKdbACwdu1c9fYPD91PbF3MgACpgfDUajLGr1RpfNpRX57AEAdwoogACv18FDzrM4ajMOiNpNoc9LtcQOkPqIAMIEJr4s4-LGvZIAKwoRmo%2BHcAG1ONw1AIKMYarAJL4jGwQOgLJglFQ%2BIwIHBeB1fBSwJhoollXAALIHJSxTDshggJQ8HV69WsI3bfDQEyIEDyJUgOCaaV8Ck%2BRgIGRweRKVRIDTaPQ8nh8KyiiUgKUyqByhXO2IqtUa43J83MfVWvGkE2YM26rOWw14qK2qD2x04Z2u90Oz2ab3RuSKIJBrS6VBhvmOXwKWiiABSrKNkqwcYTiujGdV6s1M18RezpeNpuomZX1vLdr4TujdYUHq9PpArYDamDXZ7fEk2mi%2BDYR-H0swsod8unWrnaauWuXJbWnm66boBZYAEwAHTgQArOgFZVvu6CHseTanue7bqJ2oYgFw4YOpIFAUPAChUM6sZvvGH6JjOYw-guGYAQaQHoCBTE5tMCF7jWB5ukeDYni2fptoGWEhgAuugLJsvg-DMBQCjuAAbESFhUoQXKgFxDprAMvH1qS1AEIp0YUe%2BICfuRUAODWPBQPxuFkQeRltI5NBCTYjCaJUlQWEglTCIqOHaSAun6Q56RGfgJkvpO1FfjG1nQLZ1D2XwUBOchLnpZlZ5wJ53m%2BTSAVuNeIAhUOEDGOFfCRcZp5mVRFk0ZKSVQClaUOhl7lZcIOU9XlBU%2BX5iAlUF3blbuDpIS6fG1VFMUxhOlFTlZNnUHZDndbW2Vdbl2BDUV-mBWVIVKTVDp1dFDXLeZlmmW1HVbblip9XtA0HdQXnDcVJ06JJ4DhDA6lEIgnLiToQA

I know you're tracking a few more things than I am, but the same hand in my calculator has a URL state-string that's less than 3% of the length of yours:
https://efhiii.github.io/balatro-calculator/?hand=oACMOJQACOMAECgAKaA0BIAwBA

There are a few things that made it possible for me to make the state-string so short:

  • default states:

    • If a particular feature isn't used, it can be represented using only 1 bit to signify that it's in the default state; for example:
      • hand level (default each to 1)
      • joker state (default to the state it's at when bought)
  • minimal bit-lengths for values; for example:

    • edition: 1 bit to signify if it's standard, if non-standard, 2 bits for which edition (my 4 states don't include negative but does include disabled)
    • enhancement: 3 bits for which enhancement and 1 bit for if it has a Red (Double) Tag (other tags are not bothered with)
    • joker type: 8 bits
    • number for suit: 2 bits
    • number for card type (2 - ace): 4 bits
    • most numbers are stored as either 16 bit unsigned int or 16 bit signed int
      • number of cards is a 16 bit unsigned int
      • number of jokers is a 16 bit unsigned int
      • hand levels are 16 bit unsigned ints
      • joker states are 16 bit signed ints
  • assumed 0s

    • the representation of all default values is via 0s and the last step in my URL building function is to remove trailing zeros, then during URL interpreting, I assume any bits past what was provided in the URL is a zero.
    • Ordering less-used features (like number of planets in the consumable area for Observatory) at the end so that they usually are free because of assumed 0s

    Even if you don't want to rely on using small numbers like 16 bit ints, you can use small ints where possible and have a higher bit-length fallback, but for all the things I used 16 bit ints for, I don't think it's practical for the integer limit to be reached.

Save state management: save and load played hands

Description

Add a basic save state management system so users can save and load played hands.

Motivation

While a user can technically keep track of multiple played hands already by keeping track of the various share URLs of their played hands, it'd be much nicer to allow users to save the state by name in the their browser (i.e. local storage). They could load their saved states and thus flip and back and forth between various hands to try out which hand performs better.

This should probably be limited to ~10 entries or something like that. There are probably also storage limitations by browsers that I need to consider here.

Handle probabilities (i.e. 1 in N chance effects)

Description

Handle the various probabilistic effects of things like the "Bloodstone" joker, lucky enhanced cards, etc. Currently, they're not taken into account at all.

Motivation

Some way to handle probabilities is definitely needed. Now I don't want to just roll the dice and have scores change based on whether, for example, a lucky card was triggered. I don't really have good ideas for this so far.

Some rough sketches:

  • Show a worst case and best case score (this would be a decent "best effort" as probabilistic effects in Balatro are usually binary: they apply or they don't)
  • Allow user to choose the result of the "dice rolls" (either on a global level (simpler) or per effect (more complicated))

Jokers:

Note that a lot of probabilistic jokers don't affect joker (e.g. Gros Michel)

  • Bloodstone
  • Oops! All 6s (meta)
  • Misprint (random value instead of a binary dice roll)

Modifiers:

  • Lucky enhancement

Handle all jokers

Description

Support all jokers that aren't currently taken into account or working correctly.

To do

  • Misprint (see #2)
  • Bloodstone (see #2)
  • Oops! All 6s (see #2)

Done

Copy jokers:

  • Blueprint
  • Brainstorm

Re-trigger jokers:

  • Mime
  • Dusk
  • Hack
  • Seltzer
  • Sock and Buskin
  • Hanging Chad

Non-scoring jokers:

  • Credit Card
  • Marble Joker
  • 8 Ball
  • Chaos the Clown
  • Delayed Gratification
  • Business Card
  • Space Joker
  • Egg
  • Burglar
  • DNA
  • Sixth Sense
  • Faceless Joker
  • Superposition
  • To Do List
  • Séance
  • Riff-Raff
  • Vagabond
  • Cloud 9
  • Rocket
  • Midas Mask
  • Luchador
  • Gift Card
  • Turtle Bean
  • Reserved Parking
  • Mail-in Rebate
  • To the Moon
  • Hallucination
  • Juggler
  • Drunkard
  • Golden Joker
  • Diet Cola
  • Trading Card
  • Golden Ticket
  • Mr. Bones
  • Troubador
  • Smeared Joker (I think this is implemented correctly. From the description, it only makes the cards count as the same suit which would influence played hand logic but not anything else)
  • Rough Gem
  • Showman
  • Merry Andy
  • Matador
  • Satellite
  • Cartomancer
  • Astronomer
  • Burnt Joker

Rest:

  • Joker
  • Greedy Joker
  • Lusty Joker
  • Wrathful Joker
  • Gluttonous Joker
  • Jolly Joker
  • Zany Joker
  • Mad Joker
  • Crazy Joker
  • Droll Joker
  • Sly Joker
  • Wily Joker
  • Clever Joker
  • Devious Joker
  • Crafty Joker
  • Half Joker
  • Joker Stencil
  • Four Fingers (is taken into account for played hand logic)
  • Ceremonial Dagger
  • Banner
  • Mystic Summit
  • Loyalty Card
  • Raised Fist
  • Fibonacci
  • Steel Joker
  • Scary Face
  • Abstract Joker
  • Pareidolia (handled via isFaceCard utility; anything this is missing?)
  • Gros Michel
  • Even Steven
  • Odd Todd
  • Scholar
  • Supernova
  • Ride the Bus
  • Blackboard
  • Runner
  • Ice Cream
  • Splash
  • Blue Joker
  • Constellation
  • Hiker
  • Green Joker
  • Cavendish
  • Card Sharp
  • Red Card
  • Madness
  • Square Joker
  • Vampire
  • Shortcut (is taken into account for played hand logic)
  • Hologram
  • Baron (scores on held cards)
  • Obelisk
  • Photograph
  • Erosion
  • Fortune Teller
  • Stone Joker
  • Lucky Cat
  • Baseball Card
  • Bull
  • Flash Card
  • Popcorn
  • Spare Trousers
  • Ancient Joker
  • Ramen
  • Walkie Talkie
  • Castle
  • Smiley Face
  • Campfire
  • Acrobat
  • Swashbuckler
  • Certificate
  • Throwback
  • Arrowhead
  • Onyx Agate
  • Glass Joker
  • Flowerpot
  • Wee Joker
  • The Idol
  • Seeing Double
  • Hit the Road
  • The Duo
  • The Trio
  • The Family
  • The Order
  • The Tribe
  • Stuntman
  • Invisible Joker
  • Shoot the Moon (scores on held cards)
  • Driver's license
  • Bootstraps
  • Canio
  • Triboulet
  • Yorick
  • Chicot (see #3)
  • Perkeo

Handle Observatory

Description

Handle Observatory. I probably don't need to handle vouchers in general because they generally don't have score-influencing effects.

Handle blinds

Description

Handle blinds (e.g. cards being debuffed, etc.). Take Chicot into account.

  • The Club (Clubs debuffed)
  • The Goad (Spades debuffed)
  • The Head (Hearts debuffed)
  • The Window (Diamonds debuffed)
  • The Plant (Face cards debuffed)
  • The Pillar (Previous-to-Ante played cards debuffed): This one is tricky. The simplest way to implement this is probably to add a "Debuffed?" checkbox to all cards that's only shown if this blind is selected.
  • Verdant Leaf (All cards debuffed until joker sold): Users can remove the joker they would sell to simulate disabling the boss blind effect; however, to handle scoring while Verdant Leaf's effect is still active, I need a notion of "Blind effect is active".

Handle decks

Description

Handle decks (e.g. decks with different scoring mechanisms)

There's a good chance I don't need to do anything here as I'm already handling Plasma Deck and its balancing effect. All other decks have features either completely unrelated to scoring or that users can already change from the UI (e.g. a different number of joker slots for the Black Deck)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.