BackgroundCardiopulmonary resuscitation (CPR) is one of the most fundamental skills a nursing student should be trained in. Gamification in education involves using game elements to increase motivation, engagement, and personalization of the learning process. The gamification method creates competition among students using various methods, comparing to the role-playing method which is a teaching method that allows individuals to actively engage in simulated scenarios. Therefore, this research aimed to compare the effect of CPR education using gamification and role-playing on the self-efficacy of nursing students.MethodsThis research was a quasi-experimental intervention type with three groups. A total of 154 nursing students participated in this study and were divided into intervention with role-playing (n = 53), gamification (n = 60) and conventional (lecture) (n = 41) groups. In the conventional method, CPR skills were taught to students using practical exercises. In the role-playing method, after training with moulages, a scenario was presented, and students were assigned roles. In the gamification method, after training with moulages, a scenario was presented, and after that, Kahoot software was used to create a sense of competition and excitement in the game. Self-efficacy scores were measured before and after interventions. Self-efficacy in CPR, knowledge, and skills of nursing students in CPR were assessed in each of the three groups using The Basic Resuscitation Skills Self- Efficacy Scale.ResultsIn the present study, 154 nursing students, including 92 females and 62 males, participated. There was a statistically significant difference in the mean self-efficacy scores before and after training in both the gamification and role-playing groups (P < 0.05). There was a statistically significant difference in the mean self-efficacy scores among the three groups (gamification, role-playing, and lecture) (P < 0.05).ConclusionBased on results it can be concluded that the teaching method used in CPR training affects the self-efficacy of CPR. Active methods, have a greater impact on CPR self-efficacy.