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

sufimaster

Members
  • Content count

    8
  • Joined

  • Last visited

Community Reputation

113 Neutral

About sufimaster

  • Rank
    Newbie
  1. OpenGL

    I managed to figure this out - apparently I was not accessing the matrix elements correctly - transposing their accessors = m03 instead of m30 for example for the translation matrix.  All is well now! Thanks everyone. 
  2. OpenGL

    This is how I send it to the shader: I know this part works since the perspective projection matrix works, but the ortho produces wierd results.    As for my previous projection matrix - this is my first projection matrix - so I am not multiplying it by anything before sending it tothe shader. Should I be? ///upload matrices to uniform varis in shader         GL20.glUseProgram(shaderObject.pId);                  projectionMatrix.store(matrix44Buffer);matrix44Buffer.flip();                     GL20.glUniformMatrix4(projectionMatrixLocation, false, matrix44Buffer);                  viewMatrix.store(matrix44Buffer);matrix44Buffer.flip();         GL20.glUniformMatrix4(viewMatrixLocation, false, matrix44Buffer);                  modelMatrix.store(matrix44Buffer);matrix44Buffer.flip();         GL20.glUniformMatrix4(modelMatrixLocation, false, matrix44Buffer);                           GL20.glUseProgram(0);  
  3. OpenGL

    Bump - anyone? This is super frustrating.  Is my ortho matrix still messed up?
  4. OpenGL

    Ok- so i used Shogun's method, I messed around with the camera position and near and far plane.   Now: near plane is 1f, far plane is 100f (though I dont see why this matters in an ortho projection) Camera is located at 0,0,-1   Sprite is at 0,0,0 dim: 10x10 pixels.   I can actually see it on the screen now, but it seems like everything is vanishing at the origin point, as attached:   This is supposed to be a quad, but the perspective is all wonky. Any idea what's going on now?
  5. OpenGL

    Ok, so I have a sprite with x,y,z (10,10,0)  with w/h 10fx10f   I have left as 0 and right as 680 top as as 480, bottom as 0   Still I see nothing.   Also, I am using lwjgl, in which if you have a matrix4f, I think m23 means 2nd column, 3rd row.                           Sprite sprite = new Sprite("assets/texture/redman.png", 50f, 50f, 10f, 10f );   projectionMatrix.m00 = 2/WIDTH;         projectionMatrix.m11 = 2/HEIGHT;         projectionMatrix.m22 = -2/(far_plane - near_plane);         projectionMatrix.m30 = -1;         projectionMatrix.m31 = -1;         projectionMatrix.m32 = -((far_plane + near_plane)/(far_plane - near_plane));         projectionMatrix.m33 = 1;          cameraPos = new Vector3f(0,0,-1); ...     //Translate camera         Matrix4f.translate(cameraPos, viewMatrix, viewMatrix);         //Scale, translate and rotate model         Matrix4f.scale(modelScale, modelMatrix, modelMatrix);         Matrix4f.translate(modelPos, modelMatrix, modelMatrix);         Matrix4f.rotate((float)Math.toRadians(modelAngle.z), new Vector3f(0,0,1), modelMatrix, modelMatrix);         Matrix4f.rotate((float)Math.toRadians(modelAngle.y), new Vector3f(0,1,0), modelMatrix, modelMatrix);         Matrix4f.rotate((float)Math.toRadians(modelAngle.x), new Vector3f(1,0,0), modelMatrix, modelMatrix);       ..
  6. OpenGL

    Well right now all I am trying to do is get a 40 pixel by 40 sprite displayed on the screen.  I have tried messing around with the size of the sprite to no avail.  Once I get home I will take a look at the code and give you some more details about it, but I have a feeling you ar right about the scaling/size/etc.
  7. OpenGL

    Thanks Shogun - but isn't that matrix the same as the one I have, if I have 0 as left and 680 as right for example (and same for top/bottom/height)?
  8. Hi all,   I am having trouble creating an orthographic projection in opengl (without using glOrtho).  And before anyone tells me to use glOrtho, lets just pretend I'm using opengl 3.0 as an exercise.  Here is the way I have set up my matrix:   projectionMatrix.m00 = 2/WIDTH; projectionMatrix.m11 = 2/HEIGHT; projectionMatrix.m22 = -2/(far_plane - near_plane); projectionMatrix.m32 = -((far_plane + near_plane)/(far_plane - near_plane)); projectionMatrix.m33 = 1; This is your typical ortho projection matrix, taken straight from the opengl spec def. for glOrtho.    When I set up a frustrum and use a perspective matrix, this works fine, but I can't use my regular screen coordinates properly.  But when I use the glOrtho matrix above, I see nothing but my background color. Anyone know what's going on? Is my matrix wrong?   My shader looks like this:     #version 150 core uniform mat4 projectionMatrix; uniform mat4 viewMatrix; uniform mat4 modelMatrix; in vec4 in_Position; in vec4 in_Color; in vec2 in_TextureCoord; out vec4 pass_Color; out vec2 pass_TextureCoord; void main(void){     gl_Position = in_Position;          //override gl position with new calculated position     gl_Position = projectionMatrix * viewMatrix * modelMatrix * in_Position;          pass_Color = in_Color;     pass_TextureCoord = in_TextureCoord; }   Any help appreciated.   Thanks!