mabster
Joined 5 years ago
Joined 5 years ago
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.
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.
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.
Games are both high throughput AND low-latency and C++ is still king there
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.
In Melbourne, Australia, Football is again another sport (but it not being called Footy gives it a way).