• 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.

Focusrite

Members
  • Content count

    6
  • Joined

  • Last visited

Community Reputation

100 Neutral

About Focusrite

  • Rank
    Newbie
  1. Hello Gamedev, I'm working on a 2d shadow system (by drawing to an alpha layer texture, which blends the world accordingly) and require a stencil test to make multiple light sources to work propperly. However, there's an issue with the stencil test when it passes through the shader, it still renders. The "algorithm" used is:[list=1] [*]Draw point light onto stencil. [*]Apply shadow (ie. remove the drawn light where it does not reach, behind walls etc) [*]Render the point light to the alpha layer where stencil allows (ie. where shadows haven't removed) [/list] The render, step 3, has to pass through the shader and isn't blocked by the stencil, and it's completely rendered onto the alpha layer, is there any way you can make the shader too be blocked by the stencil test? Regards Focusrite [img]http://public.gamedev.net//public/style_emoticons/default/smile.png[/img]
  2. Ah sorry should mention that, yeah other types of rendering works, graphics renders rectangles, textures, lines etc without any issues at all, it's just this one giving me a headache. And no, afraid it's not the shaders as they're as of yet to be added to the project.. hm. I haven't heard of that PIX, what kind of tool is it? Google seemed not so helpful when searching for it.
  3. Hey Gamedev! I need to render 2d polygons and thus came up with this solution: [code] if(FAILED(gd3dDevice->CreateVertexBuffer(sizeof(RectVertex) *32, D3DUSAGE_DYNAMIC, 0, D3DPOOL_DEFAULT, &mVB_Rect, NULL))) MessageBox(0, "Error creating RectVertex buffer", 0, 0); //Slightly misleading name, it's a vertexdefiniton containing just position and color //---------- void Graphics::drawPolygon(cPolygon* shape, D3DCOLOR color, bool filled) { if(shape->requireTriangulation()) shape->triangulate(); //Triangulates the polygon if not already done - stores in "shape->triangles" // Set vertex declaration and stream source gd3dDevice->SetVertexDeclaration(RectVertex::Decl); gd3dDevice->SetStreamSource(0, mVB_Rect, 0, sizeof(RectVertex)); // Lock and set the vertices position and texture coordinates RectVertex *vertices = 0; mVB_texture->Lock(0, 0, (void**)&vertices, 0); for(int i = 0; i<shape->getTriangles().size()/3; i++) { vertices[i*3+0].color = color; vertices[i*3+0].pos.x = shape->getTriangles()[i*3+0].x + shape->getPos().x; //Due to triangles beeing in local coordinates vertices[i*3+0].pos.y = shape->getTriangles()[i*3+0].y + shape->getPos().y; vertices[i*3+0].pos.z = 0.0f; vertices[i*3+1].color = color; vertices[i*3+1].pos.x = shape->getTriangles()[i*3+1].x + shape->getPos().x; vertices[i*3+1].pos.y = shape->getTriangles()[i*3+1].y + shape->getPos().y; vertices[i*3+1].pos.z = 0.0f; vertices[i*3+2].color = color; vertices[i*3+2].pos.x = shape->getTriangles()[i*3+2].x + shape->getPos().x; vertices[i*3+2].pos.y = shape->getTriangles()[i*3+2].y + shape->getPos().y; vertices[i*3+2].pos.z = 0.0f; } // Unlock the vertex buffer mVB_texture->Unlock(); if(filled) gd3dDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_SOLID); else gd3dDevice->SetRenderState(D3DRS_FILLMODE, D3DFILL_WIREFRAME); // Draw image gd3dDevice->DrawPrimitive(D3DPT_TRIANGLELIST, 0, shape->getTriangles().size()/3); } [/code] But it doesn't render at all! If i debug, it's ran, and the shape has the values it is supposed to have. I do not believe the triangulation is the issue, it was not originally written by me, and on debug it gives *very* plausable results. The (only slightly modded) triangulation technique here: [url="http://www.flipcode.com/archives/Efficient_Polygon_Triangulation.shtml"]http://www.flipcode....ngulation.shtml[/url] Anyone have any clue on why it does not work? Thanks in advance! - Focusrite
  4. It was a linking error all right. Bizarrely enough, selecting the same lib directory that was already set up (x86... on an x64 machine) once again did the trick. And it was the same, no typos Thanks for the help, finally can get to actually code on this machine!
  5. ~48h bump It's a friggin' strange error.. really hope someone here might have a clue on what to do
  6. Hey GameDev, as a first time poster I figured another of those pesky problems could be in order! I recently upgraded to windows 7/VC10 from my ol' buddy XP and getting directX was in order. Everything was installed and a test project was created (Frank Luna's "Hello World!" App), libraries/includes set up et al. (Libraries: d3d9.lib, d3dx9d.lib, dxguid.lib, DxErr.lib, dinput8.lib). Onwards to compiling were things doesn't exactly go very well - DXTrace is apparently an unresolved external! I've figured this is due to the character set used (Multi-byte) but changing this causes problems elsewhere in the project due to wrong the wrong character set. At some places things can be fixed with that _T macro (when using Unicode) but at some places I can't seem to sort it out without causing new problems and errors. Google was to little help, not many seems to have had this problem. Thanks in advance Focusrite [quote name="Error list"]Error 2 error LNK2019: unresolved external symbol _DXTraceA@20 referenced in function "public: virtual void __thiscall D3DApp::initDirect3D(void)" (?initDirect3D@D3DApp@@UAEXXZ) D:\Dokument\Viktor\VC\Projects\Nyctophobia\Nyctophobia\d3dApp.obj Error 4 error LNK2019: unresolved external symbol _Direct3DCreate9@4 referenced in function "public: virtual void __thiscall D3DApp::initDirect3D(void)" (?initDirect3D@D3DApp@@UAEXXZ) D:\Dokument\Viktor\VC\Projects\Nyctophobia\Nyctophobia\d3dApp.obj Error 5 error LNK2019: unresolved external symbol _D3DXCreateFontIndirectA@12 referenced in function "public: __thiscall HelloD3DApp::HelloD3DApp(struct HINSTANCE__ *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,enum _D3DDEVTYPE,unsigned long)" (??0HelloD3DApp@@QAE@PAUHINSTANCE__@@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4_D3DDEVTYPE@@K@Z) D:\Dokument\Viktor\VC\Projects\Nyctophobia\Nyctophobia\HelloDirect3D.obj Error 3 error LNK2001: unresolved external symbol _DXTraceA@20 D:\Dokument\Viktor\VC\Projects\Nyctophobia\Nyctophobia\HelloDirect3D.obj Error 6 error LNK1120: 3 unresolved externals D:\Dokument\Viktor\VC\Projects\Nyctophobia\Debug\Nyctophobia.exe [/quote] PS: It's DX9 btw, since the book by Luna is written for 9c (It's the "a shaders approach" edition). Why I really want to get this to work is because the whole book is based on this framwork! (The framework can be read here: [url="http://www.dreamincode.net/forums/topic/45066-introduction-to-directx-part-ii/"]http://www.dreaminco...irectx-part-ii/[/url]) DS Edit: Might be worth noting that I've had it up and running previously on XP/VC08.