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

StiNKy

Members
  • Content count

    63
  • Joined

  • Last visited

Community Reputation

144 Neutral

About StiNKy

  • Rank
    Member
  1. Thanks haegarr and someusername, very helpful!
  2. Hi all. I'm having a bit of a problem figuring this out. Given that I have unit vector A, how can I find Quaternion Q which will rotate that vector to the direction of unit vector B? I tried making a Quaternion version of vector A by copying in the xyz components and setting the scalar to 0, and the same with vector B. And depending on the dot product between vector A and B I did one of the following: Quaternion Q = Conjugate(Quaternion A) * Quaternion B or Quaternion Q = Quaternion B * Conjugate(Quaternion A) I'm not too sure if this is the best, or even correct approach? Can anyone give me some advice? Thanks in advance.
  3. Yay I've figured it out. After going through the OpenGL GLSL manual, I noticed this definition: syntax: float length (genType x) description: Returns the length of vector, i.e., sqrt(x[0]*x[0] + x[1]*x[1] + ...) Naturally, gl_Vertex is a 4D vector, so normalizing it requires the length, which would return: sqrt(x*x + y*y + z*z + w*w) How very irritating that is...
  4. Actually, not declaring texture co-ordinates still has the cube textured, just the texture co-ordinate 0,0 (I think it's 0,0) is mapped to every vertex. So if you see strange discolouration, it's because of that ;)
  5. Radius :P But technically it shouldn't matter since normalize() would be doing it's job... What's even MORE strange is if I put a sphere with radius 50.0 in, the results are fine!
  6. That's exactly my point. The length already is = 1, so normalize() technically shouldn't be doing a thing, but for some reason it is. I don't quite understand you when you say "all the colour values summed up are going to equal 1.0f"? Do you mean for the fragment? Oh and no I don't have alpha blending enabled :P
  7. Hi. I've just recently dived head first into Cg and GLSL, and a small issue has popped up for me. I'm putting a unit sphere through the vertex shader, here's the shader: void main() { gl_Position = ftransform(); gl_FrontColor = normalize(gl_Vertex); } Now the output (tested in RenderMonkey and my own engine) is rather odd. You'd THINK you'd see a sphere with bright colours at the axis-extremeties, but instead I see dimly lit sphere. If I remove the "normalize(..)" and just have "gl_Vertex" I get what I'm supposed to see. My question is this: why on earth is normalize() cutting the vertices from the unit sphere so dramatically, it *should* have no effect on the vertices. Thanks in advance.
  8. Well, show us your code :)
  9. OpenGL

    I think you've got some things a little mixed up here. Alpha testing is a way of drawing parts of a texture that are over (or under) a certain limit, specified by you the developer. You set it with: glAlphaFunc(<Testing function>, <reference value>); And enable it with: glEnable(GL_ALPHA_TEST); Blending is a totally different issue. You may want to look at glBlendFunc(). As for the code examples, where on earth did you get glEnable(GL_GREATER, 0) from?
  10. Woops, didn't notice that. Obviously I just looked at the declaration.
  11. The link provided shows 4 parameters. All gl*Pointer commands USED to have five parameters, glTexCoordPointer used to be: void glTexCoordPointer( GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer ); They removed the count parameter.
  12. OpenGL

    Ah ok. Thank you both!
  13. Hi all. Quick question: Giving that OpenGL lets you choose between float and double when specifying functions like glRotate/glTranslate/glLoadMatrix, which precision do you think it actually stores the projection/model matrix with? Thanks in advance.
  14. Ah, thanks for that, although I have a few follow up questions: I downloaded quite a few "free 3ds models" and they all pretty much had multiple objects out of alignment, it became so frequent it's obviously caused this thread! I actually don't have access to any version of 3d studio max, so is there any chance you can describe "3d studio axis alignment"? I've been toying with it for quite a while now, and have found that if I scrapped most of the vectors except the last one, the translation vector, and if I inverse it, I get some pretty interesting results: 1.0f 0.0f 0.0f -[ 9] 0.0f 1.0f 0.0f -[10] 0.0f 0.0f 1.0f -[11] 0.0f 0.0f 0.0f 1.0f It tends to fix quite a lot of the issues I have with some 3ds models, but definatly not all of them. But I still don't have a clue what to do with the first three vectors...
  15. I've been having some small problems writing my own 3DS file loader. I have all the basics down, vertices, faces, texture co-ordinates. But my problem arises when I have multiple objects. Basically it seems like most of the objects are out of alignment with each other. See screenshot here: http://img476.imageshack.us/img476/6531/3dsshot6vb.jpg (Please ignore the dodgy texturing, the model came from a "free 3ds models" site) What I think the correct fix is the 0x4160 chunk, the local axis chunk: 4 x 3D float vectors. Of which I have absolutely no idea how to properly parse to the renderer. I've tried mapping it to a matrix like so (OpenGL btw): [ 0] [ 3] [ 6] [ 9] [ 1] [ 4] [ 7] [10] [ 2] [ 5] [ 8] [11] 0.0f 0.0f 0.0f 1.0f But obviously with little success. So my question is this: Is it indeed the 0x4160 chunk which can fix this? Or am I totally of course? Or am I just parsing the 0x4160 chunk incorrectly? Thanks in advance.