Sean Barrett
🏳️🌈 ally, BLM, gamedev (Thief, Promesst), Indie Game Jam cofounder, popularized C header-file-only libs w/stb, @ Epic Games. I do not speak for Epic. he/him
Larry, I'm on DuckTales.
https://nothings.org
- [Not loaded yet]
-
View full threadHow is your library going to return fixed-size arrays on the stack? I guess to share code w/input? Most of my libs don't do anything like this. The first few functions I wrote for stb.h did two passes internally. Then I wrote a dynamic array like the one in stb_ds.h, and started using that. (1/2)
- (The stb_ds.h pattern is basically the struct you have, excep you replace "type *items" at the top with "type items[0]" at the end, and return a pointer to the items field, so the dynamic array is directly addressable as a C array. But it means the object itself isn't stable, moves on relocation.)
- Testing the performance of four different pathfinding algorithms. To find out which one is the fastest, which one generates the best path and which one explores the least nodes agatedragon.blog/2025/05/13/p... #gamedev
-
View full threadWhenever A* hits a wall it has the problem that everywhere it's been tends to get expanded further & it doesn't know those can't actually get cheaper, so the wider the blockage is the more it expands behind itself. Using a slightly inadmissible heuristic, e.g. lowbound*1.05 can help.
- But all I can say is I ran these sorts of tests 20 years ago and A* did not behave like that and was not slow.
- It doesn't look like your A* used a particularly good heuristic. It should be able to beeline fairly directly to the goal on an unweighted 2d grid with an accurate heuristic. And there you can mitigate the priority queue cost using integer costs and priority buckets for O(1) updating.
- [Not loaded yet]
- [Not loaded yet]
- [Not loaded yet]
- Because big US cities are mostly coastal, 65% of the US population lives within the 100-mile CBP zone. www.bloomberg.com/news/article...
- [Not loaded yet]
- I used to, but for the last ten years or so I just buy downloadable, unprotected mp3s, since if I buy CDs I'm just going to rip them anyway.
- shittiest timeline
- I don't even know how to express my outrage about this. I can't fit it in one tweet. Morally, LLMs shouldn't be used for anything. But sure, maybe an LLM can accurately summarize a document or generate boilerplate source code to use a library. I could "understand" someone using them for that. But:
- Can it think or feel or reason? No. Does it have anyone's best interests at heart? No. Can it be held responsible for choices? No. Does it understand the consequences of "choices" it "makes"? No. Should it be DECIDING? FUCKING HELL NO.
- The only part of this weekend's game funding discourse that made me raise an eyebrow was the idea that $2.7M is such an unfathomable amount that it came from outside funding... like there are games that spend $1M on a *character*, Kepler raised $120M in their series A & had $50M revenue in '22
- I dunno, I'm not in the loop these days, but historically I'd have said it would be difficult for a *developer* to raise that kind of money, but not for a *publisher*. A developer raising that kind of money would be weird. A publisher paying a developer that kind of money is a different thing.
- [Not loaded yet]
- glad to know I can continue to call it "the beast with two backs" without shame
- Somebody mentioned "Raised by Wolves" which I'd never even heard of, much less seen, so I thought I'd watch some of it and see if I'd be interested. Despite the seasons coming out in 2020 and 2022, HBO Max has already cut it loose from streaming on Max, licensing it to Tubi and others.
- Ok, well, that's why I finally caved and got a subscription to Tubi, for shit like this. Except, whoops, it's not on demand on Tubi. On Tubi it's "by WB TV" which shows it on a fixed schedule like cable TV or something. I dunno. How the fuck did we end up on the worst fucking timeline?
- I think the last meaningful go-around on this was the Meese Commission under Reagan. en.wikipedia.org/wiki/Meese_R... Having lived through it, I really don't remember anything resulting from the Meese Commision other than 7-Eleven moving Playboy from the main magazine racks to behind the counter.
- Well, here we go. The GOP has just introduced a bill to effectively outlaw all pornography. The bill dismantles the Supreme Court's Miller Test for obscenity, removing provisions that the content be patently offensive to community standards. dailycaller.com/2025/05/08/n...
- Here's an article from the first Trump term talking about how Republicans gave up on this fight. www.politico.com/magazine/sto...
- I wrote a blog post about mipmap level selection. pema.dev/2025/05/09/m...
-
View full thread(Like, if you just look at the comparison of the two mappings above, and don't think about the meanings, just look at the letters, mine pairs the x&y naturally.)
- (except for the typo)
- [Not loaded yet]
- You can try the variant from here: en.wikibooks.org/wiki/Algorit...
- I don't think there's anything that makes any sense. To be clear: the four parameters are "du_dx, dv_dx, du_dy, dv_dy". your mapping is (I think): grid x,y = du_dy,dv_dy cell x,y = du_dx,dv_dx and I kinda expected grid x,y = dv_dx,dv_dy cell x,y = du_dy,du_dy
- The weirdness is because (u,v) ARE also x,y, just in texture space. So I imagine your way is more useful / makes more sense. It's just the terminology makes it sound strange.
- Never forget. www.youtube.com/watch?v=Fk15...
- (I really kind of expected something else given you have 2 X-axis parameters and 2 Y-axis parameters to visualize, and a graph with 2 visualization X axes and 2 visualization Y axes, but maybe that way would be more insane.)
- BTW, the octagon approximation looks similar to a quite standard videogame vector distance approximation, replacing "sqrt(x*x+y*y)" with "max(|x|,|y|) + 0.5*min(|x|,|y|)" (though there are refined versions as well).
- [Not loaded yet]
- Gen X is not unfamiliar with sarcasm and irony. But getting an ironic tattoo is just beyond my comprehension.
- [Not loaded yet]
- Multiple people RT'd the tweet reading "They bought Giant Bomb. Holy shit." into my timeline, and everytime, I was like "who did? explain your pronoun referents, please? The only logo in the image is Pax, did Gabe & Jerry buy it?" But bsky still doesn't let you reply to the people RTing.
- "The bottom left grid cell has constant Y-axis partial derivatives (0, 0), while the top *left grid cell has constant Y-axis partial derivatives (1,1)" => "top right" I assume
- Searle's "Chinese Room" argument against AI is fundamentally flawed and effectively nonsensical, it's just well-constructed to fool people. Explaining why ChatGPT can't think with a variation of Chinese Room is subject to the exact same flaw and, in the end, amounts to begging the question.
- Of course, ChatGPT *isn't* thinking! It's just a bad way to make that argument, and doesn't actually explain anything in a useful way.
- Jesus Christ, these generative AI motherfuckers. Estimates for USA: - professional musicians: 100,000 - amateur musicians: 60,000,000 even if EVERY professional musician was a wage slave who hated work AND the stats were off by a factor of 100, you'd need a LOT of hobbyists who dislike their hobby
- Abolish ICE
- A man pulled up to a gas station to fill up his truck. ICE agents surrounded him and took him away. But his children were left behind. “They arrested someone,” witness said. “They left the children inside the truck.” www.sfgate.com/centralcoast...
- Old person here to say that ICE did not exist before 2003 We opened this door after 9/11 and can close it again
- [Not loaded yet]
- [Not loaded yet]
- [Not loaded yet]
- thank you, that's a much better spin on it
- [Not loaded yet]
- glad i'm not the only one connecting those dots. what a stupid fucking world we live in.
- [Not loaded yet]
- We need to stop with consumer-facing legalese. The first part allows training AI on SoundCloud content, the second half forbids it. Each has restrictions, but those restrictions are opaque, so I have no idea what distinction is being drawn. I doubt most non-lawyers understand either.
- [Not loaded yet]
- Yeah, sorry to bury the lede there, I forgot to quote one of the actual stories about it with my side rant.
- I've been working on texture atlases recently. For dynamic atlases, I have liked the skyline packer as it's simple and effective. And growing the atlas texture up to certain point and then rebuilding everything has worked well as garba collection strategy.
- [Not loaded yet]
- If you're not doing that, I would size the rows to slightly taller than the first thing item. So likewise, when you allow the final row to grow, when you finally pick a height for it, you might pick the height to be the actual height if it's, say, half full, but 10-20% more if it's only got a few.
- This is unexpectedly apropos.
- the Flash runtime was such a nightmare, because it was all heuristic based on no real-world usage data, because people could do anything with it, and the only thing I ever saw were things that triggered bugs.
- I fantasized about maybe doing the sort of thing we all(?) dream about where a system self-monitors and switches between implementations and techniques based on runtime info on how it's being used--middleware in multiple games can better afford that complexity than one game can--but never happened.
- We drew everything in a single pass over the display tree, because traversing it was expensive for cache reasons. I could have had a first pass that processed all the text fields to update the cache, but that would still have the problem of a mid-pass reset.
- But I 100% agree this is a nightmare for integration into somebody else's system and you don't want to do it that way!
- Yeah, I don't 100% remember that it didn't specify the height, that's my best guess reconstructing it. I do know it was lots of fuzzy heuristics of deciding what height ranges to allow, which row to clear, when to bail. The "can't flush midframe" is a whole other can of worms.
- IIRC, I originally wrote it in immediate mode OpenGL, which just allowed texture updating midframe. On consoles we found various ways to emulate that behavior, including a huge staging buffer where we queued interleaved rendering and texture-update-blits into a single command stream.
- [Not loaded yet]
- As of the Star Wars sequels--and I'm not saying anything about their quality--I became very cynical about all of these things. 100% these things exist because the people who own the IP want to try to make money from it.
- [Not loaded yet]
- I have, of course, seen failures on each of items 1-6 in the wild. (Not 7 as far as I know.)