Readit News logoReadit News
city41 commented on Balatro for the Nintendo E-Reader   mattgreer.dev/blog/balatr... · Posted by u/arantius
LoganDark · 2 months ago
> re: numbers, you could store them as integers, but just encoded as 10 times their value. So 1.5 becomes 15.

I find it really weird that they dismissed fixed point as being too technical because it's actually really simple, it's basically just this.

city41 · 2 months ago
I dismissed it as too technical for that blog post. I expected this post to be read by a wide variety of people, so I tried to keep technical stuff to a minimum. I did say it's simple and that it's what I'd probably use if I kept going with the project.
city41 commented on Balatro for the Nintendo E-Reader   mattgreer.dev/blog/balatr... · Posted by u/arantius
Waterluvian · 2 months ago
I’m not sure 32 vs. 64 bit even matters for scoring. Doesn’t balatro go well above the uint64 max, meaning it’s surely using some Numeric abstraction type?
city41 · 2 months ago
It is written in Lua and the source code is available (just extract it from the PC version). It's using Lua's number type for all numbers, which is a double precision float.
city41 commented on Balatro for the Nintendo E-Reader   mattgreer.dev/blog/balatr... · Posted by u/arantius
duneisagoodbook · 2 months ago
Absolutely! I think that's what the author meant when he said "In my prototype, your hand at the bottom of the screen is a background (similarly, in my E-Reader solitaire game, all of the cards are drawn into a background instead of using sprites)."
city41 · 2 months ago
Thanks for the clarification (I'm the blog author). If one were to really make this game, how the cards would ultimately be rendered is hard to say. Sprites are nice because you can overlay them and form many card variations from just a few sprites. Tiles rendering into a background doesn't account for transparent pixels, so building up tiles into a single background is not possible.

One way to handle that is to provide all the possible tile variations, but that would take up so much space. So you'd have a set of tiles for a regular Ace of Spades, and an entirely different group of tiles for a Lucky Ace of Spades for example.

The GBA has 4 backgrounds, so it would be doable to grab three of them and use them to render cards. That would only leave 1 background left for, well, the background :)

Another option would be to use a memory buffer and implement tile rendering yourself that accounts for transparent pixels. That would be the best of backgrounds and sprites combined into one. That would solve many problems, at the cost of the implementation would probably take up a lot of space. My hunch is this would be the best approach.

This right here might be why I find this platform so interesting. It's very limited, and the limitations usually bump into each other and you often steel from Peter to pay Paul.

Oh and the post didn't mention debuffed cards (they have a red X drawn over them). That'd be yet another card layer to throw into this mix.

city41 commented on Neo Geo Dev: Fixed Point Numbers   mattgreer.dev/blog/neo-ge... · Posted by u/thunderbong
wk_end · a year ago
Not sure what you mean - sure you can.

Trying to read between the lines here, if your objection is to half-pixels because they’re not precise enough for (good) physics, then I apologize for being unclear - I mean half-pixels, or quarter-pixels, or eighth-pixels, or whatever.

Another way of wording my comment is that I think it’s easier - especially for beginners - to think in terms of smaller units (represented as integers) than in terms of a new number format for representing fixed-size fractional parts of larger units. But the two concepts are ultimately the same.

city41 · a year ago
But that's basically what fixed point is, no? Half pixels is fixed point with a single bit for decimals. Quarter pixels is two bits, and so on. I think the disadvantage is you now have to think in a strange unit that isn't intuitive. For my game I tend to think in screen sizes for things. Thinking in screen size*factor would be harder I think. Fixed point is basically just doing that for me and hiding the details really.

To be fair, rereading the post I realize I did make it sound like you would only need this for positioning sprites. I'll see about rewording it.

Or maybe we're both talking about the same thing and you're taking a different approach. That is fair too.

city41 commented on Neo Geo Dev: Fixed Point Numbers   mattgreer.dev/blog/neo-ge... · Posted by u/thunderbong
wk_end · a year ago
I always felt when learning about this stuff that people - pedagogically - make fixed point seem more complicated than it is.

Since this article is talking about more precisely positioning sprites in a 2D world, it could practically be a one-liner: "instead of tracking positions/velocities in pixels, track them in half pixels". Everything falls out of that intuition.

city41 · a year ago
I'm the author of the blog post. I just used sprite positioning as a simple example. Things like collision detection and physics can't be done with half pixels.
city41 commented on Marilyn vos Savant and the Monty Hall Problem (2015)   priceonomics.com/the-time... · Posted by u/hecubus
default-kramer · 2 years ago
I disagree. If Monty always reveals a goat, there is no tension. You know exactly what is going to happen. Maybe it could be used a way to pad the running time of the show, but it would not add tension. "Coming up next: Monty reveals what's behind one of the other doors!" seems like something a game show would do. Whereas "Coming up next: Monty reveals a goat!" does not.
city41 · 2 years ago
Yeah, you make a good point. I can sort of see it both ways, I think it would depend on how the show handled it. Leaving it across a commercial break then yeah it probably does make more sense the door is random.
city41 commented on Marilyn vos Savant and the Monty Hall Problem (2015)   priceonomics.com/the-time... · Posted by u/hecubus
tialaramex · 2 years ago
Also regardless of whether she's a woman or she's known for intelligence, a response in which you say "You're wrong" needs an extra second's thought to consider whether, in fact, they are wrong, or maybe just their understanding is different from yours and you need to reconsider with their context.

Some time back in an HN thread about programming languages I read a response in a thread about inference which said that a particular feature doesn't really save on typing. And it seemed ludicrous. Until I realised the author of the comment has seen the word "typing" (which everybody else in the thread is reading as "The thing you do with a keyboard") and they're interpreting it as "The thing the compiler does". And yeah, with that perspective of course inference isn't saving typing, all your variables still have types, we were just happy because we spent less time operating the keyboard to write a program. Their comment was not wrong and we weren't correcting them, we'd just understood things differently!

Edited to add, link: https://news.ycombinator.com/item?id=36593110

city41 · 2 years ago
I almost never say "you're wrong", no matter how confident I am. Because I can be, and often am, wrong myself. If there is a disagreement, a miscommunication, etc, why not instead work with the person to find where you two differ and look for common ground? If the other person really is wrong, it's almost always naturally revealed that way.
city41 commented on Marilyn vos Savant and the Monty Hall Problem (2015)   priceonomics.com/the-time... · Posted by u/hecubus
JackFr · 2 years ago
> 50% of the time, monty opens another door and it has a car and you win immediately

Why would you think you won? You didn't choose that one with the car and you aren't offered the opportunity to switch to the open one, only the closed one. The only interpretation which makes sense is that he always shows you a goat.

city41 · 2 years ago
Not to mention Monty always showing a goat is what adds the tension and interest a game show needs.
city41 commented on Show HN: AboutIdeasNow – search /about, /ideas, /now pages of 7k+ personal sites   aboutideasnow.com/... · Posted by u/louisbarclay
phgn · 2 years ago
The vast majority of indexed websites don't have a date unfortunately :(

What's your website so I can take a look at the parsing?

city41 · 2 years ago
https://mattgreer.dev/now

It says last updated today because I really did update it today :)

anyway, cool project!

city41 commented on Show HN: AboutIdeasNow – search /about, /ideas, /now pages of 7k+ personal sites   aboutideasnow.com/... · Posted by u/louisbarclay
phgn · 2 years ago
I tried using https://www.npmjs.com/package/metascraper before which I believe does check this meta tag.

But a few websites set their updated date to the current date which was annoying, maybe to rank better in Google? And some people (including me) only mention the update time in the page text content.

I've used GPT to parse human formatted dates in another project too, it's quite reliable if you validate the output timestamp. And relatively cheap too if you only pass in the first part of the page text.

city41 · 2 years ago
I can see how it's a tricky problem. I wish html had more structure here (and people followed the structure, a whole other problem...). FWIW, my page has a "last updated" date on its now page but comes up as 1969 in aboutideasnow.

Oh, now aboutideasnow shows no date at all.

u/city41

KarmaCake day10114November 14, 2009
About
Software developer in the Ann Arbor, MI area. Professionally I have mostly done JavaScript and TypeScript. Personally I'm interested in old video game systems, reverse engineering, and coding them in C and assembly.

matt.e.greer@gmail.com

https://mattgreer.dev

https://github.com/city41

https://bsky.app/profile/mattgreer.dev

View Original