• 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

412 Neutral

About ViX3LG0N

  • Rank

Personal Information

  1. I also thought it would be complicated to make the snake move like in the original snake game, but i came up with this easy idea: for (unsigned int i = snake.size()-1; i > 0; i--) // start with the last element(body part) { //snake[i] = snake[i-1]; // works for my code //you would have to use snake[i].lastX = snake[i-1].lastX; and snake[i].lastY = snake[i-1].lastY; } Its important that your "snake-head" is the 0th element of the snake vector. I have just a vector<vec2> snake (vec2 is just x and y). So every time you move your snake-head in any direction the x and y of the next body-block just becomes the old head position(or the position of the block in the vector before it).
  2. 1. The feature you are trying to implement is called "Automapping". 2. SDL is used for opening a window with a context to display stuff on it and handles also the input. You have to think about if you want to use the SDL integrated 2D draw library or if you want to use OpenGL to draw your stuff. I can recommend you used OpenGL as it is easy to begin with, but also has endless level of complexity if you want to. Also there are a lot of tutorials for SDL+OpenGL 2D 3. The next problem would be you need to draw text in an SDL context, with OpenGL it could be hard for you to do text rendering. If you pick the SDL drawing library just use SDL_ttf. 4. I would do automapping with std::vector, so you have "dynamic arrays" and your level can grow struct Location { int x; int y; }; vector<Location> automap; void moveTo(int xPos, int yPos) { //Check if you already exploared this location bool alreadyAdded = false; for (unsigned int i = 0; i < automap.size; i++) { if (automap[i].x == xPos) { if (automap[i].y == yPos) { alreadyAdded = true; } } } if (!alreadyAdded) { Location tmpPos; tmpPos.x = xPos; tmpPos.y = yPos; automap.push_back(tmpPos); } } Lets say the location "middle in the forrest" is on position x:0 y:0 and if you start the game you call "moveTo(0,0);" Your Player moves to the north then call "moveTo(0,1);". Also its better if you make variables for the player-position and just call "moveTo(player.x,player.y)" every time you move to another location and also change the postion so if you go to the north just do "player.y++;" and call "moveTo(player.x,player.y);". The only thing you need to do now is draw the actual map(which should be correctly automapped with my theorie of automapping). But this is your decision on how to do that, if you choose OpenGL, i can help you again.   Hope this helps you a bit 
  3. Hey, I try to get working animations with Assimp. As you can see in the picture, head and lamp are correctly transformed, but the body isnt. Also notice the holes in the body. I think the problem is that the body is transformed by multiple bones. [attachment=17287:assimp.png]   My code is designed that the whole model is splitted into single meshes (Assimp does this). So each mesh has its own VBO with vertices, normals, uvs, weights ...   The bonematrices should be correctly calculated each frame. But maybe im uploaded them wrong to the shader: for (unsigned int m = 0; m < scene->mNumMeshes; m++) { /*...*/ if (scene->HasAnimations()&&scene->mMeshes[m]->HasBones()) { /*...*/ for (unsigned int i = 0; i < 100; i++) { mat4 tmpMat = mesh[m].bonemat[i]; string loc = "gBones["+convertInt(i)+"]"; glUniformMatrix4fv(glGetUniformLocation(shader, loc.c_str()), 1, GL_FALSE, value_ptr(tmpMat)); } /*...*/ } /*...(Draw)...*/ } Also im not sure if filling up the bonedata(bonematrix+weight for each vertex) is correct: for (unsigned int m = 0; m < scene->mNumMeshes; m++) { /*...*/ if (scene->HasAnimations()&&scene->mMeshes[m]->HasBones()) { for (unsigned int k = 0; k < 100; k++) { mesh[m].bonemat[k] = mat4(1.0); } for(unsigned int i = 0; i < scene->mMeshes[m]->mNumVertices; i++) { ivec4 tmpID; vec4 tmpW; for (unsigned int h = 0 ; h < 4; h++) { tmpID[h] = 0; tmpW[h] = 0.0; } mesh[m].boneIDs.push_back(tmpID); mesh[m].weights.push_back(tmpW); } for(unsigned int i = 0; i < scene->mMeshes[m]->mNumBones; i++) { for (unsigned int j = 0 ; j < scene->mMeshes[m]->mBones[i]->mNumWeights ; j++) { int v = scene->mMeshes[m]->mBones[i]->mWeights[j].mVertexId; float w = scene->mMeshes[m]->mBones[i]->mWeights[j].mWeight; //check if is filled int notFilled = -1; for (unsigned int h = 0 ; h < 4; h++) { if (notFilled == -1) { if (mesh[m].weights[v][h] == 0.0) { notFilled = h; } } } mesh[m].boneIDs[v][notFilled] = i; mesh[m].weights[v][notFilled] = w; } } } /*...*/ } If this code is out of context for you, i linked the whole Model class from my dropbox account. Model.h Model.cpp   Hopefully we find a solution