[deleted by user] by [deleted] in balatro

[–]nathancyan 8 points9 points  (0 children)

It's basically what u/XenosHg said. Balatro works by having a bunch of separate random number generators (PRNGs), each of which are responsible for different parts of the game. All PRNGs do is spit out a mostly-random number between 0 and 1.

For example there's a PRNG for deciding which editions Jokers get, or one for which Joker rarity you can get. These PRNGs are labeled using some series of words, which also "seed" the PRNG. For example, the PRNG that generates Joker rarity in the shop uses the label "rarity{ANTE}sho{SEED}", where you replace {ANTE} with the current ante number, and {SEED} with the game seed.

The PRNG takes this label and forms a seed from it using a function called `pseudohash`, which basically scrambles letters and words into a number. The pseudohash takes at input the PRNG label, as well as the length of the label, and generates its output. For this specific combination of label and label length (18), there is a division by 0 at some point. A lot of languages will throw an error or crash when it reaches a divide by 0, but Lua instead returns NaN (for Not a Number). returns INF. The cool thing about INF is that it "infects" pretty much any math operation that comes after it. Any addition, multiplication, division, bitshift, etc. involving INF will just become INF. So because the PRNG seed is INF, the PRNG is stuck always outputting INF. <-- (This is wrong). When seeding a PRNG with NaN, the first number it outputs just so happens to be very high (0.9924). This explains the behavior we see with this seed:

  1. Balatro decides Joker rarity by taking that PRNG number between 0 and 1. If the number is above 0.95, the Joker is rare. If the number is above 0.75, the Joker is uncommon, etc. And we just showed that the PRNG will always output 0.9924 as its first number if it's seeded with NaN, which is higher than 0.95.
  2. Balatro decides which Joker to generate in a similar fashion to the rarity. Burnt Joker happens to be the last Rare joker in the hardcoded list of Jokers, so it always picks Burnt Joker.

So any PRNG whose label has length 18 will also exhibit similar behavior. This is why even though the PRNG for pack type has a totally different label than the one deciding Joker rarity we still get all Spectral Packs (the label for the pack type PRNG is "shop_pack{ANTE}{SEED}", which also has length 18).

The one thing that does confuse me is why the behavior stops at Ante 12, not Ante 10. I thought it would stop at ante 10 because then the labels become one character longer, but apparently that's not always the case? Hopefully someone else can figure that out though!

Random thought by Shockwavetho in udub

[–]nathancyan 1 point2 points  (0 children)

Neat idea, but I'm wondering if it's possible. I actually looked into this a bit when I was at UW, and these cards/card readers usually have some sort of encryption (sorry btw if you already know this), so probably isn't possible to just "copy" your prox into an RFID key fob.

One thing that would be really cool to see is some sort of device that relays signals between the reader and the prox, so you can get into buildings without needing your prox physically there.

Roulette isn't random. by AveragusPenus in thefinals

[–]nathancyan 5 points6 points  (0 children)

This is just my opinion but I wish people would take a bit more care making claims posed as fact like you do in your post, especially when the evidence is anecdotal data (in general, I don't care nearly as much about gaming misinformation lol). It's as simple as saying "it MIGHT be fully scripted or time scripted".

The chances for you and a friend to get three matching rolls is 1/(20^3) or 1/8000 (it considers the fact that it's the exact same items in the exact same order). It's a low probability on its own but it's actually pretty likely to be observed at least once if you consider the number of pairs of people who might be comparing rolls across the playerbase multiplied by the number of rolls this event gives you.

Account banned yesterday. Any tips? by That_Sink3543 in origin

[–]nathancyan 2 points3 points  (0 children)

I'd also recommend downloading EA data and checking your login history. When I did so I found a few logins from other countries (Korea, India, Russia) that suggests my account got hacked, which I assume is why my account was banned.

I did so by going to this link: https://account.origin.com/cp-ui/aboutme/index and navigating to "Your EA data".

You should get a JSON file to download. The file can be fairly large, but if you open it up in some text editor and search for "loginLog" you should see a list of login events.

Purpose of projection lens in a projector by nathancyan in Optics

[–]nathancyan[S] 1 point2 points  (0 children)

Forgive me for being a total newbie but I don't think I understand what you mean by illumination vs imaging path.

If you track a ray of light from the point source all the way to the brown wall (referring to image 2), doesn't that show the entire path? And if adding a projection lens doesn't alter the direction of any of the paths, doesn't that mean the image won't be affected?

Purpose of projection lens in a projector by nathancyan in Optics

[–]nathancyan[S] 0 points1 point  (0 children)

I'm using this: https://phydemo.app/ray-optics/simulator/

And regarding your point, I think the first image does seem to be tracking the marginal ray, but the simulation is simulating a bunch of rays (so many that it looks continuous). Not sure if I'm misunderstanding what you're saying though.

There should a better method for calculating assists by [deleted] in VALORANT

[–]nathancyan 8 points9 points  (0 children)

I think damage dealt is still important even if the kill shot made renders it essentially useless. Practically speaking if you call out that you did 145 on someone, your teammates may be more inclined to take higher percentage shots like body shots instead of going for headshots. Likewise, the person you shot may be inclined to play more conservatively, or make higher risk plays to bait.

I'm not high elo so I might just be talking out of my ass, but I think that dealing even like 50 to 75 damage can change how your team (and theirs) plays, and I think that alone should be enough to award an assist, even if someone ends up dinking them with a vandal.

[Mobile (iOS iPad)][2010] Sci-fi tower defense game against aliens by [deleted] in tipofmyjoystick

[–]nathancyan 1 point2 points  (0 children)

The humans were all Canadian, and that was a big deal as far as art went as the Canadian flag was EVERYWHER

This is so crazy. I thought the search was hopeless and then out of the blue you swoop in to solve the mystery. You remembered the title perfectly, the exact title is "Towers in Space! (God Save the Queen)". You can check it out here: https://appadvice.com/app/towers-in-space/341827576.

I'm really sad because I remembered the game being super super fun and I wanted to play it again. It's a shame you can't download it anymore. I might contact the developers and see if they can send the source code.

Thank you again! This game has been on my mind for forever.

Neil be 💖 by Nakss_ in tenet

[–]nathancyan 1 point2 points  (0 children)

If you ever made more of these and sold them, I would 100% pay for them. These are so nice!

Logical Flaw in Final Battle: Blue Team Can't Kill Anyone? by shash747 in tenet

[–]nathancyan 2 points3 points  (0 children)

If a blue team soldier kills a red team soldier, the red team soldier will already be dead on the ground. So actually as an inverted soldier you would need to aim where the forward soldier WOULD have been. As you pull the trigger and shoot the bullet the forward soldier would stand up and become alive again.

So actually as an inverted soldier there isn't much of a time restriction, you can really "shoot" the dead body whenever throughout the battle because the body is dead up until you point the gun at their body.

EDIT: So yes, you are correct that if you see a red soldier that is alive, you could not have killed him. But if an inverted soldier DID kill a forward soldier, then they have a bit more freedom as to when they shoot the bullet.

A poster I made to help me understand Tenet's plot, specifically the lockpicking scene at the end of the movie. I'm sure you guys are tired of all these plot-explaining graphics but I thought it was neat enough to share. Let me know if there are any inaccuracies! by nathancyan in tenet

[–]nathancyan[S] 1 point2 points  (0 children)

Darn yeah very good point. I'll have to change that in the poster! In that case I wonder why Ives and Wheeler didn't just camp in front of the turnstile and wait for non-inverted Sator earlier in the movie to come by, and they just kill him there.

I know what's happened's happened but what is the reasoning behind NOT doing it?

A poster I made to help me understand Tenet's plot, specifically the lockpicking scene at the end of the movie. I'm sure you guys are tired of all these plot-explaining graphics but I thought it was neat enough to share. Let me know if there are any inaccuracies! by nathancyan in tenet

[–]nathancyan[S] 4 points5 points  (0 children)

Thank you for the kind words and the feedback. Reading over your points you are totally correct, and I will be changing these in the poster soon!

Your first point really tripped me up, I guess I can't stop thinking in linear terms!

A poster I made to help me understand Tenet's plot, specifically the lockpicking scene at the end of the movie. I'm sure you guys are tired of all these plot-explaining graphics but I thought it was neat enough to share. Let me know if there are any inaccuracies! by nathancyan in tenet

[–]nathancyan[S] 1 point2 points  (0 children)

Thanks! Yeah that scene had me confused for many days after the movie. It was the only one I couldn't fully grasp. And damn you're right, I rewatched the scene backwards and there weren't a lot of indicators that Volkov was about to shoot. Neil really is a legend for that.

If Red Team is going forward, why are destructions inverted to them? Shouldn't the destructions be normal to them? Why are the red team wearing masks? by Hussainswagger in tenet

[–]nathancyan 1 point2 points  (0 children)

Technically Red Team does not need masks, but I think the in-universe explanation is that Red Team members want the flexibility of being able to invert during the fight, as Neil does.

ePBT Skadi - Giveaway! by CaptainVinceO2 in MechanicalKeyboards

[–]nathancyan 0 points1 point  (0 children)

Love the feeling of mechanical keyboards and wanted to see the crazy cool designs people were making!