Thursday, June 9, 2011

Reflection Shader

Just posting an image of the final of the 3 shaders I have for this quarters work. This one is a reflection shader. It takes in a reference for the environment it needs to reflect. There's also options for diffuse intensity and how reflective the surface is.


BMP to Jpeg Compression

This simple windows application takes an bmp file and converts it into a jpeg.

Particle System and Rigid Body Image Update

Saturday, June 4, 2011

Particle Rigid Body Project Update

My particle system is finally complete. I added in walls for all of the sides and also there are controls for moving the camera through the environment using the arrow keys and mouse. I'll post some screenshots when I get a chance to grab the master file from my other computer

Oscar Time

Oscar Time is a flash game I got the idea for from a game I saw on a podcast from Harvard. It's a simple catching game that involves catching the trash in the trash can and dodging the recyclables.




Thursday, May 5, 2011

Cell/Outline Shader

This shader is pretty much complete. The only thing I think I'd like to add to it is an option for making the outline thicker or thinner. This should be a pretty simple addition. Here's a screenshot:

Particle Systems and Collisions: Next On The Menu

So for my particle system I've decided to go ahead and draw a back wall for them to bounce off of. I've already started digging around in some code I have and I think there's a better way for me to handle drawing floors and walls. Here's some sample code:


void DrawWalls()
{
LPDIRECT3DVERTEXBUFFER9 pWallVB = NULL, pFloorVB = NULL;
VOID* pData;

g_App->CreateVertexBuffer(sizeof(aWall),D3DUSAGE_WRITEONLY,
                                                                D3DFVF_CUSTOMVERTEX,D3DPOOL_MANAGED,
                                                                  &pWallVB,NULL);

pWallVB->Lock(0,sizeof(pData),(void**)&pData,0);
memcpy(pData,aWall,sizeof(aWall));
pWallVB->Unlock();


pFloorVB->Lock(0,sizeof(pData),(void**)&pData,0);
memcpy(pData,aFloor,sizeof(aFloor));
pFloorVB->Unlock();


g_App.GetDevice()->SetStreamSource(0,pWallVB,0,sizeof(D3DVERTEX));
g_App.GetDevice()->DrawPrimitive(D3DPT_TRIANGLESTRIP,0,4);
}




Right now my code for drawing the floor isn't inside of a function so this is an area where I'll be doing some clean up. Not only will this clean up how the code looks but it will make it easier to compartmentalize later.