• 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

126 Neutral

About Frongo

  • Rank
  1. Ahh, I was hoping to avoid that quartic but I guess this is the only way to do it. Unfortunately that would be too expensive to implement in our particular project so I've come up with another (less math intensive) solution for the greater problem. I now know where to come for my math questions/problems. Thanks
  2. Hey guys, My problem is somewhat unique and I'm not really sure how to solve it in a non-iterative fashion: 1 - Given a starting point, ending point, and one control point for a bezier curve in 2D space, I need to find a point on the curve that is exactly at a given distance from the starting point of the curve. 2 - If there are multiple candidates (I believe there can be 2 at the most), I need to figure out which one comes first when walking through the path. [attachment=5914:bezier distance.jpg]
  3. I just switched my rendering to one render call with a texture buffer to hold the matrices and 1 interleaved VBO. I went from 9 fps to 11 fps. @rewolfer Good point. However I just changed it so that the VBO is set up only once but for some reason I didn't get any fps increase out of it. I just tried sending a single matrix to my shader instead of the texture buffer and drawing all 1600 models with that single matrix which brought me up to 15 fps. I also tried switching back to my original rendering method I used in 2.0 (send 1 matrix to shader, render model once, repeat 1600 times) with the same results (15fps). It seems that using buffers has a lot of overhead. I noticed that when I use them my desktop performance slows down a lot (graphical interface is just as laggy as my game). Switching to straight vertexattribarrays doesn't have the slowing effect on my desktop but the fps is way worse (1-2fps). I miss display lists...
  4. I'm using a GTX 285 on windows 7 64 bit. My rendering loop is as follows: float matArray[16 * 40]; test->SetModel(); for(int i = -20; i < 20; i++) { for(int p = -20; p < 20; p++) { tmp.Translation(i * 0.5f, 0.0f, p * 0.5f); matArray[((p + 20) * 16)] = tmp.members[0]; matArray[((p + 20) * 16) + 1] = tmp.members[1]; matArray[((p + 20) * 16) + 2] = tmp.members[2]; matArray[((p + 20) * 16) + 3] = tmp.members[3]; matArray[((p + 20) * 16) + 4] = tmp.members[4]; matArray[((p + 20) * 16) + 5] = tmp.members[5]; matArray[((p + 20) * 16) + 6] = tmp.members[6]; matArray[((p + 20) * 16) + 7] = tmp.members[7]; matArray[((p + 20) * 16) + 8] = tmp.members[8]; matArray[((p + 20) * 16) + 9] = tmp.members[9]; matArray[((p + 20) * 16) + 10] = tmp.members[10]; matArray[((p + 20) * 16) + 11] = tmp.members[11]; matArray[((p + 20) * 16) + 12] = tmp.members[12]; matArray[((p + 20) * 16) + 13] = tmp.members[13]; matArray[((p + 20) * 16) + 14] = tmp.members[14]; matArray[((p + 20) * 16) + 15] = tmp.members[15]; } uniformPos = glGetUniformLocation(ShaderManager::instance()->ProgramObject, "matArray"); glUniformMatrix4fv(uniformPos, 40, 0, matArray); test->RenderInstanced(40); } The functions used in the render loop are: GLvoid Model::SetModel() { glBindBuffer(GL_ARRAY_BUFFER, mpModelBuffers[0]); glBufferData(GL_ARRAY_BUFFER, nTriangles * 9 * sizeof(GLfloat), mpVertexArray, GL_STATIC_DRAW); glVertexAttribPointer((GLuint)0, 3, GL_FLOAT, GL_FALSE, 0, 0); glEnableVertexAttribArray(0); glBindBuffer(GL_ARRAY_BUFFER, mpModelBuffers[1]); glBufferData(GL_ARRAY_BUFFER, nTriangles * 9 * sizeof(GLfloat), mpNormalArray, GL_STATIC_DRAW); glVertexAttribPointer((GLuint)2, 3, GL_FLOAT, GL_FALSE, 0, 0); glEnableVertexAttribArray(2); glBindBuffer(GL_ARRAY_BUFFER, mpModelBuffers[2]); glBufferData(GL_ARRAY_BUFFER, nTriangles * 6 * sizeof(GLfloat), mpTexCoordArray, GL_STATIC_DRAW); glVertexAttribPointer((GLuint)8, 2, GL_FLOAT, GL_FALSE, 0, 0); glEnableVertexAttribArray(8); /*glBindBuffer(GL_ARRAY_BUFFER, mpModelBuffers[3]); glBufferData(GL_ARRAY_BUFFER, nTriangles * 9 * sizeof(GLfloat), mpTangentArray, GL_STATIC_DRAW); glVertexAttribPointer((GLuint)6, 3, GL_FLOAT, GL_FALSE, 0, 0); glEnableVertexAttribArray(6); glBindBuffer(GL_ARRAY_BUFFER, mpModelBuffers[4]); glBufferData(GL_ARRAY_BUFFER, nTriangles * 9 * sizeof(GLfloat), mpBitangentArray, GL_STATIC_DRAW); glVertexAttribPointer((GLuint)7, 3, GL_FLOAT, GL_FALSE, 0, 0); glEnableVertexAttribArray(7);*/ } GLvoid Model::RenderInstanced(int count) { ModelTable::instance()->triangleCount += nTriangles * count; glDrawArraysInstanced(GL_TRIANGLES, 0, nTriangles * VERTPERTRI, count); } @Danny02 I just tried to reduce the draw calls as you suggested by drawing 250 instances 6 times. The fps is the same. I'll start working on the approach you suggested now and report my results back here.
  5. I'm playing around with a small engine I built which I have recently converted from OpenGL 2.0 and GLSL 1.0 to 3.3 and GLSL 1.5. I was testing to see how many polygons I could render on the screen by rendering a 6008 triangle model 1600 times (9,612,800 triangles). With 2.0 I was using interleaved array inside a display list to draw. The rendering loop involved a for loop where I would create a matrix, send it to the shader, call display list, repeat 1600 times. The shader has nothing more than simple ambient diffuse and specular lighting. When I converted to 3.3, I couldn't use display lists or interleaved arrays anymore so I switched to using 3 VBOs and rendering using glDrawArraysInstanced. The loop consists of setting up 40 matrices, sending them to the shader, rendering 40 models, repeat 40 times. Before entering the loop, I set my buffers one time only. For some reason the 2.0 approach gets about 36 fps while the 3.3 approach only gets about 9 fps. Do these results make sense? Or is there something wrong with my engine?
  6. The problem is fixed, sort of... I'm guessing there is a bug in nvidia's display driver as my code works fine on driver version 257.17 and older. My setup is an EVGA GTX 285 on windows 7 x64. It would be interesting to see if anyone can recreate this freeze. All I have to do is put about 100 glutBitmapCharacter in a for loop to create this freeze in any program. I tried downloading nehe's bitmapcharacter sample and the same problem existed.
  7. I'm not sure calculating the tangent and bitangent per frame is really necessary. If you have your tangent and bitangent calculated on your model in its default pose, you should be able to multiply the default pose tangent and bitangent by your bone matrices the same way it is done with normals. I'm not sure what kind of artifacts this would produce, perhaps there is some more research to be done there. After you have your tangent and bitangent multiplied with your bone matrices, you could sample your tangent space normal map and convert it into a world space normal, then pass it to your post renderer. This approach would fit in nicely with your values you're already sending to your post renderer, and would avoid calculating your tangent and bitangent per frame.
  8. Hi guys, I'm having a very strange problem when using glutBitmapCharacter. When I use it, sometimes it will cause my game to lock up indefinitely. The lockup happens after displaying about 30 frames of the text. I found that the frequency of the lockups is somewhat dependent on how many characters I output. I have been able to make my game freeze by outputting as little as 14 characters, nothing below that though. The characters I output do not matter, I have tried just putting '3' as the character 15 times, resulting in a freeze. When my game freezes, I do a break all in visual studio. After doing a break all and continue 2 or 3 times, it does a soft break or something like that and stops inside my PeekMessage function. For some reason it gets stuck inside the actual PeekMessage function forever. My PeekMessage function looks like this: if(InSendMessage())// prevents deadlocks from not replying to threads outside of this one ReplyMessage(TRUE); while (PeekMessage (&msg, NULL, 0, 0, PM_NOREMOVE)) { if (!GetMessage (&msg, NULL, 0, 0)) { gExiting = true; break; } TranslateMessage (&msg); DispatchMessage (&msg); } The reason why I have the InSendMessage block is because I've heard it can fix this problem when messages sent from other threads don't get a return. Any suggestions?