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

Archived

This topic is now archived and is closed to further replies.

Mayo

All around the world

3 posts in this topic

Hi guys, I''ve got a rotation problem I''ve can''t seem to get right... Basically I have a planet, I''m controlling what portion you look at with the number pad. 8 up around X axis; 2 down around X axis; 4 left around Y axis; 6 right around Y axis; 7 rotates around Z axis; 9 rotates around Z axis; I need left to ALWAYS move left ect... at any orientation. The problem is, it only rotates in the correct directions all the time for the first matrix I multiply by. In this case, around the X axis: D3DXMatrixRotationX (&matViewTemp, angYZ); D3DXMatrixMultiply (&matView,&matViewTemp,&matView); D3DXMatrixRotationY (&matViewTemp, angXZ); D3DXMatrixMultiply (&matView,&matViewTemp,&matView); D3DXMatrixRotationZ (&matViewTemp, angXY); D3DXMatrixMultiply (&matView,&matViewTemp,&matView); Is there any way to make this work with out manually checking each angle for each axis? So far I''ve come up with alot of funny paths, but no correct ones. Any help would be really great! Thanks BTW: im aware that being above 90 degrees in the Y direction flips the directions of the x keys... that''s not the problem. later!
0

Share this post


Link to post
Share on other sites
I think you need to use axis angle rotations. The first one can rotate around the spheres whatever axis, but after that the cameras axes are no longer aligned with the spheres axes. So for the second rotation to move you towards the pole you have to rotate around the right axis for the camera. That would give you the ability to control longitude and latitude. I have no idea what the purpose of the third rotation is. That would seem to have little practical value and mainly serve to disorient the user.
0

Share this post


Link to post
Share on other sites
Ok I think this is what you mean?... probably not. what I''ve got here just seems to change the total axis of the whole sphere.

ang = CamXYAng*(3.14f/180);
D3DXMatrixRotationAxis(&matViewTemp, &D3DXVECTOR3 (0, 0, 1), ang)
D3DXMatrixMultiply(&matView,&matViewTemp,&matView);

ang = CamXZAng*(3.14f/180);
D3DXMatrixRotationAxis(&matViewTemp, &D3DXVECTOR3 (0, 1, 0), ang)
D3DXMatrixMultiply(&matView,&matViewTemp,&matView);

ang = CamYZAng*(3.14f/180);
D3DXMatrixRotationAxis(&matViewTemp, &D3DXVECTOR3 (1, 0, 0), ang)
D3DXMatrixMultiply(&matView,&matViewTemp,&matView);

Incase the wording of my question was strange I''ve got a better one. If i draw a dot each time i rotate the sphere on the sphere, it would make a line of my path. Right now, that line is curving all over. What I need it to do is, after rotating 360 degrees in any one direction, connect back to the starting point.
So it would look like a ring around the sphere. If that helps any...

if I have a big enough sphere, the 3rd axis is pretty useful on a terrain.

Thanks to any help as to what I''m doing wrong!
0

Share this post


Link to post
Share on other sites
This isn''t a strong area for me. You need to rotate an axis around an axis. Rather than x, y and z axes picture it as forward, right and up. Rotating up means rotating the forward and up axes around the right axes. Rotating right means rotating the forward and right axes around the up axes. The third one, whatever you would call it, is rotating the up and right axes around the forward axis. That would be assuming that you are basically doing a fly by. None of it affects the cameras position. Seperately you have a velocity in the direction of the forward axis. The axis are the orientation of the camera in world space since in camera space they don''t move. Within camera space the x-axis is always (1,0,0). Within world space the x-axis of the camera is not always (1,0,0).

The rotations are around the current orientation of the axis. If your camera is assumed to start with its axis pointing in the same direction as the worlds axis then the first rotation can use (1,0,0) to rotate around the x-axis. The second one can''t use (0,1,0) though because that is no longer the direction the cameras y axis is pointing due to the first rotation. Rather that vector has to be ran through the first matrix to find what direction it now points. You then perform your second rotation around that axis. The same is true of the third. I don''t know what MatView starts out as, but assuming that it starts as the identity matrix then you can use it for transforming the (0,0,1) vector to get your third rotation.

Under that context I can see the purpose of the third rotation. I had assumed your camera stays pointed at the center of the sphere. Under that scenerio you have to both rotate the position of the camera and its orientation. I believe to do that all you have to do is transform the original position using the orientation matrix. I''m not strong at this stuff though and mainly responded figuring a little help is better than none if no one else did.
0

Share this post


Link to post
Share on other sites