Thursday, October 17, 2013

2D Game Physic Simulation using DirectX

This is one of the assignment I did when I was taking diploma in TARC, where I was instructed to simulate simple car physic with a little bit of AI movement and collision detection. Below are the screen shots for the application I did.



P.S. The red with black car is AI and the red with blue car is player which controlled by me.

Once the player car triggered the sight distance of the AI, the AI will start chasing, in every loop, AI will calculate the heading direction to the player. Once the player is out of range, the AI will stop chasing.

For the collision detection part, I made sure that both car cannot move out of screen and collide with each other. The football served as obstacle where both car cannot pass through.



No comments:

Post a Comment