• 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

124 Neutral

About Krauser

  • Rank
  1. Hi! I am getting 2d rendering with scale, rotation and traslation of texture (I made this by filling the vertex/index buffer to get a rectangle where my texture is rendered). Now, I'm going to check when the mouse is on texture by coordinates.  For example:  if(curPos.x > positionX && curPos.y > positionY && curPos.x < positionX + imgWidth && curPos.y < positionY + imgHeight) { return true; } Obviously,when I rotate my textures, it isn't correct. How can I do? Sorry for English.
  2. I added the flag "aiProcess_PreTransformVertices" in my read function .
  3. Great now it work! Problem solved. Thanks .
  4. Rendering code: void ModelClass::Render(ID3D11DeviceContext* deviceContext) { unsigned int stride; unsigned int offset; // Set vertex buffer stride and offset. stride = sizeof(VertexType); offset = 0; // Set the vertex buffer to active in the input assembler so it can be rendered. deviceContext->IASetVertexBuffers(0, 1, &m_vertexBuffer, &stride, &offset); // Set the index buffer to active in the input assembler so it can be rendered. deviceContext->IASetIndexBuffer(m_indexBuffer, DXGI_FORMAT_R32_UINT, 0); // Set the type of primitive that should be rendered from this vertex buffer, in this case triangles. deviceContext->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST); return; } void ShaderClass::Render(ID3D11DeviceContext* deviceContext, int indexCount) { // Set the vertex input layout. deviceContext->IASetInputLayout(m_layout); // Set the vertex and pixel shaders that will be used to render this triangle. deviceContext->VSSetShader(m_vertexShader, NULL, 0); deviceContext->PSSetShader(m_pixelShader, NULL, 0); // Set the sampler state in the pixel shader. deviceContext->PSSetSamplers(0, 1, &m_sampleState); // Render the triangle. deviceContext->DrawIndexed(indexCount, 0, 0); return; }
  5. Ok Thanks for advise, It doesn't work removing: aiProcess_SplitLargeMeshes aiProcess_SortByPType m_LocalImporter.SetPropertyInteger(AI_CONFIG_PP_SBP_REMOVE, aiPrimitiveType_LINE);   But I am sure that work with separate drawcall, I'm trying tomorrow. If I find an alternative solution I share here.
  6. Thanks :D, Direct link: http://rs513p2.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=1246163158&filename=Car.obj&cookie=D43D984F2E4AAF9B40F185DD2D28279357615E833B8E80DC2D92A141C94A16B373D0E30E4AE683200DF2331CE0130B0B&directstart=1
  7. Yes, both of these meshes with the Assimp Viewer are displayed correctly. I don't understand because my engine doesn't load all the meshes
  8. Thanks for reply. No they aren't, the number of mesh change because the model has been converted. This is my problem, my application don't display all meshes of model.
  9. I'm trying to load a mesh in my application using assimp. But this work well only with the format .stl, but with other format only a part of mesh is displayed. This is my code:   bool ModelClass::LoadModel(char* filename) { Assimp::Importer m_LocalImporter; // Important! Makes sure that if the angle between two face normals is > 80 they are not smoothed together. // Since the angle between a cubes face normals is 90 the lighting looks very bad if we don't specify this. m_LocalImporter.SetPropertyFloat(AI_CONFIG_PP_GSN_MAX_SMOOTHING_ANGLE, 80.0f); m_LocalImporter.SetPropertyInteger(AI_CONFIG_IMPORT_TER_MAKE_UVS, 1); m_LocalImporter.SetPropertyInteger(AI_CONFIG_PP_SBP_REMOVE, aiPrimitiveType_LINE); const aiScene* scene = NULL; UINT NumMeshes; UINT NumFaces; scene = m_LocalImporter.ReadFile(filename, aiProcess_CalcTangentSpace | aiProcess_Triangulate | aiProcess_GenSmoothNormals | aiProcess_SplitLargeMeshes | aiProcess_ConvertToLeftHanded | aiProcess_SortByPType); if(scene) { NumMeshes = scene->mNumMeshes; for(DWORD nMesh=0; nMesh < NumMeshes; nMesh++) { aiMesh* mesh = scene->mMeshes[nMesh]; for(DWORD nVertex = 0; nVertex < mesh->mNumVertices; nVertex++) { VertexType vertex; vertex.position.x = mesh->mVertices[nVertex].x; vertex.position.y = mesh->mVertices[nVertex].y; vertex.position.z = mesh->mVertices[nVertex].z; vertex.normal.x = mesh->mNormals[nVertex].x; vertex.normal.y = mesh->mNormals[nVertex].y; vertex.normal.z = mesh->mNormals[nVertex].z; if(mesh->HasTextureCoords(0)) { vertex.texture.x = mesh->mTextureCoords[0][nVertex].x; vertex.texture.y = mesh->mTextureCoords[0][nVertex].y; } vVertices.push_back(vertex); } for(DWORD nFaces = 0; nFaces < mesh->mNumFaces; nFaces++) for(int nIndex = 0; nIndex < mesh->mFaces[nFaces].mNumIndices; nIndex++) vIndices.push_back(mesh->mFaces[nFaces].mIndices[nIndex]); } } else { return false; } return true; } Screen: OBJ format:   STL format:   My obj file: http://rs513p2.rapidshare.com/cgi-bin/rsapi.cgi?sub=download&fileid=1246163158&filename=Car.obj&cookie=D43D984F2E4AAF9B40F185DD2D28279357615E833B8E80DC2D92A141C94A16B373D0E30E4AE683200DF2331CE0130B0B&directstart=1