Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Jul 2012
Offline Last Active Dec 18 2012 12:54 PM

#5009856 Direct 2D for game Programming

Posted by on 12 December 2012 - 09:43 AM

I'll give you a great hint:


Then check out the first link!

#5007751 Read/Write binary

Posted by on 06 December 2012 - 07:32 AM

Never mind.

I solved it. Sinces vertices was already a pointer, I shouldnt have used "vertices" instead of "&vertices".


EDIT: I see you solved it too! Thanks for the help. Sometimes one just feels really stupid. And I blame my copy/paste! :D

#4999309 Boost threaded application crashes

Posted by on 09 November 2012 - 09:16 AM

I get an unhandled exception. It doesnt really give me much more information that this. I have only worked on this on my laptop. On my more powerful desktop, I have run it about 10 times in a row without crashes now. Starting to think it's just as simple as an "out of memory" issue. Could it be this?

#4969419 3D Game Math Books?

Posted by on 14 August 2012 - 06:06 AM

Mathematics for 3D Game Programming and Computer Graphics is great. Covers everything.

Is it very OpenGL oriented, or is it perfectly fine to use with DirectX 11 too?

#4969411 I need a jumpstart

Posted by on 14 August 2012 - 05:49 AM

Hello guys,

I'm in need of guidance and a jumpstart. I'm a computer engineering junior and I'm one of the top students in my class. But we all know that things we learn in college is too basic and nearly never help us with the practice.

I have a decent amount of knowledge in how programming languages work and am familiar with a variety of programming and scripting languages. (basically anything you would expect from a junior in college to know and a bit more)

I have a few simple questions.

1) How can I get started? Besides learning the programming and scripting languages required, should I go on with Unity3D or cocos2d or programs like that?

2) Is learning OpenGL or DirectX necessary? If so, doesn't graphics programming require a bit of artistic ability? I'm a bit confused here.

Thank you all in advance.

I would prefer learning DirectX or OpenGL, and start making simple programs, like rendering a cube, a sphere, and so on. In effect, building a very simple game engine. That way you learn extremely much.

There are great resources for learning. For example Rastertek has a lot at least for DirectX. Just google it =)

#4968077 c++ initiliazation what do you call it

Posted by on 10 August 2012 - 07:36 AM

There is nothing obscure about this. In C/C++ you have always been able to declare more than one variable in one statement, separated with commas.

int a, b, c;

is the same as

int a;
int b;
int c;

However, as has already been said, your example doesn't initialize a and b. Only c is set to null.
You can (of course) also initialize to different values:

int a = 3, i = 0, n = 42;

#4966686 Few question about DirectX 11

Posted by on 06 August 2012 - 09:14 AM

Looks the same with any filter in the sample.

D3D11_SAMPLER_DESC samplerDesc;
samplerDesc.Filter =  D3D11_FILTER_MIN_MAG_MIP_LINEAR;
samplerDesc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
samplerDesc.MipLODBias = 0.0f;
samplerDesc.MaxAnisotropy = 0;
samplerDesc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
samplerDesc.BorderColor[0] = 0;
samplerDesc.BorderColor[1] = 0;
samplerDesc.BorderColor[2] = 0;
samplerDesc.BorderColor[3] = 0;
samplerDesc.MinLOD = 0;
samplerDesc.MaxLOD = D3D11_FLOAT32_MAX;

Ok, stupid question, but do you SET the sampler state? Almost sounds as if you do not.

Also how can I display those quads in the same size even if I resize the window on change the resolution ?
Assuming I dont care about about window resizing. A monitor with a native resolution of 1024x768 will display a quad in the same ratio as I see it on my native resolution of 1920x1200 ?

You can, but you would have to do the calculations in your program.

#4966275 How do I create multiple instances of class?

Posted by on 05 August 2012 - 12:24 AM

Why nog let the world matrix reside inside your modelclass in some way? This way, every cube (or other model) gets its own representation.

#4963999 Iterate over TileLayers(Vector) doesn't work

Posted by on 28 July 2012 - 10:19 AM

Have you tried to set a breakpoint in your IDE, and step through the loops? That way you can easily see where things go wrong. Especially good while working on multidimensional sets of data, since it easily gets you confused otherwise.

#4963910 Learning Direct X 10

Posted by on 28 July 2012 - 04:47 AM

Yeah, I know how it is in the beginning. My tip for you is to start out small. Start your framework by creating a class, say "Window", and make sure that it can open a Windows window for you with simple calls. After that, make a class, something like "D3DEngine", and make sure it can initialize DirectX for you. Again, try to make it simple. And by that I mean that the user (maybe just you), can use these classes in simple ways. Ways that you understand if you pause for a year.

#4963901 New to game development. Help?

Posted by on 28 July 2012 - 03:48 AM

I have never done any web-app-programming, but it sounds like you want to learn Flash or Javascript. Perhaps you could google search for "flash tutorial" or something like that, and come back here if you need more information after.

#4963821 ID3D11Device::CreateBuffer returning E_INVALIDARG for no apparent reason.[RES...

Posted by on 27 July 2012 - 07:00 PM

Is vertexCount == 3?

Your call:
AssetManager->CreateVertexBuffer(&vertexBuffer,sizeof(VertexType)*vertexCount, &vertices);

Your definition:
void AssetManager::CreateVertexBuffer(ID3D11Buffer** buffer, unsigned int bufferSize, void* vertices, D3D11_USAGE bufferUsage, D3D11_CPU_ACCESS_FLAG processorAccess)

What are the default values?

ID3D11Buffer** buffer means pointer to pointer.
In the creation you have buffer pointer instead of *buffer pointer
HR(gD3DDevice->CreateBuffer(&bufferDesc, &subResData, *buffer));

Firstly, it has already been solved. But to answer your questions. About the parameters: Default values. He specified them a bit up when I asked. About the pointer. If you look closely, buffer IS ID3D11Buffer**. It wouldn't have compiled otherwise.

#4963818 ID3D11Device::CreateBuffer returning E_INVALIDARG for no apparent reason.[RES...

Posted by on 27 July 2012 - 06:51 PM

No. Default usage means that only the GPU can read and write. That other parameter has something to do with staging. Can't say I've never used it.

#4963816 ID3D11Device::CreateBuffer returning E_INVALIDARG for no apparent reason.[RES...

Posted by on 27 July 2012 - 06:43 PM

I always set it to 0 if I go with D3D11_USAGE_DEFAULT. I dont think you can use D3D11_CPU_ACCESS_READ for this.

#4963685 _BLOCK_TYPE_IS_VALID(pHead->nBlockUse)

Posted by on 27 July 2012 - 10:16 AM

That usually means that you try to delete something not allocated with new.

for example:
[source lang="cpp"]int a;int* pA = &a;delete pA;[/source]
would generate that error.