HN user

AndrewPGameDev

152 karma
Posts0
Comments40
View on HN
No posts found.

There were some comments talking about this yesterday: https://news.ycombinator.com/item?id=45002977

I'll just reproduce FatalLogic's last comment here:

""" In the class action case[0], which was allowed to go forward by the court last year, it is claimed that Valve told someone:

"This includes communications from Valve that “‘the price on Steam [must be] competitive with where it’s being sold elsewhere’” and that Valve “‘wouldn’t be OK with selling games on Steam if they are available at better prices on other stores, even if they didn’t use Steam keys.’” Dkt. No. 343 ¶ 158, 160 (quoting emails produced at VALVE_ANT_0598921, 0605087). "

(This is a new case, not the 2021 suit, which was rejected by the court, then amended and refiled, later with an additional plaintiff added)

[0]https://storage.courtlistener.com/recap/gov.uscourts.wawd.29... """

So a US court of law has decided that it's at least possible that this isn't true.

AFAICT SKG doesn't really make a distinction between games bought with a one-time purchase and games that are subscribed to. In their FAQ, they explicitly say it would apply to MMOs too (see https://www.stopkillinggames.com/faq "What about large-scale MMORPGs? Isn't it impossible for customers to run those when servers are shut down?) although they don't spell out whether they mean exclusively games bought with a one-time fee or games that are subscription-only.

Ross from Accursed Farms said this in a video FAQ on youtube:

" Would this initiative affect subscription games? Well, that's another question that depends on what the EU says. Personally, I think it's very unlikely because that doesn't fit well with other existing consumer laws. I think the only way you could even make that argument would be that this is necessary for preservation and most governments don't seem to care about that at all. However, I don't think this is a huge loss, since only a handful of games operate that way today. So if we can give up those but then save 99% of other games, I'm willing to make that bargain. "

so it seems like they actually are suggesting that they'd like for (a law that came out of) SKG to apply to subscription games but there's an understanding that it probably won't.

I've spent a little time in this space, and I'm not sure it's a good idea to write shaders in Rust, although it's probably better than GLSL or WGSL.

Let me start with the pros:

1. Don't have to learn 2 different languages

2. Modules, crates, and the easier ability to share code

3. Easier sharing between rust structs and shader code.

Now the cons, in comparison to Slang [1]

1. No autodiff mode 2. Strictly outputs SPIR-V, while Slang can do CPU, CUDA, Pytorch, Optix, and all the major graphics APIs

3. Less support - Slang is supported by the Khronos group, and Slang gets use at Nvidia, EA, and Valve.

4. Safety isn't very valuable, most GPU code does not use pointers (it's so rare it's considered a feature by Slang!)

5. slangc probably runs a lot faster than rustc (although I would like to see a benchmark.)

6. Worse debugging experience, slang has better interop with things like NSight Graphics, and their Shader Debugger. Slang recently got support in NSight graphics for shader profiling, for example.

7. Slang has support for reflection, and has a C++ api to directly output a JSON file that contains all the reflected aspects.This makes handling the movement between rust <-> gpu much easier. Also, the example shown on the website uses `bytemuck`, but `bytemuck` won't take into consideration the struct alignment rules[2] when using WebGPU. Instead, you have to use a crate like `encase`[3] to handle that. I'm not sure given the example on the website how it would work with WebGPU.

8. If you have pre-existing shaders in GLSL or HLSL, you can use slangc directly on them. No need to rewrite.

9. In reality, you may not have to learn 2 languages but you have to learn 2 different compute models (CPU vs GPU). This is actually a much harder issue, and AFAICT it is impossible to overcome with a different language. The problem is the programmer needs to understand how the platforms are different.

[1] https://shader-slang.org/ [2] https://webgpufundamentals.org/webgpu/lessons/resources/wgsl... WGSL struct alignment widget [3] https://github.com/teoxoy/encase

Goodbye Auth0 2 years ago

How can a company be "people first" when they sell out to a larger company who isn't "people first"?

If you programmed this as a chess strategy, it would probably result in an engine that played the Scholar's mate every game. This is actually close to what low Elo players do in chess, but as you get closer to 800-ish ELO the probability of attempted scholar mates drop dramatically (likely due to it being an opening that isn't that good).

[dead] 3 years ago

I was writing up a large comment with sources to rebut the claims, but I think I'll wait to finish it until I can save it as a blogpost and reply with it every time I see this type of argument being made.

Basically, the USA essentially disproves the idea that nationwide GDP is the most important factor in standards of living. US share of world GDP has been relatively constant, world GDP has increased dramatically, but American life has not improved dramatically (although it has improved more than what most people think).

Instead of singularly focusing on wealth, nation-building programs should focus on the broader idea of (re)building the social contract. In the Balkans that means building an environment where modern capitalism can effectively take place. In America that means rebuilding trust in institutions and building a better safety net for poor citizens. Often this involves what amounts to a direct wealth transfer from the rich to the poor, as this all has a cost and the rich are the only ones who are even capable of paying for it in the first place.

Just Build It... 3 years ago

Suppose you were 60 years old with 3 kids who live out of the house. You like to go golfing on the weekends, and have no intentions of ever going pro. This weekend, you get to the golf course to see a series of robots have been installed on the course. When you swing, they always give constructive, helpful feedback to try to improve your golf swing. You cannot turn the robots advice off.

I would feel horribly patronized in this scenario. I don't go golfing to get better at it, I go golfing to relax. Similarly someone can program and not necessarily want to be better at it. It depends on their goals and desires. Giving someone advice before asking means you have to guess at what their goal even is. In many contexts (work) this is fine but in general it is not.

To answer your question, the reason why someone might reasonably take offense to unsolicited advice is that unsolicited advice is inherently condescending because it implies that the advisor knows more about the topic than the advisee. It also implies that the advisor knows the advisees skill level and goals. It's kinda insulting, and in another way it's almost controlling as the advisor reframes the discussion around "being good at X". I don't want to be good at golf, I want to enjoy my time golfing.

Just some napkin math:

(Suppose, as it hasn't been tested that the) SpaceX Starship can carry up to 100 tons of material to LEO. It costs 100 million USD per launch. (11,000 tons / 100 tons) * 100 million USD = 11 billion dollars. The US Department of Energy (DOE) has a budget of 149 billion, so under these pessimistic conditions it would cost around 7% of the budget. That's not good, but its not crazy either.

Elon Musk has stated that he thinks the cost of launching Starship will go down to 10 million per launch in the next 2-3 years (not sure if thats realistic). On the other hand, we probably don't want to unload a bunch of nuclear material in LEO, but much further away from Earth.

Just watched the Kurzgesagt video. They make the point that more radioactive material is put into the world by burning coal, which I think is a valid point. They use the Falcon 9 exclusively to calculate the cost of launching, and they never indicate in the video that the cost of putting 1 kg of material into space might go down. Falcon Heavy can already launch (reusable) 63.8 tons to LEO at a cost of 97 million, which is around 1500USD/kg instead of the 4000 they cite.

They also strangely compare it to the cost of the fissile material, which doesn't make any sense as the majority of the cost for a nuclear reactor is in safety precautions, not in the actual production of nuclear fuel.

In their sources they're a little less forward:

  Electricity from nuclear reactors is produced for about $70 per MWh, which is 7 cents per kWh. The fuel costs represent just 0.46 cents per kWh or 6.5% of the total cost.
  If we had to get rid of nuclear waste by putting it on rockets, causing fuel costs to rise 3.4 times to 1.57 cents per kWh, the total cost would be increased to 8.1 cents per kWh. This means the total cost becomes 16% 
  higher.
In the video they state "In 2021, we saw a record 135 launches into space. If we repurposed each of those rockets and filled them all with nuclear waste, the total amount that could be lifted into a Low Earth Orbit, which is the closest orbit above the atmosphere, is nearly 800 tonnes. "

And then they extrapolate this out to... forever, I guess? Either way there were 178 successful launches in 2022. There have already been 123 (successful) launches in 2023. Regardless it seems reasonable to expect this number to go up and the average tonnage per rocket to go up. It just seems strange to make this video that is very explicitly only about 2021 and to have the economics change so much even in 2 years. I would've preferred if they stated in the video that it doesn't make sense today, but it could in 5 or 50 years, and made more arguments in favor of storing it deep underground.

---

The biggest risk (as another commenter mentioned) is the massive risk to the environment by trying to shoot it into space. If we really needed to get rid of it, we could bury it under a mountain for 100 years, dig it back up, and shoot it into space when the cost is much lower, and its much safer to launch.

Or just never launch it at all. I don't really buy the idea that burying nuclear waste in remote areas is dangerous. Critics say that the problem is that you have to keep waste contained continuously (say for the next 10,000 years) but I'm near certain we will have some way of truly getting rid of it in the next 500 years. Whether that's blasting it into space or reprocessing or something else entirely.

I tried implementing this logic in java with a try-catch style:

        try {
            Validation validation = validate();
            try {
                Value value = update_db(validation);
                send_email(value);
            } catch (DBError db) {
                try {
                    sleep(5);
                    Value value = update_db(validation);
                    send_email(value);
                } catch(InterruptedException ie) {
                    // do nothing, stupid java-ism
                } catch(DBError db2) {
                    try {
                        Value value = update_db_remote(validation);
                        send_email(value);
                    } catch (DBError db3) {
                        notify_user(db3);
                    } catch (EmailFailedError e) {
                        requeue_email(e);
                    }
                } catch (EmailFailedError e) {
                    requeue_email(e);
                }
            } catch (EmailFailedError e) {
                requeue_email(e);
            }
        } catch(ValidationError v) {
            notify_user(v);
        }

https://gist.github.com/Andrewp2/9d97bd213b061166d6df565ce26...

IMHO this is much worse than the railway version you gave, but maybe someone could write a superior version that still uses try-catch.

There is definitely at least a performance hit in that wgpu (and I think WebGPU too) only supports a single queue. That means you can't asynchronously run compute tasks while running render tasks.

Additionally Wgpu (the library) will insert fences between all passes that have a read-write dependency on a binding, even if there is technically no fence needed as 2 passes might not access the same indices.

Finally I know that there is an algorithm called decoupled look back that can speed up prefix sums, but it requires a forward-progress guarantee. All recent NVIDIA cards can run it but I don't think AMD can, so WebGPU can't in general. Raph Levien has a blog post on the subject https://raphlinus.github.io/gpu/2021/11/17/prefix-sum-portab...

Interesting timing on posting this to HN, I've recently been optimizing my WebGPU LSD radix sort. Today I measured it against the Thrust CUDA version, and it's about 10x slower (15ms to 1.5ms). My goal was to try to get 10 million elements in 1 ms, but now that I know 3 million in 1.5ms is impossible even for Thrust I know I won't be able to beat that.

I really don't understand why this tweet implied that Lee and Kim are autistic, or that they needed to be "babysit" by a different professor. Seems weirdly hostile for no discernable reason.

Regardless, I don't think I'm going to be super hyped about the LK-99 story until we see some replication, which should hopefully happen within a couple days.

The first time I played Minecraft Classic was really significant to me.

I was around 12 years old at the time, and I was in middle school. I remember feeling extremely frustrated at the school system because I was ready for much more in terms of academics, but my teachers mostly taught to the lowest common denominator. I read books by John Taylor Gatto, and later Alfie Kohn. I was extremely interested in "Unschooling", an idea that if the school system were removed, kids would actually learn more by their natural curiosity. That idea isn't very appealing to me anymore but Montessori schools and more self-directed learning in general would probably be a good thing for the educational system.

I had found a website that allowed you to click a button and would redirect you to a random "interesting page". There was a website called "Everybody Edits" which was a 2D platformer made out of a grid of squares, and players could add or remove squares. Servers had challenges with read-only levels, and there were buttons and doors and little boost pads. I thought the game was pretty fun but I left after a couple hours playing different challenges.

I clicked the button again, and it led me to minecraft.com . That game almost immediately blew my mind. I built a little brick house with flowers out in front and I got my mom to come over and look at it.

What made it so special for me was this very tangible feeling of freedom. This was a game that allowed me to build anything, where I wasn't restricted at all by my parents, or my teachers, or any authority figure whatsoever.

After playing with the singleplayer mode, I saw there was some multiplayer servers. I don't remember much about the first (several?) servers I joined, I think they were all build-protected so nobody could grief them, and they had some pretty builds.

Then I joined a server that didn't have any build-protections at all. It kind of reminded me of a jungle? Whatever terrain was randomly generated there was completely destroyed. Minecraft classic had an extremely short height limit, I think 64 blocks. Many many people had joined the server, built a pillar directly to the top of the world and constructed a "canopy" built out of random blocks. I swam over to the only structure that existed, a brick house that was decaying. I started to fix it, but then another random player started destroying it, being kept in a constant moving state of existence.

To this day, I'm still obsessed with web games and games that allow an extremely high level of freedom. Much later in life I got a software engineering degree, I went to work for a big company with a big paycheck, I bought an RTX 3090 to play Minecraft RTX, and now I'm fulltime trying to build a pathtraced game on the web using WebGPU. The main reason why I want pathtracing isn't for photorealistic visuals, but to enable the same level of freedom that Minecraft has.

My bad, you're absolutely right on that.

I do want to defend that I'm right in spirit however - Arkane was receiving pressure from Zenimax (it's parent company) from even before the buyout. Microsoft didn't reverse that decision, and I think it was likely Arkane was still pressured to make/release a game they never would have made otherwise. I think the same idea of external pressure and short-termism still apply, and that's indicative of where the industry as a whole is.

I think the larger problem is that there is a lack of attention to things that don't immediately make sales, and a terminal short-termism due to higher levels of external investment.

Consider Redfall, the recent flop developed by Arkane Studios. It is completely obvious to me that the developers of Prey, Dishonored 1/2, and Deathloop know how to make great games that play well. The problem(IMO) is that Microsoft bought Arkane, and then kept Arkane on short leash. The publisher gets to go "hey can you add gear scores, the marketing department says that sells" "Hey can you add co-op multiplayer, we have no idea how the engine works but please do it anyway" and then gets to demand when they launch.

No Mans Sky fell into exactly this trap. They got a big publisher deal, the devs were terrified to deflate the hype because they didn't want to undo the work of their publisher (who is paying their rent/mortgages/food). They couldn't tell the truth about the # of features that were going to be there at launch because that might mean upsetting the publisher and taking massive financial hits.

Skippable tutorials don't make sales, they're not a marketable feature even if it's incredibly important for replay value. Because by the time you're replaying the game, you've already bought it and gone past the refund window.

Now-a-days, I just want a very good first time experience. If I can buy the game on the launch day and not experience gamebreaking bugs while the game more or less fulfills its promises I'll be happy (looking at you, Cyberpunk).

I've had this thought for a long time that if you have a completely functional code base (as in no side-effects), making the decision between a microservice approach and a monolith approach is fundamentally transparent. Any functional code can not only be split onto multiple threads, but multiple servers (at the cost of latency).

I've been using this extension called "Crackbook Revival" which allows you to set timers upon visiting certain websites, in a certain time range like 9-5. I have it setup on Reddit and Youtube to do a 10 second delay before loading the webpage.

I think one of the important tricks to using friction productively is to not use it too aggressively. A lot of people get started on this idea, but they almost instantly find themselves turning the friction back off because it's too much. For example, staying logged out of every website all of the time sounds like way too much friction for me, but Crackbook works because if I really want to watch a Youtube video, waiting 10 seconds really isn't all that long.

More research on what types of friction work, and what types of friction don't work would be extremely useful.

I want to emphasize something that other comments seemed to have missed - when a human artist makes a mistake, I have a sense of sadness, or pity. But when an AI makes a mistake, the types of mistakes it makes are revolting. I can't watch that beer AI video because looking at it for a couple of seconds makes me want to throw up.

That's the real problem with the "turds" in AI art - they're just close enough to pass first inspection, but you only realize afterwards how messed up they really are.

I honestly think for now I'd rather just deal with my own inadequacies as an artist than try to bargain with the little freaky demon in the computer to draw actually nice images.

Extending the metaphor, a competitor can be good for business depending upon your strategy. If you're a hyena, you benefit from having lions around because the lions can kill a much larger animal than a pack of hyenas ever could. Maybe someone else on HN can advertise their copy of a product, but all that's doing is growing the target market for the OG product which already has a (small) monopoly.

I was looking at https://css-tricks.com/single-element-loaders-the-spinner/ to see some other ways of doing spinners, but after seeing that I realized that having fancy spinner loaders just frustrates me. It reminds me of all the time I've spent looking at a spinner and waiting for an app/page/game to load. The fact that a lot of time was put into designing a nice spinner is almost an insult.

I think the optimal spinner might be the simplest possible one, just show something moving/changing to show that the page is still loading.

It's been a real mixed bag for me. The other day I tried to get it (GPT-4) to generate shader code to create a ray with a pannini projection, and it failed over and over and over again. No amount of reprompting or nudging got it anywhere close to fixing the problem.

On the other hand, it can explain certain complicated concepts extremely easily. I like asking it questions when I just want a general answer as opposed to something that must work.

Slight tangent from the original post:

I wish "normal" people were more tech-literate. I don't think they realize just how much of their autonomy they've given up by choosing to use Microsoft Products/Reddit/Twitter/Spotify/Facebook/TikTok/Apple Products/ etc.

We're at a point where now the average person depends on several layers of technology that they can't even conceive of, and often the companies building that technology don't share their political interests. But then the average person expresses frustration at having to use open-source alternatives (which is completely understandable when the open-source alternative is definitively worse!).

Basically, for me not understanding how technology works when it's so central to our everyday lives just seems baffling. I suppose someone could say the exact same thing to me about not understanding how my car works, or how to grow my own food. Maybe technology seems easier to learn than agriculture? But then of course it's easier for me, I'm a professional programmer. So I try to have a lot of empathy for everyone who doesn't understand technology, especially my mom when she doesn't know how to convert a PDF.

Why? because of how I choose to understand the origin of the 7 note major scale: you take any note (the base tone) and multiply the frequency by 3. this creates a fifth (plus one octave). I'll keep in mind that 'the octave' is defined by multiplying the frequency by 2. then, fit the fifth (base tone * 3) into only one octave (3/2). And repeat 'recursively'.

This is called 3-limit tuning: https://en.xen.wiki/w/3-limit . 5-limit tuning is what standard western music uses: https://en.xen.wiki/w/5-limit (to include thirds as well as fifths) After reducing the ratios to fit in an octave, you get exactly 8 notes (7 if you subtract the octave itself). Note how https://oeis.org/A054540 shows that 7 notes are a good approximation of the ratios, but so are 12 (which shows why creating a 12-note system was an advantageous move, over 11 or 13). Technically in 12-EDO a fifth is not exactly generated by the ratio 1.5, it's slightly flat at 1.498307... but we choose the note closest to 1.5.

This is the famous circle of fifths, but we all knew that. Finally, after twelve repetitions we're back on the same note, but an octave above. (but why? why stop at twelve? I'm still working through this answer, but it has something to do with convergence maybe? or just the fact that after 12 notes we have now landed within two notes which we 'found' already???)

Suppose we already chose a 12-note equal-tempered system. The closest note to the perfect fifth of a fundamental frequency `f` will be `f * 12th-root(2)^7`, (7 notes out just happens to be close to multiplying by 3/2). The next fifth after that would be `f * 12th-root(2)^7 * 12th-root(2)^7 = f * 12th-root(2)^14`. Going out by a fifth 12 times gets you `f * 12th-root(2)^84 = f * 12th-root(2)^(712)`. But we know that `12th-root(2) ^ 12 = 2`, simply from the definition of 12th root. Multiplication is commutative, so we can group the roots-of-twelve by groups of 12 instead of groups of 7, and we get `f 2^7`. Taking that modulo 2, we just get f, i.e. the same (enharmonically equivalent) note.

Now suppose we didn't make that choice, instead we chose a 31-note system (I'm a big fan of 31-EDO). In that case, we have the same construction. The fifth in 31-EDO happens to be an interval of 18 notes, and similarly we jump around the scale, but this time an interval of one note is `31st-root(2)`, so we have to do 31 fifths to get back to the same note.

This actually tells us something interesting - if we want to form a circle (made out of intervals, that end up hitting the original enharmonically-equivalent-note) to hit all of the notes in our scale the notes we hit must be a permutation of the original scale. It's a little beyond my math to tell you how this works, I think Fermat's little theorem and modular arithmetic has something to do with how it works. Something about how 7 and 12 (or 18 and 31) are relatively prime compared to each other, and it forms a group which generates a permutation.