The presence of mobile nodes in any wireless network can affect the performance of the network, leading to higher packet loss and increased energy consumption. However, many recent applications require the support of mobility and an efficient approach to handle mobile nodes is essential. In this paper, a game scenario is formulated, where nodes compete for network resources in a selfish manner, to send their data packets to the sink node. Each node counts as a player in the non-cooperative game. The optimal solution for the game is found using the unique Nash equilibrium (NE), where a node cannot improve its pay-off function while other players use their current strategy. The proposed solution aims to present a strategy to control different parameters of mobile nodes (or static nodes in a mobile environment) including transmission rate, timers, and operation mode, in order to optimize the performance of routing protocol for low-power and lossy networks (RPL) under mobility in terms of packet delivery ratio, throughput, energy consumption, and end-to-end-delay. The proposed solution monitors the mobility of nodes based on received signal strength indication readings, and it also takes into account the priorities of different nodes and the current level of noise in order to select the preferred transmission rate. An optimized protocol called game-theory based mobile RPL (GTM-RPL) is implemented and tested in multiple scenarios with different network requirements for Internet of Things applications. Simulation results show that in the presence of mobility, GTM-RPL provides a flexible and an adaptable solution that improves throughput whilst maintaining lower energy consumption showing more than 10% improvement compared to related work. For applications with high throughput requirements, GTM-RPL shows a significant advantage with more than 16% improvement in throughput and 20% improvement in energy consumption.