Am 07.01.2012 16:44, schrieb Manu:
On 7 January 2012 17:27, Paulo Pinto <pj...@progtools.org
<mailto:pj...@progtools.org>> wrote:

    Thanks for the explanation.

    I am convinced that eventually AAA game engines can be
    made in a GC enabled language like D, they just need to
    be coded in a different way, more GC-friendly.


I tend to disagree. I see it trending in the opposite direction.
Tight pooling of resources and updating in finer grained (probably
threaded) tight loops across neatly (cache friendly) packed bundles of
like objects. That's where engines are going.
Engines are becoming more and more memory-layout aware, not less... GC
is the opposite of rigid memory layout.
It's great for high level sugar that glues the whole thing together, but
the engine is heading the opposite way; everything works more like a
video card, small repetitive streamed jobs, with memory carefully managed.


The reason I am conviced is that C++ was the last systems programming language with manual memory management. All the languages people are
developing as possible C++ replacement do have some form of automatic
memory management.

Meanwhile smart pointers and a GC API became part of the C++ language standard. In the future, if you want to target Windows 8 Metro games, you will need to use WinRT which requires C++/CX and makes use of reference counting in the language.

Apple added GC to Objective-C, which has some problems with existing frameworks, so their next step was to introduce ARC.

This is why I think that eventually even games engines will be developed
in a language that supports some kind of automatic memory management be
it GC or reference counting.

Naturally such language also needs to provide the possibility to disable
the memory management in critical code paths.

If you go to my web site, the mini games I have there are a joke, they
cannot even be called games, maybe half-finished prototypes. I just spent too much time in the university with compiler programming and UNIX system programming, only to start looking at game development when life start making me busy with other stuff.

Anyway, I still remember the days when C was too high level to be used for games.

Then again, I don't have any experience in the game industry, so you are much better qualified to say if what I say makes any sense.

--
Paulo


Reply via email to