# GAME-conference edition ’23 – Hamish Todd

#### DoorRuben Piccavet

mei 8, 2023

The GPUs that we currently have in our machines make use of matrices for calculations. Does that mean that the architecture will have to change in order for it to benefit from GA?

Surprisingly, it barely needs to change at all. Matrices are part of how GPUs are specified, however it turns out that most of them are not speeding up matrices. In fact, multiplications involving matrices on a CPU can in some ways be faster than on a GPU, which must be a part of how the latter is designed. The geometric algebra things that you would do on a GPU will go about as fast as matrices, but that changes for the quaternions where the performance increase really starts to shine.

Taking into account what we are capable of achieving while using the currently available game engines, will geometric algebra only provide a performance boost, or will it also allow for more possibilities in terms of interactions and physics?

It will mostly allow for more possibilities, but not directly since it makes the code easier to write. Geometric algebra allows us to do the same things we can do now, but with less code (which is a good thing). The time spent on finding a bug that’s hidden somewhere between the 200 lines of code could have been spent on expanding the game. You want things to be as simple as possible in order to do as much as you can in a given time frame and that is exactly what geometric algebra aims to do.

If we talk about points, they are represented by using a coordinate that consists of an x and a y value. How could we represent a point, line, or any other structure in geometric algebra since there is no origin?

There actually is an origin, but the good thing is that you don’t have to pay attention to it. With vectors, you have no other choice but to rely on the origin. However, that’s only a simple answer to your more complicated question.

The current top game engines we have are Unity and Unreal. These are huge frameworks. Would implementing geometric algebra to them not be a difficult task to perform?

It’s not that horrendously difficult to implement. I myself have made a library for Unity that makes use of geometric algebra, which is available on GitHub. Besides that, it’s not necessary to be able to do so, since things come and go.
Unity and Unreal are the two titans right now. It allows young people to create stuff that was not imaginable when I was a teenager. However, they cannot be looked at as the final version of what we know as game engines. Someone once asked my favourite game developer Casey Muratori why he wants to write his own engine and “reinvent the wheel”.

A wheel is a wonderful, incredible and perfect invention for what it is supposed to do. Unity and Unreal are nothing like wheels. They are the best we have right now, but we can go even further and geometric algebra will play a part in pushing it there. Chances are that Unity and/or Unreal will play a substantial part in shaping the future of game engines, but that is not guaranteed.

Will geometric algebra fully replace matrices and vectors or will they stay relevant?

There will definitely be a place for matrices, since they combine very well with geometric algebra. For instance, if you want to be very performant, you’re better off turning a dual quaternion into a matrix in the last step. However, when it comes to vectors, it depends on which definition we take into account.
If we talk about something that goes into and out of a cross product, then yes. The cross product is one of the stupidest things we have ever had and it’s doubly stupid for how useful it has been for about a century, but it is time to get rid of it. This time around we are coming up against all the problems it creates, which is why its definition needs to change. What comes out of a cross product must be different from what goes in and in geometric algebra we distinguish these by using grades. For instance, two planes go in, one line comes out (which is the intersection line of the planes).
The other definition is much more useful. A vector is a list of elements that you can add together and multiply by scalars, for example. In that sense, a vector can consist of one element or of 200 elements. It does not matter, it still is a vector, still can be added up and/or multiplied.