BackgroundVirtual patients provide a safe way to simulate authentic clinical practice. Twine is an open-source software that can be used to create intricate virtual patient games, including elements like non-linear free text history taking and time-related changes to the game’s narrative. We evaluated the incorporation of Twine virtual patient games into a diabetes acute care online learning package for undergraduate medical students at the University of Glassgow, Scotland.MethodsThree games were developed using Twine, Wacom Intuous Pro, Autodesk SketchBook, Camtasia Studio, and simulated patients. Online material included three VP games, eight microlectures, and a single best answer multiple choice question quiz. The games were evaluated at Kirkpatrick Level 1 with an acceptability and usability questionnaire. The entire online package was evaluated at Kirkpatrick Level 2 with pre- and post-course multiple choice and confidence questions, with statistical analysis performed using paired t-tests.Results122 of approximately 270 eligible students provided information on resource utilisation, with 96% of these students using at least one online resource. 68% of students who returned surveys used at least one VP game. 73 students provided feedback on the VP games they had played, with the majority of median responses being “agree” on positive usability and acceptability statements. The online resources were associated with a mean multiple choice score increase from 4.37 out of 10 to 7.96 out of 10 (p < 0.0001, 95% CI + 2.99 to + 4.20, n = 52) and a mean total confidence score increase from 4.86 out of 10 to 6.70 out of 10 (p < 0.0001, 95% CI + 1.37 to + 2.30, n = 48).ConclusionsOur VP games were well-received by students and promoted engagement with online material. The package of online material led to statistically significant increases in confidence and knowledge in diabetes acute care outcomes. A blueprint with supporting instructions has now been created to facilitate rapid creation of further games using Twine software.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12909-023-04231-2.