Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualzqf

Posted 11 October 2012 - 02:39 PM

I understand the desire to keeping game actors from seeing these large data structures, but I'm still trying to see what would be considered a safe way to bring them together? Is this where it is simplest to just make position and collision shape public variables or getters? Using movement and collision as an example still: The world loops through all actors, sends them to a collision class that can move the actor and call them when collisions occur? The collision class doesn't see all of the world, and can see the required details of the actor it's moving?

In this way objects don't control exactly how they are moved, or see any world information, they just have a velocity and a shape, and methods for responding to a collision.

#1zqf

Posted 11 October 2012 - 02:38 PM

I understand the desire to keeping game actors from seeing these large data structures, but I'm still trying to see what would be considered a safe way to bring them together? Is this where it is simplest to just make position and collision shape public variables or getters? The world loops through all actors, sends them to a collision class that can move the actor and call them when collisions occur? The collision class doesn't see all of the world, and can see the required details of the actor it's moving?

In this way objects don't control exactly how they are moved, or see any world information, they just have a velocity and a shape, and methods for responding to a collision.

PARTNERS