The problem of computing a common point that lies in the intersection of a finite number of closed convex sets, each known to one agent in a network, is studied. This issue, known as the distributed convex feasibility problem or the distributed constrained consensus problem, constitutes an important research goal mainly due to the large number of possible applications. In this work, this issue is treated from a game theoretic viewpoint. In particular, we formulate the problem as a non-cooperative game for which a potential function exists and prove that all Nash equilibria of this game correspond to consensus states. Based upon this analysis, a best-response based distributed algorithm that solves the constrained consensus problem is developed. Furthermore, one more approach to solve the convex feasibility problem is studied based upon a projected gradient type algorithm that seeks the maximum of the considered potential function. A condition for the convergence of this scheme is derived and an exact distributed algorithm is given. Finally, simulation results for a source localization problem are given, that validate the theoretical results and demonstrate the applicability and performance of the derived algorithms.