• 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

418 Neutral

About Keyboardwarrior

  • Rank
  1. Good day,   Currently i am trying to create a mesh converter for an old game but so far it hasn't turned out that well. The actual mesh is fine, but the problem is bones.   I'm looking at how wowmodelviewer (https://bitbucket.org/wowmodelviewer/wowmodelviewer/src/1a3a6a51944be4679964b3dc280efa421464cd97/src/modelexport_fbx.cpp?at=default) added bones as reference.   This is what i've come up with; void CreateSkeleton(FbxManager *sdk_mgr, FbxScene *scene, Z3DLODMesh *m, FbxNode *pMeshNode) { // Get the scene root node. FbxNode* root_node = scene->GetRootNode(); // Get the mesh's node. FbxNode* bone_group_node = FbxNode::Create(scene, "crayfish"); FbxSkeleton* bone_group_skeleton_attribute = FbxSkeleton::Create(scene, "crayfish"); bone_group_skeleton_attribute->SetSkeletonType(FbxSkeleton::eRoot); //bone_group_skeleton_attribute->Size.Set(100.0); bone_group_node->SetNodeAttribute(bone_group_skeleton_attribute); root_node->AddChild(bone_group_node); //FbxMatrix matrix; FbxSkin* skin = FbxSkin::Create(scene, ""); std::vector<FbxNode*> bone_nodes; std::vector<FbxCluster*> bone_clusters; std::vector<int> bone_types; int num_of_bones = g_Skel.GetSkeletonCount(); // Set bone type. for ( int i = 0; i < num_of_bones; i++ ) { long skelID = g_Skel.GetSkeletonHierarchy()[i]; if (skelID == -1) { bone_types.push_back(FbxSkeleton::eRoot); } else { bone_types.push_back(FbxSkeleton::eLimbNode); } } // Create bone. for ( int i = 0; i < num_of_bones; ++i) { long skelID = g_Skel.GetSkeletonHierarchy()[i]; matrix *z3dmatrix = g_Skel.GetLocMatrix(i); vector3 trans = z3dmatrix->GetLoc(); FbxNode* skeleton_node = FbxNode::Create( scene, g_Skel.GetSkeletonName(i) ); bone_nodes.push_back(skeleton_node); skeleton_node->LclTranslation.Set(FbxVector4(trans.x , trans.y, trans.z)); FbxSkeleton* skeleton_attribute = FbxSkeleton::Create( scene, g_Skel.GetSkeletonName(i) ); if (bone_types[i] == FbxSkeleton::eRoot) { skeleton_attribute->SetSkeletonType(FbxSkeleton::eRoot); //skeleton_attribute->Size.Set(100.0); bone_group_node->AddChild(skeleton_node); } else { skeleton_attribute->SetSkeletonType(FbxSkeleton::eLimbNode); //skeleton_attribute->Size.Set(100.0); bone_nodes[skelID]->AddChild(skeleton_node); } skeleton_node->SetNodeAttribute(skeleton_attribute); FbxCluster* cluster = FbxCluster::Create(scene, ""); bone_clusters.push_back(cluster); cluster->SetLink(skeleton_node); cluster->SetLinkMode(FbxCluster::eTotalOne); FbxAMatrix matrix = scene->GetEvaluator()->GetNodeGlobalTransform(pMeshNode); cluster->SetTransformMatrix(matrix); matrix = scene->GetEvaluator()->GetNodeGlobalTransform(skeleton_node); cluster->SetTransformLinkMatrix(matrix); skin->AddCluster(bone_clusters[i]); } int num_of_vertices = m->nVertexCount; for (int i = 0; i < num_of_vertices; i++) { Z3DVertex *vertex = &m->pVertices[i]; bone_clusters[ vertex->MatrixId[0] ]->AddControlPointIndex( i, static_cast<double>(vertex->fWeight) ); bone_clusters[ vertex->MatrixId[1] ]->AddControlPointIndex( i, static_cast<double>(vertex->fWeight) ); } skin->SetGeometry(pMeshNode->GetMesh()); } Running it and the outcome looks like:     Too bad that i has no clue when it comes down to 3d stuff, so i hope anyone here could explain what is going on and how to correct it.   Thanks.
  2. If you are using Microsoft visual studio you can force use '__forceinline' keyword, meanwhile 'inline' just gives the compiler a "hint". Inlining a function removes the call/ret overhead generated by compiler, but creates a larger executable image. The only time i use inlining is small tight loops where the overhead would cost too many cpu cycles, otherwise i rely on the compiler to make the right decision.
  3. My guess is that you are tying to queue up some keys then send them to some application?   std::vector<SDLKey> v; v.push_back(SDLK_1); v.push_back(SDLK_2); for(std::vector<SDLKey>::const_iterator i = v.begin(); i != v.end(); i++) { switch (*i) { case SDLK_1: KeyPress(1); break; case SDLK_2: KeyPress(2); break; default: break; } }
  4. [CODE] std::string TimeName = asctime(LocalTime); [/CODE] Adds a \x0A (new line) at the end.