Player movement?

Started by
4 comments, last by Naku 16 years, 10 months ago
Howdy! Right so me and my mate are having an argument over Player Movement in videogames. I'm totally not educated on how games are made, what goes on behind the graphics so excuse my stupidness. My mate thinks that when you move in a game for example Motorstorm, Resistance and Elder Scrolls IV and Calling all Cars, the world is actually moving beneath you, the character himself is just the 'pivot'. I do not disagree with this theory as for in older games like Mario Kart 64 it's stupidly obvious that this is how it works. I however believe player movement can also be done by the map itself being static and the player/car/whatever moving around on top of it. This way of movement makes sense in a 3D flight game to me, such as Warhawk on PS3, where the Warhawk itself is flying around, up and down and being affected by various elements such as rockets, I mean the map surely won't stutter to make it seem like you got hit by a rocket?! If anyone could clear this up and give example of where each of us are right (or wrong) I'd really appreciate it! :D Cheers for listening!
Advertisement
Remember that speed and efficiency are important concerns in software development.
Therefore it is much more likely that the player location will be updated, leaving the rest of the game world stationary.
Doing the opposite requires updating the positions of every entity in the world, and leaving the player stationary. This takes a lot more time, given the many static meshes, enemies, powerups, and other entities scattered throughout the game world in most games.
In a way you're both right. Everything in the game has it's own position and when it (or the player) moves, only its/their position is updated. However, in games where the main view is on the player (or from the player's perspective) the player becomes the origin and everything is "transformed" around that point of perspective. In third-person 3D, everything is transformed in relation to the camera, not the player. So, although your friend isn't ENTIRELY wrong, you are entirely right.
Quit screwin' around! - Brock Samson
Typically in the game's model of the world, the position of stationary objects in the world is fixed and the player (and other moving objects) move in relation to the origin. However, in terms of rendering, the camera's viewpoint is always the center of the action and the coordinates of everything else are translated relative to it. In a way, you're both right.
Logically games are usually modeled to mirror real life/physics etc. Meaning that usually the "world" or ground, terrain, whatever is static and live, movable objects change their position. The game state is how you describe it.

When it comes to render however, the camera (whether it's the player or a tracking camera etc.) is considered to be at (0,0,0) and everything else is translated accordingly.

So I'd say you're both right. It just depends on what part of the game you're looking at. :)
Usually you are right, its the player that moves with a static world although I have had cases where a level was perticulary large and the player moving from one side of the world to the other caused problems with the accuracy of the floating point calculations. In these cases it was neccisary to recenter the world and everything in it around a 0, 0, 0 origin point to maintain the accuracy of the maths. Its not something you want to do if you can avoid it though.
APE

This topic is closed to new replies.

Advertisement