Jump to content

  • Log In with Google      Sign In   
  • Create Account

The Forgotten Mindset

Member Since 06 May 2004
Offline Last Active Mar 20 2012 03:39 PM

Topics I've Started

RETURN OF THE MINDSET!11!! talking love

16 November 2005 - 03:35 AM

What's up guys, it's been a while since I've been active in gamedev. I've left this hobby (at least for now, and mabey quite longer) in persuit of girls. I understand we have some casanova's on gamedev, but I can't do both. And I'm happy about my choice. Anyways, that's just a little background for those who didn't know. And to those who don't remember me, well lets just say this was a big part of my life some time ago. Anyways, I'm reviving the whole 'let's talk girls' threads that everyone seems to love/hate. The only reason why I'm going to a 'video game website for girl advice' is because this is a very active community, and you guys are fun too. Plus, I like to see what you guys are up to. So here's my deal: I met this really hot girl at a party a couple of weeks ago, I got her phone number, made a date with her a week later, and well, I kinda sucked. She told my friend that night after the date 'It didn't click'. She also told him I was 'uptight'. But the thing is, I didn't think I was nearvous or anything, but I guess I was subconsiously. We went to see a movie. She couldn't do anything at 7:00 and there were no movies playing at 8:00, so we had to go see a 9:30 showing. But I was late and we had to see a 9:50 showing. :/ And I don't know that part of town as well as I should, so she had to give me directions to the theater. [headshake] Now I don't think I'm uptight normally, and I think we need to give it another shot. So a couple of nights later, I asked her online if she wanted to go ice skating. She kept on trying to change the subject, and so I was turned down. But we talk often (on aim) as friends, and we get along well. She doesn't think I'm still trying to persue her though. The goal of that second date was to actually interact with her, which didn't happen much during the movie. Movie dates suck as first dates, remember that. So I think I'm going to ask her to hang out at her place sometime. And if she starts to turn me down, I'll say "as friends. We're friends right?" Then she'll agree I'm sure. Now what I'm asking you guys is: How do I attract this girl? She told me I was kinda boring during the date too, so I gotta work on that :/ I know how to not be boring, but I find it risky to act that way sometimes, but I gotta do what I gotta do I guess. How, oh, how can I get this girl interested in me? Body language, what? There's gotta be something I'm missing. I understand that if this goes well, and she does decide she likes me, then we'll take it from there. Otherwise I'm cool with being friends, cause I don't even know if I like her. That's why I wanna hang out with her. I know a bunch of you guys think I'm an idiot for posting about this subject in a nerd website, but I assure you, you are not my only source, I'm just trying to get as many opinions as possible.

Camera Transformation woes :/

11 July 2005 - 02:06 PM

Hey guys, I'm trying to fit the matrix transformations into my engine and I'm having some problems trying to integrate a camera system. I just can't seem to get my camera to rotate the way cameras should. I've been trying to put in some values for the camera's up vector, but I can't seem to get any precise angles. I was thinking of making the cameras always points up in the positive y direction, but let the camera class have it's own special world matrix that you can rotate it with. And when it's time to update the camera, that matrix gets filled with opposite values for the camera's rotation. And with that matrix, you combine it with the world matrices for all of the other game objects. Therefore each object would rotate around the camera, instead of vice versa. This may sound slow, but I think this is what Microsoft is talking about here in the DX 8.1 sdk:
Performance Optimization Note: Microsoft® Direct3D® uses the world and view matrices that you set to configure several internal data structures. Each time you set a new world or view matrix, the system recalculates the associated internal structures. Setting these matrices frequently—for example, 20,000 times per frame—is computationally expensive. You can minimize the number of required calculations by concatenating your world and view matrices into a world-view matrix that you set as the world matrix, and then setting the view matrix to the identity. Keep cached copies of individual world and view matrices that you can modify, concatenate, and reset the world matrix as needed. For clarity, Direct3D samples rarely employ this optimization.
Please correct me if I'm wrong. Thanks in advance :)

Problem with wrapping a vertex buffer (or any com object?)

06 July 2005 - 08:07 AM

Alright, I was trying to make a Vertex Buffer class, but after hours of frustration, I decided to make a few simple wrapper functions to see my mistakes in a simpler form. Still no. I can set up and render a vertex buffer just fine outside of classes and functions, it only does this when I have to copy these DX8 COM Objects. Vertex Data to be loaded:
// A single vertex
struct sVertex {
	float	 x, y, z, rhw;
	D3DCOLOR Diffuse;

// FVF

// Vertex Buffer Object

sVertex Verts[4] = {
	{  10.0f,  10.0f, 0.0f, 1.0f, D3DCOLOR_RGBA(255,  0,  0,255) },
	{ 200.0f,  10.0f, 0.0f, 1.0f, D3DCOLOR_RGBA(  0,255,  0,255) },
	{  10.0f, 200.0f, 0.0f, 1.0f, D3DCOLOR_RGBA(  0,  0,255,255) },
	{ 200.0f, 240.0f, 0.0f, 1.0f, D3DCOLOR_RGBA(255,255,255,255) },

The Wrapper Functions
BOOL InitVertexBuffer(LPDIRECT3DDEVICE8 pD3DDevice,
				 int VertexSize, DWORD FVF,
				 void *pVerticesBuffer)
	// Works (testing only)
	pD3DDevice->Clear(0, NULL, D3DCLEAR_TARGET, 
		D3DCOLOR_XRGB(255, 255, 0), 1.0f, 0);

		NumVerts * VertexSize, 0 | D3DUSAGE_WRITEONLY,
		return FALSE;
	PVOID pD3DBuffer;

	pVB->Lock(0, VertexSize * NumVerts, (BYTE**)&pD3DBuffer, 0);
	memcpy(pD3DBuffer, pVerticesBuffer, sizeof(pVerticesBuffer));

	return TRUE;

BOOL RenderVertexBuffer(LPDIRECT3DDEVICE8 pD3DDevice, 
						DWORD FirstVert, UINT NumPrimitives,
						DWORD FVF, DWORD VertexSize)
	if(FAILED(pD3DDevice->SetStreamSource(0, pVB, VertexSize)))
		return FALSE;
		return FALSE;
		return FALSE;
	return TRUE;

	if( pVB != NULL )
		pVB = NULL;
	return TRUE;

This is how I'm calling them:


   InitVertexBuffer(Engine->GetDevice(), g_pVB, 4, sizeof(sVertex), VERTEXFVF, Verts);

   RenderVertexBuffer(Engine->GetDevice(), g_pVB, 0, 2, VERTEXFVF, sizeof(sVertex));

When I execute this code, it doesn't render the vertex buffer, but it does clear the backbuffer to yellow (as commented). But nothing breaks until after the program is closed. That's when the output says:
Direct3D8: (ERROR) :Memory still allocated!  Alloc count = 79
Direct3D8: (ERROR) :Current Process (pid) = 00000d4c
Everything is released as it should be though. I was thinking I had to use AddRef(), but that doesn't work either :/ Thanks :) EDIT: Added how I called the functions. And calling the RenderVertexBuffer() function *does* crash it.
Direct3D8: (ERROR) :*** Exception in d:\builds\nt32_chk\multimedia\directx\dxg\d3d8\fe\vshader.cpp Line: 624
- An FVF error? [Edited by - The Forgotten Mindset on July 6, 2005 2:33:28 PM]

[dx8] Fullscreen troubles... [solved]

01 July 2005 - 04:26 PM

Hey guys, sorry for the newb question but, this code doesn't work in fullscreen (surprised?) I get an error on the CreateDevice() call, I tried looking it up but it was some weird negative number that didn't match anything. Oh, and it doesn't work in REF either.
// Initialize D3D!!!!!! //

ZeroMemory(&d3ddm, sizeof(d3ddm));
ZeroMemory(&d3dpp, sizeof(d3dpp));

if((m_pD3D = Direct3DCreate8(D3D_SDK_VERSION))==NULL)
	return FALSE;

if( m_Windowed )	// Works
	if(FAILED(m_pD3D->GetAdapterDisplayMode(D3DADAPTER_DEFAULT, &d3ddm)))
		return FALSE;

	d3dpp.Windowed         = TRUE;
	d3dpp.SwapEffect       = D3DSWAPEFFECT_COPY_VSYNC;
	d3dpp.BackBufferFormat = d3ddm.Format;
else	// Make FullScreen -Doesn't work
	// Find the matching fullscreen display mode
	for(UINT x = 0; x < m_pD3D->GetAdapterModeCount(D3DADAPTER_DEFAULT); x++)
		m_pD3D->EnumAdapterModes(0, x, &d3ddm);
		if(d3ddm.Width == m_Width)
			if(d3ddm.Height == m_Height)
				if((d3ddm.Format == D3DFMT_R5G6B5) || (d3ddm.Format == D3DFMT_X1R5G5B5)
					|| (d3ddm.Format == D3DFMT_X4R4G4B4))
					if(m_Depth == 16)
						break;	// found the right format
				else if((d3ddm.Format == D3DFMT_R8G8B8) || (d3ddm.Format == D3DFMT_X8R8G8B8))
					if(m_Depth == 32)
						break;	// found the right format
		}// end for loop

	d3dpp.Windowed				= FALSE;
	d3dpp.FullScreen_RefreshRateInHz	= D3DPRESENT_RATE_DEFAULT;
	d3dpp.FullScreen_PresentationInterval	= D3DPRESENT_INTERVAL_ONE;

	d3dpp.BackBufferCount	= 1;
	d3dpp.BackBufferWidth	= m_Width;
	d3dpp.BackBufferHeight	= m_Height;
	d3dpp.BackBufferFormat	= m_Format = d3ddm.Format;

}// end else if fullscreen

 //Create a Direct3D device.
                               D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &m_pD3DDevice)))
	return FALSE; // enters here, it failed

I hate this bug, please squash it :) EDIT: Addled "[solved]" to title. What a newbish thread of mine :/ [Edited by - The Forgotten Mindset on July 2, 2005 12:43:43 AM]

#southeastgamedev chat 1 update

29 June 2005 - 02:47 PM

Hey, I hope everyone can read this in time (doubtful), but I changed the chat date for this IRC meet to July 1st at 9:00 PM. Mabey it was a little selfish, but I just got called to work during those hours [crying] Hope you can make it