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

bitinf

Members
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

103 Neutral

About bitinf

  • Rank
    Newbie
  1. Thank you so much for the timely reply. I know -q and q represent the same rotation. You say that one quaternion may have many corresponding Euler angles. I also think so. But why common methods only return a single set of angles?   And the same, why the inverse (from angles to quaternion) returns a single quaternion?  Are there some rules in it? Thanks!  
  2.   I'm trying to implement the conversion between quaternion and Euler angles. I've referred to some exsiting methods. But the results have "sign(±)" problems. That is, I first convert a quaternion q to Euler angles (pan,tilt,roll) and then computer the quaternion again from the acquired Euler angles. But the result sometimes is -q, and sometimes it's q. Below is my code. In my code, I use a coodinate system with z pointing up. Pan is rotation with respect to y-axis, tilt x-axis, roll z-axis. I apply roll first, then tilt, and last pan. Could anyone tell me what is wrong? Thanks a lot!   //from quaterion to pan,tilt,roll void q2ptr(quaternion q, double &pan, double &tilt, double &roll) {   double sqw = q.w * q.w;   double sqx = q.x * q.x;   double sqy = q.y * q.y;   double sqz = q.z * q.z;   double n2 = sqx + sqy + sqz + sqw;   double eps = 1.e-7;   double test = q.x * q.y + q.z * q.w;   if (test > (0.5-eps) * n2)      {        // Singularity at north pole        roll = 2 * atan2(q.x, q.w); // Yaw        tilt = M_PI/2; // Pitch pan = 0;       }    else if (test < -(0.5-eps) * n2)    {       // Singularity at south pole       roll = -2*atan2(q.x, q.w); // Yaw       tilt = -M_PI/2; // Pitch pan = 0; // Roll     }     else     {       roll = atan2(2*(q.w*q.y - q.x*q.z), sqx - sqy - sqz + sqw);       pan = atan2(2*(q.w*q.x - q.y*q.z), -sqx + sqy - sqz + sqw);       tilt = asin(2*test/n2);      }  }    //from pan,tilt,roll to quaterion void  ptr2q(double pan, double tilt, double roll, quaternion &q)  {    double c1, c2, c3, s1, s2, s3; c1 = cos(roll/2);    c2 = cos(tilt/2);  c3 = cos(pan/2); s1 = sin(roll/2); s2 = sin(tilt/2); s3 = sin(pan/2);    q.w = c1*c2*c3 - s1*s2*s3;    q.x = s1*s2*c3 + c1*c2*s3;    q.y = s1*c2*c3 + c1*s2*s3;    q.z = c1*s2*c3 - s1*c2*s3;    } rotation quaternion