Saturday 27 January 2018

Game Physics: Introduction



What is game Physics?


Just imagine you are playing Super Mario Bros, where he never fells down on broken platform, or never collides with any wall,enemy etc.... or imagine the same in Temple Run.  Sounds fun right but at the same time, you won't be able to collect CoinsfoodsPower ups. Oh! That's  gonna take all the fun of the game.......

So here comes the physics. For most of the games, physics is the most essential element of game. You can think of any game where there is something falling, hitting, flowing, bouncing, etc… any action which can be considered as action in physical world. For these kind of actions to be implemented and to be shown realistic, game physics is used.

Game physics means the introduction of the laws of physics into a simulation or game engine, particularly in 3D computer graphics (although there are many game engines developed for 2D graphics as well), for the purpose of making the effects appear more real to the observer. A physics engine is noting but approximate simulation of real world physics actions in the game world and making the components of a game behaving they are affected by physics. Here the computations are done using discrete values.

Components of game physics include the physics engine, program code that is used to simulate Newtonian physics within the environment, and collision detection, used to solve the problem of determining when any two or more physical objects in the environment cross each other's path.

In coming few posts lets learn how to add physics into your game. Unity provides us a user interface to attach physics into the game.
The basic shooting game I uploaded in previous posts is one of the easiest example of physics implementation in the game.
In coming posts we'll see how do we use physics engine in HTML5 games. this time we'll use Chipmunk physics engine with Cocos2d JS to make our game.
So stay tuned, we'll meet next week with one easy html5 game.

No comments:

Post a Comment

Your comments and suggestions are valuable and are always welcome and will be helpful to me to create a good quality content. Please leave your thoughts