Devember Day 3 - Basic MultiPlayer Movement

by Tim Liou • in misc • on Dec. 03, 2015

Today's code is on this tag. The complete code can be found in here.

First, Let's draw some rectangle on the screen. You can check out DrawRect function. Be careful that the coordinates of angles in the rectangle might sit outside of the screen. This might cause to memory access violation.

Then, it is about physic of motion. v = v_0 + at x = x_0 + v_0t + \frac{1}{2}at Also, change the unit from pixel to meter. You can feel that motion is much better.

Each entry of player_info struct array store the information of each player. Now, we have multiplayer.

See you tomorrow!