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

pilarsor

Members
  • Content count

    33
  • Joined

  • Last visited

Community Reputation

130 Neutral

About pilarsor

  • Rank
    Member
  1. Thanks for the illustrations. First, if you want to compute a rotation matrix, that rotates points around the center of profile inside that plane, I would suggest, that you create a quaternion from an axis, angle representation. The axis of rotation you already have defined by your plane's normal vector. The angle you can compute like the following ( using 3D coordinates ): vec3 v0 = RotPlane - centerOfProfile; vec3 v1 = RotPlane' - centerOfProfile; v0.normalize(); v1.normalize(); float angle = acosf( dotProd<v0,v1> ); ( = acosf( v0.x*v0.x + v1.x*v1.x ) ) Now, generate your quaternion q by: ( axis needs to be normalized ) q.x = axis.x * sinf( angle / 2 ); q.y = axis.y * sinf( angle / 2 ); q.z = axis.z * sinf( angle / 2 ); q.w = cosf( angle / 2 ) If you want a matrix representation from q, just use a standard method for converting from normalized quaternion to a rotation matrix. Btw... if you just want the angle to apply in one of your predefined axis aligned planes xy,xz or yz, just leave out the whole quaterion step. Here you can just generate a standard 2d rotation matrix using sin and cos from that angle.
  2. Actually, you need to plugin position vectors to x,y,z in the same coordinate system your plane is defined, not directional vectors as you did with (0,0,1) and (0,1,0). But I'm not sure what you're actually looking for... maybe you can clarify a bit more, what information you actually have given, and what you need to calculate. Thanks.
  3. Keep in mind, that your matrix M transforms each point into homogeneous clip space HCS, ranging from x=-w..w, y=-w..w, z=-w..w,w=z, so you might want to devide each projected coordinate additionally by w, to get your screen values in range x=-1..1,y=-1..1,z=-1..1, the normalized device coords ( NDC ). So: M*w = c (in HCS) s = c / c.w ( divide by homogeneous coordinate c.w ) To get back into world space, store your c.w per fragment/pixel/screen coord. For each screen coord: c = s * c.w w = M^-1 * c
  4. You calculate a,b,c,d and substitute x,y,z with the values you want to check.
  5. Dynamic text is something, that you might want to prepare in your c++ code. Take a texture containing the letters of the alphabet, each letter in the texture equally spaced in width and height. Write a C++ module, that inputs a string and you basically convert each character in the string to an u,v offset in the 2D alphabet texture. For rendering this text as textured quads for example, you can just use a standard vertex and fragment shader, which has the functionality of a vertex/fragment shader pendant of a fixed function pipeline. But sure, if you like, go ahead and do something fancy with that text, e.g. like displacing the quad vertices, distorting the uv coords, or applying some function for color generation...
  6. OpenGL

    Seems, that you miss linking against glut32.lib.
  7. When you want to do automatic navigation mesh generation from real world meshes, you might want to have a look at mesh and polygon reduction methods, while keeping the main characteristics of the mesh. Here are some links I found: [url="http://graphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08_Simplification.pdf"]http://graphics.stanford.edu/courses/cs468-10-fall/LectureSlides/08_Simplification.pdf[/url] [url="http://webdocs.cs.ualberta.ca/~anup/Courses/604_3DTV/Presentation_files/Polygon_Simplification/luebke01developers.pdf"]http://webdocs.cs.ualberta.ca/~anup/Courses/604_3DTV/Presentation_files/Polygon_Simplification/luebke01developers.pdf[/url]
  8. Hmm ... why do make it so complicated? When you know you have a sphere and a box colliding with each other, why don't you use the implicit representation of the sphere? ( (x-x0)^2 + (y-y0)^2 + (z-z0)^2 = r^2 ), where (x0,y0,z0) is the origin of the sphere. ... and a transformed box, where the box is either an object oriented bbox, or you just use an axis aligned bbox, and transform the sphere into your local AABB space, which might make the collision detection easier. Maybe this applies to your case, if not, I apologize... ... though finding the point(s) of intersection here is not so intuitive.
  9. Try the following steps: 1.) Switch to orthographic projection 2.) Prepare your hud geometry 3.) Apply a vertex and fragment shader to your hud geometry 4.) Draw your triangles describing or hud geometry When you choose your vertex shader, think about, how you would like to transform your vertices... e.g. just as linear transform e.g. applying the mere modelviewproj transform, or as non-linear transform, e.g. where you treat each vertex with a different offset vector ( computed in the vertex shader ). Prepare the fragment shader with values per vertex to be interpolated for each fragment. For your fragment shader, think about how you would change your fragments of your rendered hud area on screen. E.g. use interploated uv values across the triangles as input for a function for pixel color distortion ( executing inside the fragment shader ), or anything else what comes into your mind...