Switched Tag

Switched Tag

This is the first mixed signal circuit video game that I am making.

This game is basically reverse tag. In order to win, a player must become “It” and collide with the opposing player.

A player becomes “It” by hitting the pendelum at its lowest point with a button press,
the player who has been the closest to hitting the pendelum at its lowest point stays as the “It” player.

I thought of the idea to make this game from trying to think of a simple game that consisted of mostly collision detection.

Collision detection works by using an equation that yields zero in the event of both player’s coordinates being the same.

diff_sum = (xdiff + ydiff) + (xdiff – ydiff)

xdiff = x_p2 – x_p1

ydiff = y_p2 – y_p1

diff_sum is zero only if the coordinates of the 2 players are the exact same i.e. xdiff = 0 and ydiff = 0.

Also order for subtraction doesn’t matter if xdiff and ydiff are zero or the same, a zero will be yielded if both are zero.

Link: https://github.com/adct-the-experimenter/ms-circuit-video-game/tree/main/games/switched-tag