• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.


  • Content count

  • Joined

  • Last visited

Community Reputation

102 Neutral

About zephia

  • Rank
  1. Oh, I see. Thank you so much for this help! I did not realize that aspect at all. Again, thank you.
  2. Hello, I recently started learning DirectX and Direct3D 10 ( I know, not 11, but please bear with me ^^ ) by reading the Ultimate Game Programming as well as Luna's books. I feel like I have missed a glaringly obvious detail, in that I still do not know how to rotate / transform vertices independently? What I mean is, I currently have a program which simply displays 2 cubes, and what I'd like to do is rotate one a certain angle in the y-direction, and the other one a certain angle in the x-direction. I feed in a transformation matrix into my shader ( made from using the MatrixRotationY and MatrixRotationX functions ), and I change that matrix before each object's draw call, yet no matter what, I end up with the two cubes oriented the exact same way. Can someone explain what I am doing wrong? This is my shader file: [source lang="plain"]cbuffer Variables { matrix World; matrix View; matrix Projection; matrix Transform; }; struct PS_INPUT { float4 Pos : SV_POSITION; float4 Color : COLOR0; }; PS_INPUT VS( float4 Pos : POSITION, float4 Color : COLOR ) { PS_INPUT psInput; Pos = mul ( Pos, Transform ); Pos = mul ( Pos, World ); Pos = mul ( Pos, View ); psInput.Pos = mul( Pos, Projection ); psInput.Color = Color; return psInput; } PS_INPUT VS2( float4 Pos : POSITION, float4 Color : COLOR ) { } float4 PS( PS_INPUT psInput ) : SV_Target { return psInput.Color; } technique10 Render { pass P0 { SetVertexShader ( CompileShader( vs_4_0, VS() ) ); SetGeometryShader ( NULL ); SetPixelShader ( CompileShader( ps_4_0, PS() ) ); } }[/source] And here are parts of my main file: I build my effect and vertex layouts here [source lang="cpp"]void InitDirect3DApp::buildFX() { DWORD shaderFlags = D3D10_SHADER_ENABLE_STRICTNESS; #if defined( DEBUG ) || defined( _DEBUG ) shaderFlags |= D3D10_SHADER_DEBUG; shaderFlags |= D3D10_SHADER_SKIP_OPTIMIZATION; #endif ID3D10Blob* compilationErrors = 0; HRESULT hr = 0; hr = D3DX10CreateEffectFromFile(L"shadertest.fx", 0, 0, "fx_4_0", shaderFlags, 0, md3dDevice, 0, 0, &mFX, &compilationErrors, 0); if(FAILED(hr)) { if( compilationErrors ) { MessageBoxA(0, (char*)compilationErrors->GetBufferPointer(), 0, 0); ReleaseCOM(compilationErrors); } DXTrace(__FILE__, (DWORD)__LINE__, hr, L"D3DX10CreateEffectFromFile", true); } mTech = mFX->GetTechniqueByName("Render"); pViewMatrixEffectVariable = mFX->GetVariableByName( "View" )->AsMatrix(); pProjectionMatrixEffectVariable = mFX->GetVariableByName( "Projection" )->AsMatrix(); pWorldMatrixEffectVariable = mFX->GetVariableByName( "World" )->AsMatrix(); pTransformationMatrixEffectVariable = mFX->GetVariableByName( "Transform" )->AsMatrix(); } void InitDirect3DApp::buildVertexLayouts() { // Create the vertex input layout. D3D10_INPUT_ELEMENT_DESC vertexDesc[] = { {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D10_INPUT_PER_VERTEX_DATA, 0}, {"COLOR", 0, DXGI_FORMAT_R32G32B32A32_FLOAT, 0, 12, D3D10_INPUT_PER_VERTEX_DATA, 0} }; [/source] here is where I try to draw my cubes, with different orientations: [source lang="cpp"]void InitDirect3DApp::drawScene() { D3DApp::drawScene(); md3dDevice->OMSetDepthStencilState(0, 0); float blendFactors[] = { 0.0f, 0.0f, 0.0f, 0.0f }; md3dDevice->OMSetBlendState(0, blendFactors, 0xffffffff); md3dDevice->IASetInputLayout(mVertexLayout); md3dDevice->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST); static float r; D3DXMATRIX w; D3DXMatrixIdentity(&w); //D3DXMatrixRotationY(&w, r); //r += 0.001f; mWVP = mView * mProj; pWorldMatrixEffectVariable->SetMatrix(w); pViewMatrixEffectVariable->SetMatrix(mView); pProjectionMatrixEffectVariable->SetMatrix(mProj); pTransformationMatrixEffectVariable->SetMatrix(mTransform); D3D10_TECHNIQUE_DESC techDesc; mTech->GetDesc( &techDesc ); for (UINT p = 0; p < techDesc.Passes; ++p) { mTech->GetPassByIndex( p )->Apply(0); D3DXMatrixRotationY(&mTransform, -.2f); mShape1.draw( 0.5f, 0.3f, 0.0f ); D3DXMatrixRotationX(&mTransform, .3f); mShape2.draw( 1.0f, -0.3f, 0.5f ); } // We specify DT_NOCLIP, so we do not care about width/height of the rect. RECT R = {50, 50, 0, 0}; mFont->DrawText(0, mFrameStats.c_str(), -1, &R, DT_NOCLIP, BLACK); mSwapChain->Present(0, 0); }[/source] Thank you so much for any help you can give. And I apologize if I made some pretty obvious mistakes ( which I feel like I did ).