Live data from Hacker News

Books for Game Developers

mrelusive.com

31–40 of 62 posts

Re: Books for Game Developers

#31

Circa 90s and early 2000s. I like how there's a whole book on quaternions. I've never understood them and I'm convinced every definition I've read was written by someone who also didn't understand them. I might try to find a copy if I ever dabble in 3d again Edit: To clarify, I understand the need for quaternions (to avoid gimbal lock), just not how to use them manually. Euler angles are simple enough, I can change w…

My (poor) understanding of quaternions is they are like a vector with a rotation angle around the axis of the vector. This is probably incorrect on many levels. But it was a simple enough explanation that it made sense to my brain why this would work better than simple SRT transform parameters for avoiding gimbal lock. It's been several years since I needed to deal with 3D transformations of any sort, so I'm a bit ru…

Ultimately, the “canonical” representation of rotation state is still axis-angles, thanks to Euler’s rotation theorem (any combo of rotation results in just one rotation around some final axis)

(normalized) Quaternions are just the intermediate representation of axis-angles, they describe the component-wise algebra of combining axis-angle rotations [Euler-Rodrigues formula](https://en.wikipedia.org/wiki/Euler–Rodrigues_formula)

Game engines just leaves them as quaternions for performance reasons.

A 2D analogy would be

    “angle”  [quaternion]
    “45deg”  [sqrt2 , sqrt2]
The [ Re , Im ] form is convenient for manipulating by coordinates, but the “final” succinct representation is still “angle”, because the component-wise form has more degrees of freedom than necessary.

Summary:

    Quaternion = sqrt( exp(axis_angle) )
               =       exp(axis_angle/2)
               = cos(angle/2) + axis*sin(angle/2)

And

    (lw,lx,ly,lz)*(rw,rx,ry,rz) = (w,x,y,z) 
    where
      w = ww-xx-yy-zz 
      x = wx+xw+yz-zy 
      y = wy+yw+zx-xz 
      z = wz+zw+xy-yx 
      where
        ww,wx,wy,wz = lw*rw,lw*rx,lw*ry,lw*rz 
        xw,xx,xy,xz = lx*rw,lx*rx,lx*ry,lx*rz
        yw,yx,yy,yz = ly*rw,ly*rx,ly*ry,ly*rz
        zw,zx,zy,zz = lz*rw,lz*rx,lz*ry,lz*rz

Re: Books for Game Developers

#32

Missing any Game Design books so my picks: Game Feel - Steve Swink - 2008 The Art of Game Design a Deck of Lenses - Jesse Schell - 2014 101 Things I Learned in Architecture School - Matthew Frederick - 2007 Writing for Games: Theory & Practice - Hannah Nicklin - 2022 Procedural Generation in Game Design - Tanya Short/Tarn Adams - 2017 Procedural Storytelling in Game Design - Tanya Short/Tarn Adams - 2019 A Theory of…

I enjoyed this book to practice game design:

Challenges for Games Designers: Non-Digital Exercises for Video Game Designers - Brenda Romero / Ian Schreiber

Re: Books for Game Developers

#33
post #22
post #8

Earlier quoted context omitted.

Sounds like they're the gamedev equivalent of a Monad? Which I only vaguely understand as a result of a poster on this forum's "Everyone explains it wrong" style post. Hoping you get a similar response with this.

Quaternions tend to be over-complicated. Basic concept, 1 dimensional form: you want to represent a direction in a 2D plane. You can use one number, a heading angle, but at some point you reach a full circle and the number has to wrap. This creates annoying special cases. So another approach is to use a 2D vector, a point on a circle. Those are usually normalized so that x^2 + y^2 = 1. No angle is "special". You can…

I am going to be the HN pedant here, and for that I apologize.

Quaternions don't specifically need to be unit vectors or points on a 4-D hypersphere. They are any number with 3 imaginary parts and 1 real part. Being a unit operator is a property of a rotation (this holds true even if you aren't using quaternions or if you extend to n-dimensional rotations), not a property of quaternions.

Re: Books for Game Developers

#34

Good selection of older books. I didn't see [1] Game Programming Patterns. [1]: https://gameprogrammingpatterns.com/

Game Programming Patterns was so helpful when I wrote a game engine! Both that book and Crafting Interpreters [0] by the same author are masterpieces.

[0]: https://craftinginterpreters.com/

Re: Books for Game Developers

#35
post #14

Wow. This post gave me emotional whiplash. I opened the collection of links, which is quite good if a bit old. But then I had a subconscious mental itch, and thought, wait... where had I heard the name mrelusive before? That sounds _really_ familiar. And then I remembered - oh, right, mrelusive, JP-what's-his-name. I've read a huge amount of his code. When I was working on Quake4 as a game programmer and technical de…

Did you know where the idea of crouch sliding came from?

Re: Books for Game Developers

#36
post #14

Wow. This post gave me emotional whiplash. I opened the collection of links, which is quite good if a bit old. But then I had a subconscious mental itch, and thought, wait... where had I heard the name mrelusive before? That sounds _really_ familiar. And then I remembered - oh, right, mrelusive, JP-what's-his-name. I've read a huge amount of his code. When I was working on Quake4 as a game programmer and technical de…

Really enjoyed this comment--thanks for sharing. Game development really sounds like such a different beast from standard line-of-business programming. Always enjoy hearing stories about it and reading books about it (Masters of Doom comes to mind).

Re: Books for Game Developers

#37
post #22

Earlier quoted context omitted.

Quaternions tend to be over-complicated. Basic concept, 1 dimensional form: you want to represent a direction in a 2D plane. You can use one number, a heading angle, but at some point you reach a full circle and the number has to wrap. This creates annoying special cases. So another approach is to use a 2D vector, a point on a circle. Those are usually normalized so that x^2 + y^2 = 1. No angle is "special". You can…

I am going to be the HN pedant here, and for that I apologize. Quaternions don't specifically need to be unit vectors or points on a 4-D hypersphere. They are any number with 3 imaginary parts and 1 real part. Being a unit operator is a property of a rotation (this holds true even if you aren't using quaternions or if you extend to n-dimensional rotations), not a property of quaternions.

In the context of game development, "quaternion" almost always refers to a normalized one that represents a rotation. Many engines aren't even capable of representing anything else with their quaternion types and enforce this automatically.

Re: Books for Game Developers

#39
post #17
post #14

Wow. This post gave me emotional whiplash. I opened the collection of links, which is quite good if a bit old. But then I had a subconscious mental itch, and thought, wait... where had I heard the name mrelusive before? That sounds _really_ familiar. And then I remembered - oh, right, mrelusive, JP-what's-his-name. I've read a huge amount of his code. When I was working on Quake4 as a game programmer and technical de…

My biggest takeaway from my time programming in Objective-C was not being afraid to name functions and variables more verbosely. Curious to hear what aspects of Objective-C you feel influenced id?

> Curious to hear what aspects of Objective-C you feel influenced id?

Well, 'id' is the generic object type in ObjC. ;-)

Re: Books for Game Developers

#40
post #14

Wow. This post gave me emotional whiplash. I opened the collection of links, which is quite good if a bit old. But then I had a subconscious mental itch, and thought, wait... where had I heard the name mrelusive before? That sounds _really_ familiar. And then I remembered - oh, right, mrelusive, JP-what's-his-name. I've read a huge amount of his code. When I was working on Quake4 as a game programmer and technical de…

Just wanna say that I loved Soldier of Fortune. Lots of FPSs around that time felt really like and plastic-y. SoF was one of the few that made shooting a gun feel satisfying and visceral (and I’m not even talking about the gore, I played the censored version).
Post reply on HN