Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Game Physics
DreamScripters Offline
Junior Member

Posts: 25
Threads: 4
Joined: Dec 2013
Reputation: 0
#1
Question  Game Physics

So basicaly my question that I have thought about for the past couple of days is how come in almost every game that has a 3D environment entities seem to be able to clip through each other? Or just in general glitches. Amnesia itself seems to be pretty prone to entity clipping (Ex: throwing a chair hard enough against a wall that it goes through it.) and even worse. If you have been one of the many people in Amnesia to pick up a mattress then you know what I mean.

But what makes me really think is how such glitches happen. If we go really basic, such as a game like Pong. You wouldn't see such glitches happening obviously. But when you get more complicated such as Amnesia's physics engine you will see these glitches happening quite frequently. When you think of computers or even games you think of very technical things. But its almost the exact opposite with glitches. They almost seem organic in contrast to what you would think of a computer.

So I made a theory to why entities are able to clip through other objects. My theory goes as when you throw a object fast enough in Amnesia and it collides with something it is going so fast that the computer itself can't calculate the collision fast enough to stop it from clipping/glitching. This is why you don't see these type of glitches happening in simple games I believe. Because collisions and other physical interactions are so simple it doesn't take much time to calculate collisions so you don't get the clipping you see in more complicated games. But this is just what I think.

I wanted to make this thread just out of curiosity of what responses I would get and if I could learn a little more about the nature of these glitches. But as far as I know it is not the developers fault that these glitches happen but more of the actual time that it takes to process game events in general. Anyways thanks for reading the post and reply with what you think! Big Grin

[Image: header.png]
02-11-2014, 03:23 AM
Website Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#2
RE: Game Physics

I think this is a matter of optimization.
It lets the object go through to avoid dealing with it.

Because the algorithm was designed to deal with it that way instead of doing large calculations on how to deal with it and risk itself into going on an infinite loop.
That's what I think.

(This post was last modified: 02-11-2014, 04:36 AM by Daemian.)
02-11-2014, 04:22 AM
Find
DreamScripters Offline
Junior Member

Posts: 25
Threads: 4
Joined: Dec 2013
Reputation: 0
#3
RE: Game Physics

Possibly, but I don't know why they would do that for optimization. Its more of a pain if anything and can actually ruin the game if bad enough. Especially the mattress glitch XD. But if you're curios I got the definition off of Wikipedia below.

Quote:Physics glitches are errors in a game's physics engine that causes a specific entity, be it a physics object or an NPC (Non-Player Character), to be unintentionally moved to some degree. These kinds of errors can be exploited, unlike many. The chance of a physics error happening can either be entirely random or accidentally caused. Once again, Bethesda’s Skyrim and Fallout games are notorious for this glitch, as it can happen without warning and possibly result in the player being unable to start or complete certain quests due to the quest giver disappearing.

[Image: header.png]
02-11-2014, 05:17 AM
Website Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#4
RE: Game Physics

I don't think it is because the computer can not process the collision. If the computer would even struggle, I'm sure it would be made to decrease FPS to have enough time to process it rather than just ignoring the action and letting glitches happen.

The reason these happen a lot more in especially 3D games is because in 3 dimensions there are a lot more to calculate than in 2. In 2 you have the X and Y axises, whereas 3 there's Z as well. That's not just a 50/33 % increase in calculations. It's more like a cube compared to a plane (powered by 3 instead of 2). That's quite a significant increase in calculations, therefore it's very difficult to prevent everything.

Many developers say that by patching one bug, you create 3 more. This can be very accurate. I'm sure these glitches are just minor compared to what Frictional initially had to deal with.

I can imagine these glitches are possible to prevent by editing the engine, but that might even require a complete re-write of the physics engine.

02-11-2014, 10:04 AM
Find
Adrianis Offline
Senior Member

Posts: 620
Threads: 6
Joined: Feb 2012
Reputation: 27
#5
RE: Game Physics

(02-11-2014, 03:23 AM)DreamScripters Wrote: when you throw a object fast enough in Amnesia and it collides with something it is going so fast that the computer itself can't calculate the collision fast enough to stop it from clipping/glitching

That's pretty much right. Basically a game has to work out where an object is for every frame, and there are only so many frames it can process within a second.

So a moving object can only have it's position calculated a limited number of times within a second, and the physics engine needs to know when one object is colliding with another, but again the time it has to work that out is limited.

So, if an object is moving so fast that within a single frame it can pass enough distance to go through a wall, then the physics engine will never know that there should have been a collision. One frame, the chair is on one side of the wall, then the next frame, the chair has moved, and now its the other side of the wall, the engine only thinks in frames & it can't process anything between a frame... so no collision!

Normally, a physics engine will use its own frames for calculation of collisions & such separate to the rendering engine frames (how much FPS you get running the game). I don't really know enough to say why, but afaik it's to ensure some consistency in physics behaviors independent of how fast the game is actually running. This basically means that if given the chance, a very powerful computer could process more physics 'steps' per second, and therefore increase the accuracy of the collisions, and get rid of those glitches! But, physics processing is generally expensive on the processor

Hope that explains it Smile

(This post was last modified: 02-11-2014, 03:19 PM by Adrianis.)
02-11-2014, 03:18 PM
Find
Mudbill Offline
Muderator

Posts: 3,881
Threads: 59
Joined: Apr 2013
Reputation: 179
#6
RE: Game Physics

Here's a Wikipedia page about it, if you wanna read some.

It states:
"Another unusual aspect of precision in discrete collision detection involves the framerate, or the number of moments in time per second when physics is calculated. Each frame is treated as separate from all other frames, and the space between frames is not calculated. A low framerate and a small fast-moving object causes a situation where the object does not move smoothly through space but instead seems to teleport from one point in space to the next as each frame is calculated. Projectiles moving at sufficiently high speeds will miss targets, if the target is small enough to fit in the gap between the calculated frames of the fast moving projectile."

This could be what's used for HPL's physics engine.

(This post was last modified: 02-11-2014, 03:38 PM by Mudbill.)
02-11-2014, 03:37 PM
Find
GrAVit Offline
Senior Member

Posts: 580
Threads: 15
Joined: Oct 2011
Reputation: 22
#7
RE: Game Physics

Well, I personally think that physics glitches are hilarious. I like breaching locked doors by ramming a few barrels inside them. Not to mention ragdoll glitches where the ragdoll stretches across the whole map. Of course it kind of sucks if a physics glitch is preventing you from progressing in the game, but occasional non-harmful glitches are always a joy to see, in my opinion.

02-12-2014, 09:44 AM
Find
Daemian Offline
Posting Freak

Posts: 1,129
Threads: 42
Joined: Dec 2012
Reputation: 49
#8
RE: Game Physics

I thought he meant when the object is glitched with another and it starts growing in speed and changing direction, like trying to get rid of it. Then it's shot away. xD (e.g. a chair stuck inside a fireplace) Isn't that optimization?

One rare glitch that I know is when you walk/run against a corner in Amnesia, for a short duration, and it lets you go through.
(e.g. the developer hid the door key somewhere and you don't want to look for it, you can run for a sec against the middle of two objects, like door frame and wall, and suddenly you go through.)

And here is the apjjm's speedrun abusing some glitches. Read description.

02-12-2014, 10:26 AM
Find




Users browsing this thread: 3 Guest(s)