What does "Solid" mean in the above context?
The article states:
Solids can’t actually collide with other geometry. If you tell a Solid to move 30 pixels to the right, it is guaranteed to get there, regardless of whether other Solids are in the way
In other words, if all of the objects in the game were Solid
you wouldn't actually have any collisions. Objects would just move through each other.
Hence given this articles definition, solids are only interesting, given the effects they have on Actors
, the article defines three such effects:
- Pushing - when a
Solid
collides with an Actor
it can push/move it out of the way.
- Squishing - If an
Actor
gets trapped between two Solids
that are approaching each other and there isn't enough space the Actor
gets squished - the document notes the default behavior in this case is the Actor
gets destroyed.
- Carrying - Is a special case of "Pushing" usually if a
Solid
and an Actor
are touching and the Solid
is moving towards the Actor
it would just push it. However if an Actor
is resting on top of a Solid
, the top of the Solid
is flat and the Solid
is moving horizontally it's possible to impart the movement of the Solid
to the Actor
. Without the carry effect the Solid
would just slide out from underneath the Actor
and the Actor
would likely fall due to gravity.
Is it referring to a floor, a wall, or both?
In most cases both are Solid.
Generally if something in the game world is indestructible and can't be moved simply by walking (or running) into it, it's probably Solid.
What exactly does "Solid" mean in game development?
A physics engine (inside a game engine) will typically have a concept similar to or close to this articles definition of Solid
. However different Engines may have different names and may support other variations for example Godot provides:
AnimatableBody3D
A 3D physics body that can't be moved by external forces.
When moved manually, it affects other bodies in its path.
StaticBody3D
A 3D physics body that can't be moved by external forces.
When moved manually, it doesn't affect other bodies in its path.
Hence you might describe both of these objects as "Solid", and in the case that both objects are not moving they act the same, however if these objects move (as a result of explicit code to do so) they will affect other Physics entities differently.
That said without the context of a specific engine or definition, I don't think the term "Solid" is well defined.