• 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.

Doublefris

Members
  • Content count

    59
  • Joined

  • Last visited

Community Reputation

316 Neutral

About Doublefris

  • Rank
    Member
  1. you could try loading a precompiled shader to verify if it's indeed the compilers fault. that should also answer your question.
  2. OpenGL

    I'm not an expert but that's what I do.   TUs from 0 to 7 are for textures. 8 and on are for FBO attachments. This can be changed rather easily (defined in two places, one for shaders, other for the program, I'll have it defined in a single place someday). Limit is in the amount of textures bound per stage, not the texture unit number you use (although you can't use any TU number you want).   I don't claim its the best way to handle things though. You can come up with a system that dynamically binds whatever a shader program needs on the fly. I'm just saying I prefer convention over configuration, just to keep things simple.What do you mean by 'per stage'? Lets say I am using 8 units for texture samplers like you, this means I can have for instance 2 samplers in my vertex shader and 6 samplers in my fragment shader?
  3. When using multiple textures in my application, for framebuffers but also just samplers, should I bind them to different texture units? Like, a new texture could check which texture units are available and bind itself to one that is available, or is this unnecessary? Or maybe, since we are only allowed to have one texture target per texture unit, it's better to reserve certain textures for FBO uses and other for sampling? Please tell me how do you handle this, and does it make a difference efficiency wise or organizing your engine.
  4. Perhaps it would be obtain the maxiumum of the acceleration curve by differentation, call it T and divide the curve by (maxAcceleration / T), so that the maximum acceleration will match the object's.   Now I'm not sure, but because integrals are linear you could then simply stretch out the t parameter like you said by the inverse (T/maxAcceleration).
  5.   Corrected. Also did not know we could use latex in here.
  6. These matrices ( A & B ) both qualify as being orthogonal.   \[ \left [ \begin{matrix} 1 &0 &0 \\ 0 &1 &0 \\ 0 &0 &1 \end{matrix} \right ] \] \[ \left [ \begin{matrix} -1 &0 &0 \\ 0 &1 &0 \\ 0 &0 &1 \end{matrix} \right ] \]   Furthermore, my code says their quaternion representation is actually the same ( both the identity quaternion). glm gives me { 1/sqrt(2), 0, 0, 0 } for B curiously.   Also I know that det(A) = 1 and det(B) = -1   So I guess that orthogonal matrices have some sort of "sign" property to them, that gives the handedness of the basis? And how this work with quaternions? I suspect it might have some relation to the famous 'double cover' property of quaternions that people always mention. Basically the fact that Q and -Q correspond to the same rotation. I also wonder if this works for complex numbers as well as they're the 2d equivalent of quaternions.   Are there any other properties involving this 'sign'? I have a vague feeling it had something to do with the diagonal as well.   Maybe someone here has some deeper insights or facts to share about this
  7. I have been doing some gfx programming in opengl, and have some questions about it.   What is the relation between a vertex array (vao) and vertex buffer object (vbo)? When I call glBindBuffer(), I am getting that the first argument is like a global 'state' that is bound to the second argument? Like  glBindBuffer(GL_UNIFORM_BUFFER, uniformBufferHandle) will bind uniformbufferHandle to the uniform buffer object? If 2 is what I thought, then why do I need to use glBindFramebuffer() or glBindVertexArray(), rather than calling glBindBuffer(GL_FRAMEBUFFER, fbo) or whatever? What is the relation between glVertexAttribPointer(), glEnableVertexAttribArray(), and glEnableClientState()? Also, i'd like to know if there is some particular design philosophy that SGS chose or thing I should keep in mind. Like why they chose to go with this kind of buffer/handle design. Or some tips if you have any. I don't like calling all these opengl functions without knowing how exactly they should be used etc.
  8. Whether the dot product is an additional structure or not is debatable. As you point out, q * conjugate(q) is an important quantity (the square of the norm). This is a positive-definite quadratic form in the R-vector space of quaternions, and it naturally defines an inner product by writing norm_squared(q + w) = norm_squared(q) + norm_squared(w) + 2 * inner_product(q, w) The inner product defined that way is the same as the dot product of q and w as elements of R^4. So I wouldn't say it's an additional structure.   how would you derive this quaternion inner product using only quaternion arithmetic though?
  9. Managed to figure it out, also thanks to boost for their exp function // Raise a quaternion to a real power template <typename S> inline quaternion<S> pow(const quaternion<S> &q, const S ex) { return exp(ex * log(q) ); } // Raise a unit quaternion to a real power template <typename S> inline quaternion<S> unit_pow(const quaternion<S> &q, const S ex) { static const S C = S(1) - std::numeric_limits<S>::epsilon(); // Check for the case of an identity quaternion. // This will protect against divide by zero if ( std::abs(real(q)) > C ) return q; S a = acos( real(q) ); S u = a*ex; return quaternion<S>(std::cos(u), imag(q) * (std::sin(u) / std::sin(a))); } // logarithm of a quaternion. // when q is unit this gives { 0 + acos(r) * v/|v| } template <typename S> inline quaternion<S> log ( const quaternion<S> &q ) { S N = std::sqrt(norm(q)); return quaternion<S>( std::log(N), std::acos(real(q) / N) * normalize(imag(q)) ); } // exponential of a quaternion template <typename S> inline quaternion<S> exp( const quaternion<S> &q ) { S z = length(imag(q)); S w = std::sin(z) / z; return std::exp(real(q)) * quaternion<S>(std::cos(z), w * imag(q)); }
  10. An alternative formulation of the popular slerp function is:   (http://en.wikipedia.org/wiki/Slerp#Quaternion_Slerp)     my question is how is this actually computed in practice? Is it done by first finding the polar form and then multiplying the cosine and sine? I believe this is somewhat similar to how you would do it for complex numbers.
  11. Thanks, I was just making sure.   And thanks everybody for the input. appreciated.
  12. Not sure if there was some kind of misunderstanding here. What the two posters above me described is a "bloom" effect, right? I'm talking about the green glow around the dragon that happens when you hover a unit in dota2. I think left for dead 2 has it too.  A bloom effect is not what I want, but the outline of the rendered mesh around it.
  13. Hey there, it might have been asked before, but does anybody have an idea of how to implement an effect like this: (dota 2)   my idea was to render the backfaces of the mesh slightly scaled up first, but I think this wouldnt always work, since the scaling shouldnt always happen from the "center" of the mesh. Maybe the mesh itself is rendered and the resulting image is scaled up? I also don't know how to achieve a "glow". Any ideas?
  14. So I cant use the search function on my cellphone. Would be cool if i could. That's all ^^
  15. I think you mean the support vertex, which is the max dot product of a particular direction vector with the vertices of a (convex) polygon A.    Look at Dirk Gregorius 2013 slides, he explains it well. https://code.google.com/p/box2d/downloads/list