# Minimal, unrealistic physics engine

I'd like to prototype a game with custom, very simple physics. Something similar to older games, anything from Super Mario to Quake 3 Arena.

I'd prefer to avoid realistic physics engine because they usually reduce the control you have over your objects and require you to manipulate such objects in a specific way.

I'd want to be able to update the objects' physical state using my own rules. E.g. I'd like to implement and apply gravity, movements and all the rest using my own logic.

I believe that what I need is a small engine that handles an efficient representation of objects in a space and offers an interface to query it.
I'd also need it to offer decent utilities for very common problems such as collision detection, ray casting, moving overlapping objects away from each other etc.

Do similar engines even have a name?
They're not considered physics engine, are they?

I was planning to work on a 3D prototype, and use JavaScript and Three.js as a language and scene-graph/renderer. However I might be open to 2D environments and/or different technologies.
I'd love it if I could find a set of libraries that are meant to work with each other, so that I don't need to write a lot of glue code.

• Why not just use the built in Physics engine? You can add forces gravity etc with rigidbodies, and even change the transform directly. What is there in the built in physics engine that you don't like? – Rowan Radosav - McRae Jun 1 at 22:13
• @RowanRadosav-McRae: a very common and simple example is moving a character when you press a key, or drag something with your mouse. With realistic physics engines (the ones I tried at least) you need to apply forces and constrains to the objects in order to move them; you can't easily set the object's position to match the mouse coordinate, or move an object by V when the key is pressed, and by 0 when the key is released. – peoro Jun 2 at 9:20
• I don't need (and don't want) the realistic physics - I'd be happier to just set the position of my objects (handling velocity, acceleration on my own, without even giving this information to the engine), and just use the engine to detect collisions so that I can choose how to handle situation I want to avoid (e.g. certain objects overlapping) – peoro Jun 2 at 9:23
• What is the built in Physics engine? From what I understand there's no physics engine shipped with Three.js. There are external physics engine like physijs, but they have the "problems" I described above. – peoro Jun 2 at 9:24