Recent submissions

Comment · 1 month ago
Loved the title. I was like "that's 10 bits too many for a flag!" Haha
Comment · 2 months ago
I'm out of the industry now, but I kept doing this for a while. I would want to "scratch an itch" and build a game out of hours. After a few attempts I realised I don't actually want to build a game, I want to build an engine
Comment · 3 months ago
Ive got a tendency to modify many things as I go and break them into commits later. Generally I do git add -p until things are too interwoven. In that case, I've ended up with the following strategy:

git commit -m "WIP" & git revert HEAD & git revert HEAD & git reset HEAD^

Now I've got a copy of the changes as a commit and I'm my work tree. I widdle it down until its one change only. Then I do:

git commit -m "Bla" & git rebase -i HEAD~3 -X theirs

Them order Bla above WIP. I keep doing this "double revert" trick until the WIP no longer applies. Then done.

Comment · 3 months ago
Engineering is very reliant on mathematics and as real world as it gets.
Comment · 4 months ago
Ok fair enough. I don't write performance stuff in Java so I haven't even needed to look at this stuff to be honest. Most of the intrinsics I would want are there, except for any memory related stuff. I'm still not sure how structs are laid out in memory but I guess there's something for that too. My favourite thing in C++ is just loading a big binary blob and being able to point directly into it.

The only thing that was different was that we had a number of platform-specific intrinsics to really shake fast code out. E.g. shuffles on x86 on older SSE editions were terrible and we would have custom x86 code for shuffles or let memory out differently.

The only thing we use from C++ stdlib is unique_ptr. For everything else we had our own much more tailored, much faster, stuff. We had something like 10 different array containers for example.

Yeah what you described with templates is what we are doing re speculative optimisation. We have tuned versions for different workloads. We would inspect before we decide which one to run (only if that wasn't slower then just having one implementation, which was often the case because of instruction cache).

Something to be aware of is that on consoles mmapping a page to be executable was forbidden. So no JIT. And you aim for your slowest target so PC just follows that.

Comment · 4 months ago
I'm a Java developer now, amongst other languages. The advantage of Java is that it takes A LOT less time to develop something, so there is the whole bang for buck for sure. I have had a few problems where I would love shared direct memory access and some atomics (because it would be a lot easier). But for the most part developing in Java is a lot quicker.

I don't think game developers are more conservative than any other developers. We do have large C++ codebases and so it's hard to change.

All modern engines have a few scripting languages tacked on too.

Something like Lua usually is the sweet spot: most of the people developing scripts are not developers. We even had a Java interpreter for scripting once, but it lost favor for this reason.

There were exceptions, but I found that developers generally preferred C# over Java anyway. Our assets pipelines are generally in C# already.

Any speculative optimisation we were doing by hand. There is the whole deferring allocations / moving allocations, both of which we were already doing (e.g. copying every frame).

A lot of our C++ code is intrinsics (including memory primitives like _mm_stream_ps and barriers) and you HAVE to have good control over how memory is laid out (e.g. knowing that data is split between cache lines so that you you don't get contention). Lots of spin locks too. I just don't see how you can do this kind of low level work in Java.

Comment · 5 months ago
Low level CPU-related optimisation is absolutely still a thing. The GPU is always filled to the brim trying to get as much quality out of a graphics frame so a lot gets offloaded to the CPU. When I was doing this I was doing a lot of low-level CPU optimisation. GPU optimisation was usually more about transform process topology but there was plenty of low-level work to do there too.

Games are both high throughput AND low-latency and C++ is still king there

Comment · 5 months ago
I did notice that difference too. But previous "credit card size" projects have all been several mm (as in couldn't fit a wallet designed for credit cards). So 1 mm is... pretty sweet!
Comment · 5 months ago
I went to the page expecting to rant about how it's not actually credit card size because of the thickness and was for once pleasantly surprised! Kudos to the author! It looks great!
Comment · 6 months ago
That's pretty close to "be like Keanu Reeves"!
Comment · 6 months ago
It's always the kitchen for me across food places (in Australia). Ending up with pickles when I removed them. Ending up with coke zero instead of coke. But the worst is ending up with anything mock meat!
Comment · 7 months ago
It's been mixed moving to normal code: I haven't had to low-level optimise for ages now (man I miss that). But performance in the O() sense has been the same.

Game engine development is very much about processing of data. The pipeline is long and the tree is wide. Being able to reason about complicated data processing topologies mapped very easily across.

Comment · 7 months ago
I haven't watched his videos on his language for ages, but this was a big thing he wanted in his language: being able to swap between array-of-structs and struct-of-array quickly and easily.
Comment · 9 months ago
Unless LA stood for Latin America haha.
Comment · 9 months ago
I guessed American when it was compared to Hockey, Baseball and Basketball.

In Melbourne, Australia, Football is again another sport (but it not being called Footy gives it a way).

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton