[racket-dev] gc vs assignment
On Tue, Aug 24, 2010 at 2:47 PM, Neil Toronto <neil.toronto at gmail.com> wrote:
>
> In my defense, I was talking about framerate, not total or average cost of
> memory management.
That is very different situation.
> Games are really almost real-time apps.
I'd say that they *are* real-time apps. You really want to be
prepared to redraw
at every frame. `Hard' real-time GC is possible, but tricky. With processors
so fast these days, it'd be interesting to do a real-time GC and see how it
performs. Obviously the total or average delay would be longer, but it'd be
interesting to try to put a hard limit on the pause time and pause ratio.
> I'm still doing the game universe-style, so I haven't moved to mutation yet.
> I'm halfheartedly considering it. I'll probably try an allocation pool of
> same/similar-sized arrays first. I'd gladly pay half of my ideal 16ms per
> frame to eliminate hitches.
I'm currently playing `Red Dead Redemption' and there are a huge number
of `glitches' in the game that are obviously caused by mutation errors
(that is, they didn't do the mutation correctly). These can
be quite hilarious. I've seen boxes floating in mid-air, people
buried up to their neck
in the ground (and acting quite non-chalant about it), and one character
was nailing some thin air.
--
~jrm