   Why all the virtual relity engines use physics
  I always wonder why Second Life, Twinity and other virtual realities use physics? What do they provide? A little world similar to our to walk, dress, talk, sometimes drive, ride or something else. But where is physics here can be? Yes, driving, but it can be solved heuristically - car is an object that slides on surface, like players in many MMO games. Why developers involve physics to fit their products on thousands of servers instead of use easy MMORPG model to fit all the world on several ones?   
Quote:car is an object that slides on surface, like players in many MMO gamesAnd calculating its motion is physics.In its most trivial form, the location of car is s += v*dt. That is how "players" are moved. But that gets boring really fast, and above all, is not flexible.In order to be fun, they must also do some collision response, which is rigid body physics.So might as well simplify everything and use proper physics engine.Quote:Why developers involve physics to fit their products on thousands of servers instead of use easy MMORPG model to fit all the world on several onesWhy do they use computers at all? Dungeons and Dragons can be played using nothing but pen and paper.   ;  Actually MMOs do use large clusters of server machines per world. Even wbhen they didnt do anything as intensive (processing wise) as 'physics'. I recall that some of the largest did use more than a thousand consumer grade computers (cheap and easily redundant) to run the simpler simulations.But in any case the 'physics' can take a whole lot more processing but is required to add that additional step of 'realism' (even if it doesnt impact theactual simulation (eye candy factor)) while others like more correct projectile movement can make the game more 'real'.  Of course some of the 'physics' like ragdoll effects can be done on the client siide as the position of subparts of a NPC figure have no relevance to the simulation and thus can independantly be offloaded.Wait til they decide to offer a higher level of AI for behaviors of 'intelligent' objects,  that will increase the processing needs by a magnitude further (and is the reason why so many games still depend on quite limited script logic to control the NPCs).   Some of the recent MMOs use the same pathetic scripting of 10 years ago because of the other problem with more complicated AI -- the cost of producing and debugging more complex logic.There is a simple saying -- "twice as complicated, four times the bugs";  You see there is no physics in ball bouncing on the screen even if speed simply mirrored on screen edges. Also in most games there is no physics when player moves. Yes, you can call it physics, but there is no more than player projection on the ground mesh.The physics is to solve equations or iterations with objects position, orientation, collision response, friction.So the question is why every object in virtual world is being processed as difficult physics entities - player has some pressure on the block and friction, cars can fly over hills or can collide with objects and make them move.Yes, it's all beautiful. But why not to use strategy games approach? Player checks minimal path, transport objects detect the same. And in programming way it looks like moving spheres over the surface. And no friction equations, tensor multiply. So developers could economy about 90% of power by removing needless physics. Why needless? Because it's a world for people for chatting, maximum car driving, but do they need some reality in those driving sessions? As told in our country: "Car is not a luxury, it's just a transport tool".Or is there maniacs that like to break walls of cubes on their virtual car and spend hundred of dollars for traffic? Because with non-physics approach these worlds could fit mobile devices with a little expensive cell internet (in our country 1 MB mobile internet = $1).   ;Quote:Original post by Anton VatchenkoBut why not to use strategy games approach? Player checks minimal path, transport objects detect the same. And in programming way it looks like moving spheres over the surface. And no friction equations, tensor multiply. So developers could economy about 90% of power by removing needless physics. Why needless? Because it's a world for people for chatting, maximum car driving, but do they need some reality in those driving sessions? As told in our country: "Car is not a luxury, it's just a transport tool".What makes you think that some don't? I'm fairly sure WoW doesn't use 'proper' Newtonian physics for character and object movement, and neither does Eve use a full gravity simulation for it's planets and craft.You create a model that works for the kind of gameplay you want to support. If Second Life has decided to use a 'proper' physics engine then it's because they've decided that that's the level of simulation that they need. (In Second Life's case, this is probably because they need to support arbitrary player-created objects, where it's not practical to code up specific movement code for every case).   ;Quote:Original post by Anton VatchenkoSo the question is why every object in virtual world is being processed as difficult physics entities - player has some pressure on the block and friction, cars can fly over hills or can collide with objects and make them move.Because of design choice to include complete physics simulation, so that modders have full freedom. Rather than painstainkingly work out approximations, put 500 blocks next to each other, tip the first one, see them fall over.Quote:Player checks minimal path, transport objects detect the same. And in programming way it looks like moving spheres over the surface. And no friction equations, tensor multiply.By this logic, computers are redundant. Just use imagination, and play DnD with twenty sided die.Quote:As told in our country: "Car is not a luxury, it's just a transport tool".WoW is transport tool. Virtual Worlds are Bentleys and Aston Martins. They *are* luxury.Quote:Or is there maniacs that like to break walls of cubes on their virtual car and spend hundred of dollars for traffic?Yes, plenty of them.Quote:Because with non-physics approach these worlds could fit mobile devices with a little expensive cell internet (in our country 1 MB mobile internet = $1).SecondLife is not meant to be played on mobile devices. It is a flexible, scriptable, open-ended simulation. It can be used for chatting, but it can also be used to build a roller-coaster ride.This is similar to complaining that the $500,000 Ferrari can't drive the mall, since it gets stuck on speed bumps. It's not meant for that. There's plenty of cars much better suited for that, and much cheaper as well.   ;  Why user-created objects need physics? What usually users create? Houses, tables, chairs, beds. Can it be positioned without physics? Yes. Like a player in most games projected to the ground. So I think physics in virtual worlds is used only for box stacks - I always dreamed to spend hundreds dollars to buy virtual space, create a box stack and run on it and pay for huge bills on internet.So still don't understand why some companies decide to include physics in their worlds. Everything user create can be processed without physics - just once place it and make it still. Do you usually (in real life) move near chairs, tables and try to collide with them? It could be enough like Sims-style - no physics, and fast and stable world.   ;Quote:Original post by Anton VatchenkoWhy user-created objects need physics? What usually users create? Houses, tables, chairs, beds. Can it be positioned without physics? Yes. Like a player in most games projected to the ground. So I think physics in virtual worlds is used only for box stacks - I always dreamed to spend hundreds dollars to buy virtual space, create a box stack and run on it and pay for huge bills on internet.Some people do that.Quote:So still don't understand why some companies decide to include physics in their worlds.Because they have audience which makes use of it.Obviously, SecondLife has only in the range of 20,000 active users (numbers vary wildly), but it's a loyal audience. Habbo however has millions.So apparently, majority agrees with you. Quote:Everything user create can be processed without physics - just once place it and make it still. Do you usually (in real life) move near chairs, tables and try to collide with them?Yes. I rely on collision so I can sit. Without collision, that would be difficult. I also rely on friction, drag and everything else.SecondLife is a full-blown physics simulation. It is what defines it.From practical perspective, starting with full physics simulation simply avoids the later feature creep. Collisions must be resolved anyway for pathfinding, since they prevent degenerate geometry and many other issues. Gravity and friction make placement trivial and natural. Objects can be pushed around, rather than manipulated in some non-descript space. When position, one doesn't need to worry about floating point accuracy that could cause overlap, objects just settle naturally.Then there's advanced features, such as clothing simulation (just design cloth, and it animates itself, rather than having artist spend 3 months for single shirt), wind effects (flags, trees all behaving naturally without any effort on animation), procedural content generation that doesn't require manual animations.All of these issues can be seen with approximations. Objects stuck in walls, overlapping each others, multiple objects tangled and triggering collisions preventing them from being moved, objects falling through floor due to accuracy issues, cracks between objects and such.All of this can be solved with physics simulation.   ;Quote:So still don't understand why some companies decide to include physics in their worlds. Everything user create can be processed without physics - just once place it and make it still. Do you usually (in real life) move near chairs, tables and try to collide with them? It could be enough like Sims-style - no physics, and fast and stable world.becauseQuote:All of these issues can be seen with approximations. Objects stuck in walls, overlapping each others, multiple objects tangled and triggering collisions preventing them from being moved, objects falling through floor due to accuracy issues, cracks between objects and such.All of this can be solved with physics simulation.Thing is, that full fledged physics systems remove a lot of work from the coders, and make the system a lot faster.* Many objects need to react in position to collisions.  For all but the simplest cases, the solution to the problem takes a lot of work.  Look at how many games are out there where you can fall through the world, or otherwise get pushed through a wall.  Physics engines provide tested code bases that minimize the chances of that type of bug.* Many objects need to react in effect to collisions.  Boxes throw up dust. Tires squeal and spray smoke. Bullets spark. Grenades explode.  Writing code in an object that checks for every possible interaction leads to buggy code, and repetitive code.  Look at how many games are out there where stuff just fails to collide, or fails to do damage.  Physics systems let you setup interactions all in one place.  Anything that needs to be notified about a relevant collision can be.  Object code becomes much more simple, since receiving a callback means you know you have to react.* Many objects and AI need to check collisions for decision making.  Having EVERYTHING checking collisions leads to lots of redundant checks, and lots of wasted time. Physics systems encompass collision systems. Collision systems centralize the collision checks into a single pass over all possible colliders.  This is limits the number of tests that need to be done to find all the contact points.  Doing all those checks individually, causes many repeats checks while looking for those same contact points.   ;  Yes, you wrote I waited to. Is it really difficult to implement world without physics? A lot of work? I don't mention that physics engine is quite hard - we'll imagine that everybody buy physics engines.Clothes simulation? I used to wear a block around myself so I walked with it interpenetrating with my body. Bad impressions.Realistic flags movement? Why not to generate it once and just rotate animated object to the wind direction.Pushed through the wall? It's not a physics. Collision can work without physics. I can write walking hero like Quake has but without hard Lemke systems, Newton friction - so without needless 90% of code.Boxes makes dust? If you'll show video I will believe. But it could be just client effect, not server processing.Bullets spark? It's not physics. It's visual effect - the same as previous. Or maybe rain drops on the screen could be processed on server for all players? Server could just send "It's raining" and client makes this effect.Explosion. Let's look what it makes with physics. You need to check in some radius for object (physics engine won't make it for you) and add some forces so objects will change velocity and get some damage. Without physics - the same check but some animation like splash around the object and the damage. Nothing different, only without checking for velocity change.What else? Unique user objects? Do you need real physics interaction? Is it interesting to push tables, chairs. It's not as realistic as in real life. Those objects are lifeless cubes. If you stay on virtual shelf it cannot break into several parts, it's just a cube.So summing this. Creatures - can be without physics. Transport - the same. Flags - processed once. Houses - processed when insert them. Chairs, tables can be moveless - it's interesting to push them only for some maniacs.   