1
\$\begingroup\$

In Linear-algebra a subspace is a collection of vectors that when added with each other or scaling would result in another vector in that same subspace.

How does subspaces relate to objects/players within the game world?

An object (player or enemy) in a game itself is just a collection of vertices that can be defined as a collection of vectors right? Does that mean that each object is also a subspace?

If I scale one object to be large enough to overlap/collide with another object does that mean those two objects are still in their own subspaces?

\$\endgroup\$
2
  • \$\begingroup\$ Are you trying to solve a specific issue when developing a game? \$\endgroup\$
    – Vaillancourt
    Commented May 17, 2021 at 10:22
  • \$\begingroup\$ My lecturer mentions subspaces a lot. My goal is to become a gamedev so I'm just trying to connect the dots to see how subspaces apply to gamedev. \$\endgroup\$ Commented May 17, 2021 at 12:13

1 Answer 1

2
\$\begingroup\$

Coordinate systems

For CG (computer graphics) we use hierarchical coordinate systems. Coordinate systems often called a space (World, Screen/View, Local space) define an origin, scale and rotation in 2D, 3D, ... nD.

Hierarchy connects the coordinate spaces (generally via transformation matrices)

An object in its local space is transformed to world space (places it in the world) then transformed to screen space (puts it on the screen).

You must select which coordinate space you want a vector to work in. If you have a vector in local space and want to add a vector from view space you must transform one of the vectors to the others space.

Most game frameworks will come with all the utilities needed to manipulate vectors, matrices, and coordinate spaces. However I would strongly suggest that you write your own so you can get a thorough feel of what is going on. If you are comfortable using vectors then it will not be that difficult with a bit of research.

Question

"If I scale one object to be large enough to overlap/collide with another object does that mean those two objects are still in their own subspaces?"

Yes until you transform them both to world space. They will then be in the same coordinate system. You can then test if they overlap.

\$\endgroup\$
1
  • \$\begingroup\$ This makes sense that each coordinate space is a subspace. So I guess game objects themselves within a single coordinate space are not necessarily subspaces. I know this is very theoretical but it's interesting. \$\endgroup\$ Commented May 20, 2021 at 12:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .