Gamifying R: A Video Game To Unlock Potential

One of the projects I’ve been working on during the winter break of 2024/2025 is a video game for getting started with R. I’m usually thinking of new ways to communicate and share knowledge during my spare time. I’ve written a website (RGalleon.com), written a textbook (An Introduction to R for Non-Programmers), and taught short courses and in university setting on various aspects of R, Python, and/or SQL.

Developing the Video Game

However, I’ve been noticing that many of my students are now on their phones – all the time! I tried to think of a way that I could connect and share my expertise with those individuals better. In the summer of 2024, I tried developing an app, but it got put on the backburner. However, I buckled down during the winter break and made some serious progress. I tried my hand at Ren’Py, as it is python-based. This made it much easier for me to develop the video game as I already know python, so the syntax was easier for me to pick up and learn over other video game engines. Ren’Py also has a feature that exports your work to XCode for iOS development. (It has some small bugs when porting the game, but does so much of the work that it is still VERY helpful.) At this point, I have a game that works and has the main functionalities that I want.

Below is the opening screen:

The Basic Look and Functionality

Once the user starts the game, they will see a screen that looks like this:

The goal of the video game was to look like a phone texting conversation. I am hoping that it makes folks on their phones a lot more comfortable with the experience. By pressing the play icon, the user can progress the conversation. At certain points, the user will have different options to select. Their choice will prompt potentially different responses. Below is an example of the user’s message and the subsequent responses:

Since the app doesn’t have R built into it, I decided to include images of output so that the user can see what code will look like in R. Here’s an example of that:

The user will be presented with questions throughout the conversation. During these points, the user will have to make different choices. If the user makes an incorrect choice, the Professor character will explain why the choice is incorrect, and will give the user another chance to select the right solution. Once the user selects the right answer, the user will be able to progress.

Looking Forward

At this stage, I am still working out some kinks and polishing the game up (i.e., removing some buttons, including a tutorial for navigation, etc.). I hope to be able to release is during the first quarter for 2025 – so please stay tuned! 🙂

Pokemon Hidden Abilities and Statistics

Disclosure: This post assumes that you are familiar with Pokemon and its newer features (in X, Y, and ORAS).

When breeding for a Pokemon with a Hidden Ability, it can be a major challenge as it adds complexity to the breeding process. However, when breeding with a male and female Pokemon with the Hidden Ability, there appears to be some discrepancy in regards to the probability of the offspring having the Hidden Ability. IGN states that the probability is 80%, while sites such as Heavy state that the probability is 60%. Since there is not uniform consesis on this issue, this warrants our investigation. Thusly, we performed a statistical test (a more advanced one than what is typically seen in an introductory statistics course) to determine what the actual probability is. If you would like a more detailed explanation, you can see the work I did for this on my other blog here at RGalleon.com. Otherwise, I will discuss the basic summary of the results in this post.

However, why should we even care about this? Who actually cares about the probability of this certain event in a video game? Besides the fact that playing Pokemon is a fun game and myself and others desire to fully understand this game, there is a practical reason as well. In industry, it is important to be able to test your product before releasing it the public for release. Nowadays, this can be much easier to do with patches for video games, but broken games or software can still be developed and released. For example, if the Apple released a broken iOS for their iPhone that essentially broke the device, users would flock to an alternative that worked such as Android. Thus, it is still important to test software and products before releasing them.

The results of our study did indicate that the probability is more likely to be 60%.  So, IGN was probably incorrect. However, this study was only done by using Eevee’s. Therefore, if we assume that breeding probabilities are universal across all Pokemon capable of breeding. However, we do know that the gender proportions are not universal across Pokemon. Therefore, it is more liberal to state that all Pokemon have these proportions. However, if we are being more careful in our assumptions, we cannot generalize for all Pokemon that the breeding probability is 60%. Therefore, I would suggest that we need to do more research in regards to this. However, I would not be surprised to find that it would be true that for all Pokemon the breeding percentage was 60.