The mis-adventures of a new Game Developer.
Daily 09/02/03
Published on September 2, 2003 By Mudflap In Software Development
Met Paul Boyer this morning

Met Paul Boyer this morning. He's the new UI guy here. Welcome aboard Paul.

 

Checked in my latest stuff. Before the DX9 Conversion.

 

Look what I found today:

 

VOID classXObject::CalcLocalBoundingBox()

{

   VOID* pVB;

   D3DXVECTOR3 vMin, vMax;

   HRESULT hr;

  

   pMesh->pMesh->LockVertexBuffer(D3DLOCK_READONLY, &pVB);

   hr = D3DXComputeBoundingBox((D3DXVECTOR3*)pVB,

                               pMesh->pMesh->GetNumVertices(),

                               pMesh->pMesh->GetNumBytesPerVertex(),

                               &vMin,

                               &vMax);

 

   pMesh->pMesh->UnlockVertexBuffer();

}

 

Ok, we've got to do something about this. First off, without member markers, where the heck is the first pMesh from?

 

    pMesh == ?

 

    m_pMesh?

    g_pMesh?

    this->pMesh?

 

Then, what's that mesh member inside of the mesh? If pMesh is a local wrapper class around an ID3DXMesh, then we should delegate the functionality to the member mesh, or at the very least, add an accessor to PRIVATE data so that the syntax is clearer. In MY ideal world, it'd be something like this:

 

hr = D3DXComputeBoundBox((D3DXVECTOR3*)pVB,

                         m_pMesh->GetNumVertices(),

                         m_pMesh->GetNumBytesPerVertex(),

                         &vMin,

                         &vMax);

 

Oh well, maybe next life

 

Finished the Dx9 conversion. Didn't take long. Can anybody tell me why the edge antialias flag doesn't work anymore, but it's still listed in the help? Bug in the SDK?

 

A whole bunch of conversations with Alex about what we want in the project. He has an idea for a laser blast, but he can't quite get it out of max the way we want. It looks like we can do the same thing with point sprites, but that's just another thing we'll have to learn. Ugh!





 

Incorporated the effect class into the project. This involved hacking the effect class to be a wrapper around the object class. Like I said when I first wrote it, the effect class is a special case of the mesh class. Now we leave the mesh modification to the object class and we just control the effect part. We do completely override the rendering code. Now we have DX9 and our effects. I do have one question for those that know about shaders.

 

How do I reference the current material color? Right now, I've had to hack it and make it a named parameter.

 

.cpp --

      D3DXVECTOR4 decalColor(material.Diffuse.r,

                             material.Diffuse.g,

                             material.Diffuse.b,

                             material.Diffuse.a);

      m_pEffect->SetVector("DecalColor", &decalColor);

 

.fx --

      Out.Diffuse = DecalColor;

 

I also spent some time with Brad and crew trying to keep Brad from getting too annoyed with the current progress (Bradanoid). Wasn't too tough. Especially when Cari and I can knock out a solution in 2 minutes. I think we impressed Paul

 

Anyways, I at least knocked out one thing from my list. I did add to the list however. Hmmm. This isn’t going in the right direction.

 

1) Help Scott on PolMachine whenever he needs it.

2) Incorproate the explosion into the project.

3) Investigate point sprites for laser effect.

4) Scorch marks.

5) TRON blur (for low end machines)

6) TRON blur (for high end machines)

7) Mini map.

 


Comments
on Sep 02, 2003
OK Dawgs, this is my take on the laser....

The meat of the animation is about, what, 7 frames long? This is shot enough (IMHO) that we could turn it into an alphablended filmstrip and play that bad-boy on a scalable plane with a function like...

PlayLaserBlast(v3OriginIn, v3DestIn)

Where the Left side of the plane would be positioned at the origin, and the right side would be stretched to the destination. Then we'd make sure the image face of the plane is facing up towards the user and BAM - Instant sexy laserblast! Plus, the whole "playing an animation on a plane in 3d space" thing could be used for other effects we're looking for in the upcoming Gamma Build (explosions, perhaps).

Anyhoo, just a thought.
on Sep 02, 2003
We (meening in 'I') need an edit button....

"shot enough" == "short enough"

I'm a boob.
on Sep 02, 2003
"meeing in 'I'" == "meening I"

*sigh*

Time to go home, I suppose.
on Sep 03, 2003
Definately doable. That's the whole premise of the point sprite. Except in point sprites, we'll get the length by applying multiple overlayed sprites. Both techniques have their advantages and disadvantages.

For the filmstrip idea, the advantage is that it very low on compute cycles, but the texture is huge.
The point sprites are higher on compute cycles, but the textures are extremely small.

We'll just have to experiment with different methods to figure out which one works the best.