Thursday, April 15, 2010

Changes of Plan

I had originally intended to be away for a week, but unfortunately there was the small matter of a volcano in Iceland, and as a result my trip has had to be cancelled. Having nothing else planned and some days off work, the result is that I might get some DirectQ updates done.

I have some interesting ideas brewing up, so let's see what happens.

Updates.

Idea 1: Memory efficiencies. There are quite a few places in the engine where a large-ish memory buffer is needed to store copies of (or pointers to) items. Some in the server, some in the network transport, and some in the renderer. I've previously allocated separate buffers, but since these are completely isolated and renewed each frame I can just use a single buffer for them all.

Idea 2: Complete removal of alias model limits. DirectQ has a limit of about 20,000 triangles in an alias model, because each triangle needs 3 vertexes and 65536 vertexes is the maximum you can address with a 16 bit index buffer (32 bit index buffers aren't supported on all hardware). So split the model into separate parts. The maximum applies to each part, but there need be no limit on the number of parts.

Idea 3. The Zone becomes King. A lot of DirectQ's memory management is via small memory buffers, of which there are many. Because VirtualAlloc needs to specify a maximum size, I've specified conservatively high sizes, but this reduces the amount of address space available for the Big Stuff. So use the Zone (which is now unlimited) for all of these little allocations instead.

1 comments:

=peg= said...

Shame to see a well deserved vacation go up in smoke (or an ash-cloud for that matter), but yay for more DirectQ development ;)