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

Nick Karasch

  • Content count

  • Joined

  • Last visited

Community Reputation

171 Neutral

About Nick Karasch

  • Rank
  1. I used ZYZ, doesn't that match up to what that says? Thanks for your input
  2. http://wolfr.am/1cjQWiv   Does that look right? I would just go ahead and try it but I have no idea how my end result is supposed to look. All I can do is make sure I'm right on a theory level.
  3. "You will eventually regret any use of Euler angles." -John Carmack   Part of my assignment:   So I need to produce a transformation matrix for these rotations     These kinds of rotation matrices can't give me rotations around the "new" y' and z'' can they? aren't they only relative to the x, y and z of my coordinate system?  
  4. How would you accomplish this? I know how to do rotations around the X, Y, Z axis, but those are not applicable in this case other than the inital rotation right? It's the rotations around the "new" axis that are throwing me off.
  5. I would like to participate as well
  6. Thanks, I don't know about instanced rendering yet but now I have something new to read about   I think it's all opinion but I disagree about me reusing my work being unfair to other students. If I have spent 12 hours a day working on this stuff since school resumed, I don't think it's unfair for me to get to reuse code. It's also NOT unfair to me that I have to start over, I wasn't trying to say that either.
  7. Thanks for the friendly reply. Yeah it is very frustrating, I have my 4000+ line "3D engine" I have been working on that would make this assignment take 10 minutes. I expected I could just strip it down to the essentials and reuse my code for these assignments. Now I'm having to start over, sweating over finding a new way to do the basics in the way he wants.
  8. I ask my Graphics Programming professor if I could use something I am familiar with like GLM and he said no, we are supposed to do everything in the vertex shader. From my experience/understanding, it makes more sense to calculate the model-view-projection matrix once per model for this simple program and pass it in through a uniform.   I think he wants us to create all of the matrices in the shader code, can that ever make sense? I don't understand why you would EVER create your main view and projection matrices within a shader. Thanks
  9. Now that I'm working out how to keep track of the locations of my objects outside of OGL, another question has popped into my head. Would reloading a fresh set of  pre-transformed vertices into OpenGL every frame be significantly slower than using glTranslate, glScale etc?   I'm dealing with 2D here, usually arrays of 12 values. something like: draw(){ vertices = somewhereElse.getVertices(); vertexBuffer.put(vertices); //blah blah blah gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer); //draw stuff //blah blah blah }   Also, thanks for the SAT advice. I might use something like it.
  10. So far I can draw textured quads (triangle strips), move them and it all works independently of screen resolution and aspect ratio. I'm hitting a huge snag when it comes to collision detection. My only prior experiences were with fixed resolutions with no rotation.   How do you guys handle it? Is there any easy way to get my objects vertices after a translation and rotation? I know how to peek at the model view matrix and it isn't of much help as far as I can tell. I feel like all of my problems would be solved if I could just get the post-transform coordinates of my vertex array.
  11. Disclaimer: This code is an ugly mess that has been getting abused for a few days. It is not pretty, I'm aware. I'm just desperate to get it working, then the beautification process will occur.   Also, the delta time is no longer working as intended. I know how to fix it, but there is no point when I can't get rotations working.   I'm having a tough time here. My translations work perfectly. However, as soon as I start adding rotations in, things go nuts. X axis rotations alone are fine, Y axis alone are fine but when I have both activated I end up spinning and rolling out of control. I'm also pretty sure that the rotations are all more like revolutions around the original starting point.   Any insight would be great. I was stole this code http://www.lloydgoodall.com/tutorials/first-person-camera-control-with-lwjgl/, using the built in matrix stack and it worked great. A lot of the code below is ugly remnants of it   package karasch.lwjgl.utility; import java.io.FileNotFoundException; import java.io.IOException; import karasch.lwjgl.entitysetup.IEntity; import org.lwjgl.input.Mouse; import org.lwjgl.util.vector.Matrix4f; import org.lwjgl.util.vector.Vector3f; public class View implements IEntity { private Vector3f position; private float x, y, z, yaw, pitch; private float moveSpeed, mouseSensitivity, deltaMoveSpeed; int dx, dy; static Matrix4f viewMatrix; public View(float x, float y, float z) throws FileNotFoundException, IOException { moveSpeed = 0.00001f; dx = Mouse.getDX(); dy = Mouse.getDY(); yaw = 0; pitch = 0; position = new Vector3f(x, y, z); mouseSensitivity = 0.0000025f; viewMatrix = new Matrix4f(); viewMatrix.setIdentity(); } // increment the camera's current yaw rotation public void yaw(float amount) { // increment the yaw by the amount param yaw += amount; } // increment the camera's current yaw rotation public void pitch(float amount) { // increment the pitch by the amount param pitch += amount; } public void applyTransformations() { viewMatrix.rotate(pitch, new Vector3f(1, 0, 0)); viewMatrix.rotate(yaw, new Vector3f(0, 1, 0)); viewMatrix.translate(position); System.out.println(viewMatrix); } public void update(int delta) { deltaMoveSpeed = moveSpeed * delta; dx = Mouse.getDX(); dy = Mouse.getDY(); this.yaw(dx * mouseSensitivity); this.pitch(dy * -mouseSensitivity); if (Input.dPressed) { strafeRight(deltaMoveSpeed); } if (Input.aPressed) { strafeLeft(deltaMoveSpeed); } if (Input.wPressed) { walkForward(deltaMoveSpeed); } if (Input.sPressed) { walkBackward(deltaMoveSpeed); } if (Input.controlPressed) { moveDown(deltaMoveSpeed); } if (Input.spacePressed) { moveUp(deltaMoveSpeed); } } public static Matrix4f getViewMatrix() { return viewMatrix; } // moves the camera forward relative to its current rotation (yaw) // moves the camera forward relative to its current rotation (yaw) public void walkForward(float distance) { position.x -= distance * (float) Math.sin(Math.toRadians(yaw)); position.z += distance * (float) Math.cos(Math.toRadians(yaw)); } // moves the camera backward relative to its current rotation (yaw) public void walkBackward(float distance) { position.x += distance * (float) Math.sin(Math.toRadians(yaw)); position.z -= distance * (float) Math.cos(Math.toRadians(yaw)); } public void moveUp(float distance) { position.y -= distance; } public void moveDown(float distance) { position.y += distance; } // strafes the camera left relitive to its current rotation (yaw) public void strafeLeft(float distance) { position.x -= distance * (float) Math.sin(Math.toRadians(yaw - 90)); position.z += distance * (float) Math.cos(Math.toRadians(yaw - 90)); } // strafes the camera right relitive to its current rotation (yaw) public void strafeRight(float distance) { position.x -= distance * (float) Math.sin(Math.toRadians(yaw + 90)); position.z += distance * (float) Math.cos(Math.toRadians(yaw + 90)); } public Vector3f getPosition() { return position; } public float getX() { return x; } public void setX(float x) { this.x = x; } public float getY() { return y; } public void setY(float y) { this.y = y; } public float getZ() { return z; } public void setZ(float z) { this.z = z; } @Override public void destroy() { } @Override public void render() { this.applyTransformations(); } }
  12. Thanks. I got around to implementing my own matrices today, hasn't worked out so well so far but I know it's just errors in my logic   For your amusement: http://www.youtube.com/watch?v=Ue4PpmZoxQE&feature=youtu.be
  13. Is gl_ModelViewProjectionMatrix unknown by GSLS 3.3? Even gl_Position = gl_ModelViewProjectionMatrix*gl_Vertex; isn't working, it is definitely my problem line
  14. System.out.println(glGetShaderInfoLog(vertexShader, glGetProgrami(shaderProgram, GL_INFO_LOG_LENGTH))); Isn't giving me anything, hmmm.   And yeah, I am going to move away from the built in matrix functions.   Also, I'm using Java so I don't think GLM is an option. LWJGL has appropriate tools built in though.   Thanks for the response