Game Development Reference
In-Depth Information
The overview of JigLibJS is as follows:
Performance : It is customized and tuned for JavaScript. Hence, this gives
high performance.
Features : Although JigLibJS lacks some of the less common features that
Ammo.js has, it still has enough to cover almost everything.
Overall : We believe JigLibJS is able to fit most developer's needs without
requiring users to have more powerful computers.
Browser support : Chrome, Firefox, IE9, Safari, and Opera.
We chose JigLibJS for this topic as it is a handwritten port.
We can read the code to understand and implement most
concepts and even extend its functionalities as the library
is well-structured.
Comprehending the physics engine concepts
Broadly speaking, a physics engine provides three aspects of functionality:
Moving items around according to a set of physical rules
Checking for collisions between items
Reacting to collisions between items
Physics can be applied to any element of a game scene such as characters, terrains,
and particles. A physics engine for games is based around Newtonian mechanics,
that is, the three simple rules of motion that we learned at school. These rules
are used to construct differential equations, thereby describing the movement of
our simulated items. The differential equations are then solved iteratively by the
algorithms that are used in the libraries. This results in believable movements and
interaction of the scene elements. Within the context of a game, the physics engine
provides the motion of all of the elements of the game world; therefore, it needs to be
able to move any item in the world.
The physics engine for a game tends to be a separate entity which links to the rest of
the code through an interface. It does not care about the entities it is moving, it just
cares about their physical size, weight, velocity, and other such properties. It is a
module that is distinct to the game code, renderer code, audio code, and so on.
 
Search WWH ::




Custom Search