There are high demands for cooperation among vehicle nodes to disseminate data in vehicular ad hoc networks (VANETs). Game theory approaches have been applied to analyzing and regulating the behavior of nodes in complex networks. However, game theory-based cooperation in VANETs still poses a research challenge due to continuous changes in the network topology. In this paper, we focus on the issue of the common behavior of cooperation in group vehicular interactions. We first present a dynamic member public goods game (PGG) model for real VANETs in which games are carried out within each group. Then, a dynamic grouping PGG (DGPGG) model is proposed to model VANETs with high-node density. In addition, a greedy neighbor selection strategy is proposed to replace the typical random strategy. Finally, the individual reputation of a vehicle is integrated into the DGPGG model. The simulation results show that the DGPGG model can greatly increase the proportion of cooperative nodes in high-density VANETs no matter whether the network is static or dynamic. When the network topology changes quickly, the greedy neighbor selection strategy can promote cooperation between nodes more effectively than the random strategy.