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

Moe

how do i optimize my 3d rotations?

10 posts in this topic

how can i optimize my 3d rotation? NewY = (OldY*Cos(ThetaX)) - (OldZ*Sin(ThetaX)) ** X axis rotation ** NewZ = (OldZ*Cos(ThetaX)) + (OldY*Sin(ThetaX)) (Copy NewY and NewZ into OldY and OldZ) is it faster to use some sort of a lookup table for calculating the cosines and sines on the fly? how would i do this?
0

Share this post


Link to post
Share on other sites
Hi there. I saw your post and i wanted to tell you that you should use matrices or quartenions. You can also have 2 lookup tables for sine and cosine.Have to go now bye

0

Share this post


Link to post
Share on other sites
You just make two global arrays

Sine[360]
Cosine[360]

and have an initialization loop:


for(int i=0; i < 360; i++)
{
Sine[ i ] = sin( i * PI /180); // I think thats the radian conversion
Cosine[ i ] = cos(i * PI / 180);
}


Edited by - logistix on 2/5/00 2:31:47 PM
0

Share this post


Link to post
Share on other sites
would lookup tables be faster?

where can i learn about quaternarians?
what about matrices?
0

Share this post


Link to post
Share on other sites
What are you coding in/with/for?

If you are using DirectX then that comes with some helper functions for matrix math, but they are pretty basic routines.

You are worrying too much about optimization at this stage, I take it you are just starting out in 3d programming so make everything math intensive and do not feel guilty about it!

Remember that floating point math is VERY fast these days, there are cases against using look up tables that state that if your look up table is not in cpu cache memory then it would take the processor longer to find the look up result than it would just to do the damn calculation.

Get the code working first, optimize later. And after every optimization test like hell!

Bye

Matt
0

Share this post


Link to post
Share on other sites
Hi Moe,

take a look at Reference/Programming section, then select Graphics/3D Graphics and Theory. Here is a nice article about doing a rotation using quaternions called Orientation with Quaternions and another one called Rotating Objects Using Quaternions.



Edited by - QWERTY on 2/6/00 8:16:52 AM
0

Share this post


Link to post
Share on other sites
wow, thanks.

I am using Direct X 7. I ordered a book on it a week or so ago. It should be here in 3-4 weeks

I think you''re right about getting this thing off the ground before i optimize it.

Thanks for the refrences, i will be sure to check them out.

I had a few small doubts about the lookup table idea. thanks for clarifying things for me.

does anyone here know any good books on graphics programming?

-Moe-
0

Share this post


Link to post
Share on other sites
I tried to make a lookup table for my sin/cos/etc. I had four 720 element arrays of floats. It took just as long to pull the value out of the array as it did to do the calculation. Plus, if you ever use hardware acceleration, you can push the work over to the graphics card.

E:cb woof!
0

Share this post


Link to post
Share on other sites
::does anyone here know any good books on graphics programming?

Check out Real Time Rendering. No code, all graphics theory. Sometimes tough though, know your math.

Mike
0

Share this post


Link to post
Share on other sites
thanks. i just got windows 98 programming from the ground up, and sams teach yourself direct x 7 in 24 hours. i think i will be pretty busy for the next couple months. who knows, i could get around to reading your sugestion. the only thing is, is i like the code examples. i think they help me conciderably.
0

Share this post


Link to post
Share on other sites
A) 3D cards don''t perform sin/cos/tan etc. in hardware. This is wrong. Calling sin/cos are scalar functions in MSVCRT.DLL if using MSVC. You can take a look at the the developer.intel.com pages for fast libs for math/matrix stuff but _only_ bother if you really know what you are doing.

B) The easiest code opt to what you posted is the most obvious. You calculate the sin and cos of X twice each time. Instead calculate each once and throw into a local and then use that local for the mults.

0

Share this post


Link to post
Share on other sites