News for hackers. Stuff that matters.

city41

Re:Balatro for the Nintendo E-Reader on Monday June 23, 2025 @08:59AM (#44355367)
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.
Re:Balatro for the Nintendo E-Reader on Sunday June 22, 2025 @11:45AM (#44347833)
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.
Re:Balatro for the Nintendo E-Reader on Sunday June 22, 2025 @08:48AM (#44346486)
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.

Re:Neo Geo Dev: Fixed Point Numbers on Tuesday August 20, 2024 @03:36PM (#41303236)
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.

Re:Neo Geo Dev: Fixed Point Numbers on Tuesday August 20, 2024 @11:17AM (#41300840)
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.
Re:Marilyn vos Savant and the Monty Hall Problem (2015) on Monday February 26, 2024 @04:54PM (#39517188)
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.
Re:Marilyn vos Savant and the Monty Hall Problem (2015) on Monday February 26, 2024 @04:09PM (#39516786)
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.
Re:Marilyn vos Savant and the Monty Hall Problem (2015) on Monday February 26, 2024 @12:56PM (#39514550)
Not to mention Monty always showing a goat is what adds the tension and interest a game show needs.
https://mattgreer.dev/now

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

anyway, cool project!

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.

Oh interesting. I never would have thought AI would be used for this. Does it also find things like the meta "revised" tag or anything like that? Doing some Googling it seems like officially it should be "revision", but seems like it's very common to use "revised"
A lot of cards say "Updated December 31, 1969", what date are you all using to populate that?
Re:Utility Classes Aren't the Same as Inline Styles on Saturday February 24, 2024 @10:04PM (#39497218)
I know we're just going to have to agree to disagree, but I find utility class based projects easier to maintain. Coming back to -- or inheriting -- css soup is never fun.
Re:Utility Classes Aren't the Same as Inline Styles on Saturday February 24, 2024 @09:47PM (#39497150)
> utility classes won’t let you deviate because they’re limited

Tailwind's just in time feature does negate this a bit. I'm a huge fan of Tailwind but I've largely avoided JIT for fear of losing the structure finite classes give me.

Edit: the down votes are interesting as this is literally what Tailwind JIT allows. Their post on it even says "We’ll likely add some form of “strict mode” in the future for power-hungry team leads who don’t trust their colleagues to use this feature responsibly."

Re:How Does Bluesky Work? on Saturday February 24, 2024 @09:12PM (#39496995)
Had a similar response. Dusted off my account and finally posted something.
They even designed their plastic type symbol to look like the recycle symbol, even though most plastics can't be recycled.

> The “chasing arrows” symbol we see on plastic containers and products does not necessarily mean the product is recyclable.

https://www.acmeplastics.com/content/your-guide-to-plastic-r...

Re:Show HN: I made a simple daily word puzzle on Monday February 19, 2024 @05:15PM (#39435481)
You need to press enter
Re:The case against caffeine on Monday February 19, 2024 @10:50AM (#39431066)
Yeah, for sure. This post and these comments just made me google caffeine for a bit.

If I don't get my morning cup I almost always get quite the headache, so I'm not surprised.

Re:The case against caffeine on Monday February 19, 2024 @10:36AM (#39430903)
This site says just the opposite

> Caffeine narrows the blood vessels in your brain. Without it, your blood vessels widen.

https://www.healthline.com/health/headache/caffeine-withdraw...

Re:Show HN: Domino Fit – Domino Tiling Puzzle on Sunday February 18, 2024 @06:12PM (#39424499)
It really reminds me of picross, which is a good thing.
Re:Access over 181,000 USGS Historical Topographic Maps on Sunday February 18, 2024 @11:40AM (#39420461)
> Both viewers annoyingly fill your browser history every time you move around or change zoom levels

To be fair that's not limited to map viewers. A lot of web apps do that. I think finding the right balance is a bit of an art.

Re:From engineer to manager: what I love, what I hate on Saturday February 17, 2024 @12:54PM (#39411663)
A bad EM can do so much more damage than a bad IC. I don't think that's talked about enough. In my now very long career I've had 1 great manager, a few good/decent ones, and a lot of lousy ones. The lousy ones just make the job so much harder and sometimes outright miserable. A bad EM coupled with junior ICs can be particularly bad combo. At least as I got older I came to realize I can work with bad managers and help move things towards a better place, or bail if I feel it's hopeless.
Re:Considerations for a long-running Raspberry Pi on Saturday February 17, 2024 @07:26AM (#39408829)
I didn't do anything special at all. My two pis have been running 24/7/365 for 5 years with no problems. I often completely forget about them. One is a pi hole and the other our print server.
Re:Show HN: Driftmania – an open source PICO-8 racing game on Friday February 16, 2024 @07:30PM (#39404916)
If you mean pico8 games, they can do that out of the box. Click on play game, then the play button and touch controls will show up if on a phone.
I agree, using the empty list to communicate to the user the situation is making an assumption about the user. A lot of users have never set up or dealt with printers ever. I can say for sure that an empty list of printers would confuse a lot of people in my household.
Re:Why is the mouse cursor slightly tilted and not straight? on Sunday February 04, 2024 @10:15AM (#39250800)
I've noticed whenever a topic comes up that I have a lot of knowledge in, people almost always chime in with incorrect or just flat out made up stuff. I always remain suspicious of anything I read in any comment section. Including here on HN.
Re:How Quora died on Saturday February 03, 2024 @03:40PM (#39244522)
Quora really captured lightning in a bottle around that time. I used to get a weekly (daily? Can't remember) email from Quora and I would read just about every question in it. I came to look forward to the emails. I've never had that experience with any other other newsletter.
Re:Show HN: The classic Minesweeper on an irregular grid on Friday February 02, 2024 @04:49PM (#39234931)
I think it's ok. One of the mine spots is incorrectly labeled. The spot that the upper orange arrow is touching is not a mine.
Minor nit: retriever is misspelled

> Retreiver lets you request secrets from anyone without any of the data going to a server.

One of my websites has links to nytimes.com. They work fine if clicked on manually. Bernard reports them as a 403. I wonder if NYT is classifying Bernard as a scraper?

Older »