• 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

2503 Excellent

About Sponji

  • Rank
  1. Googled with "sdl2 mingw raiseexception" and it says that you should add this line before any calls to SDL:  SDL_SetHint(SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING, "1");
  2. void function(const std::vector<std::unique_ptr<Base>> &v) {     // ... } void calling() {     std::vector<std::unique_ptr<Base>> v;     function(v); }
  3. https://www.gamedev.net/topic/663264-obj-file-problem/#entry5195460
  4. The documentation says that it doesn't modify the passed variable if the color isn't found, so you can just put up your own default values for the colors before trying to get them.
  5. Maybe Assimp just fails to load the ambient color, have you checked if those calls to aiGetMaterialColor return AI_SUCCESS?
  6. The model and animation seemed to work nicely for me, and the only modifications I made to that zip were just 1) that one quaternion line 2) adding that missing call to initWindow before creating the GL context 3) and adding glEnable(GL_DEPTH_TEST). And I realized that the mouse wheel worked after all, I just didn't expect it to update time directly :P
  7. Ok, I gave it a better try and seems like the main problem is in Model.cpp, line 263. glm::quat expects w,x,y,z for its constructor's parameters, and you've typed x,y,z,w. You should also probably enable depth testing somewhere with glEnable(GL_DEPTH_TEST). The model is still rotated 90 degrees by x-axis though, but that's some another problem. I'd suggest making helper functions for converting all the required types to glm (just like you have the convertMatrix function), I did it like this the last time I used assimp: static inline glm::vec3 vec3_cast(const aiVector3D &v) { return glm::vec3(v.x, v.y, v.z); } static inline glm::vec2 vec2_cast(const aiVector3D &v) { return glm::vec2(v.x, v.y); } // it's aiVector3D because assimp's texture coordinates use that static inline glm::quat quat_cast(const aiQuaternion &q) { return glm::quat(q.w, q.x, q.y, q.z); } static inline glm::mat4 mat4_cast(const aiMatrix4x4 &m) { return glm::transpose(glm::make_mat4(&m.a1)); } Also a tip for sending the bone transforms, instead of looping through the array, you can send everything at once, like this: glUniformMatrix4fv(glGetUniformLocation(program, "BoneMatrices"), transforms.size(), GL_FALSE, glm::value_ptr(transforms[0])); Hopefully this helped!
  8. CMake is totally fine, I use it on Linux too. And I don't mind messy code, but is this actually the version you described? I had to add a call to initWindow() and mouse wheel didn't seem to do much. Just tested it quickly though, I'll check this out better later today.
  9. Yeah, that could work, or did you find out the problem already?
  10. "The disadvantage is that WM_INPUT has no ballistics applied to its data, so if you want to drive a cursor with this data, extra effort will be required to make the cursor behave like it does in Windows. For more information about applying pointer ballistics, see Pointer Ballistics for Windows XP."   https://msdn.microsoft.com/en-us/library/windows/desktop/ee418864(v=vs.85).aspx   Too bad the pointer ballistics link is removed, though. Why do you want to use rawinput if you want the cursor position?
  11. I've been using SDL for years and I think it's just awesome to get stuff working crossplatform much easier. But of course it still takes time to get some specific things working in some weird situations. Probably took me a few days to get my little framework working with Emscripten the first time I used it, mostly because of a shader bug which only happened on Chromium.   I think you're in the right direction with designing it to work with different libraries, the final game under your framework/engine shouldn't care what library is creating the graphics contexts or processing input events or whatever. You can even make your own code for handling those later on, if it's really needed. Just don't spend too much time on making some random wrapper classes at first. Make it work with one library first and clean up if/when you realize something could be done better.
  12. And you've made sure the shaders compile fine? Does glGetUniformLocation return valid location? Did you bind the attribute locations correctly? Btw, AMD's CodeXL is the new gDEBugger.
  13. I don't see anything wrong with the vertex attributes, but yeah, it's usually unnecessary to disable them. You can just set up everything in your VAO and its buffers and attributes will be remembered next time you bind the VAO.   One problem could be with your glUniform call, you're passing weird stuff for it, you shouldn't use texture id for it. Maybe that's not the actual problem if the texture id is a sane number for glActiveTexture call, but at least I'd suggest fixing that one. GLuint texture_id = ...; int index = 0; glActiveTexture(GL_TEXTURE0 + index); glUniform1i(shader.getUniformLocation("sampler"), index); glBindTexture(GL_TEXTURE_2D, texture_id);
  14. And did you try using byte offset for glBufferSubData and index offset for glMultiDrawArrays?
  15. I haven't used multidraw things myself, but isn't your offset wrong? Shouldn't it be the index for the first vertex, and not the byte offset? // Offset += (VertexBuffer.size() * sizeof(GLfloat)); Offset += ShapeVertices.size()