This paper is concerned with the distributed generalized Nash equilibrium (GNE) tracking problem of noncooperative games in dynamic environments, where the cost function and/or the coupled constraint function are time-varying and revealed to each agent after it makes a decision. We first consider the case without coupled constraints and propose a distributed inertial online game (D-IOG) algorithm based on the mirror descent method. The proposed algorithm is capable of tracking Nash equilibrium (NE) through a time-varying communication graph and has the potential of achieving a low average regret. With an appropriate non-increasing stepsize sequence and an inertial parameter, the regrets can grow sublinearly if the deviation of the NE sequence grows sublinearly. Second, the time-varying coupled constraints are further investigated, and a modified D-IOG algorithm for tracking GNE is proposed based on the primal-dual and mirror descent methods. Then, the upper bounds of regrets and constraint violation are derived. Moreover, inertia and two information transmission modes are discussed. Finally, two simulation examples are provided to illustrate the effectiveness of the D-IOG algorithms.