Logo

The Data Daily

A Review of Games Written in R on CRAN | R-bloggers

A Review of Games Written in R on CRAN | R-bloggers

[This article was first published on , and kindly contributed to R-bloggers ]. (You can report issue about the content on this page here Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

R is primarily designed for statistical computing and graphics, and that’s where I’ve spent most of my time in R. This includes developing an R package, exSTRa, for my PhD. R isn’t an ideal language for video games, without native support for reactive programming. Though where there’s computing, there are games.

I decided to look at what games are available on CRAN, searching for either “game”. Games outside of CRAN may be covered in another post. For each R package that was a game, I’ve given a short review.

In this post, CLI stands for command-line interface (games without a graphics window).

A CLI tile puzzle game where you slide the board in a direction to combine the same number. It didn’t come with instructions on the rules of the game but is similar to a game called Threes, so I was able to work it out. Overall a good implementation.

A CLI text adventure game that gets you performing some data wrangling in order to solve the puzzles. This is a game that has a reason to be in R. I quite enjoyed it, really. This game could be recommended to students for teaching R. Pietraszko uses a password which is very difficult to guess.
At first, try to hack an account of a person which is not as cautious as Pietraszko.
But who is the weakest point? Initial investigation suggests that John Insecure doesn't
care about security and has an account on the Proton server. He may use a password
which is easy to crack.
Let's attack his account first!
Problem 1: Find the login of John Insecure.
Bit has scrapped 'employees' data (names and logins) from the www web page of Technical
University of Warsaw. The data is in the data.frame `employees`.
Now, your task is to find John Insecure's login.
When you finally find out what John's login is, use
`proton(action = "login", login="XYZ")` command, where XYZ is Insecure's login.

BetaBit is a sequel to proton. Wait a minute, it has proton in it along with two other games! These are The Frequeon Game and The Regression Game. The programming tasks get a bit harder here, but still a good way to have some challenges for learning R. _____ _ _____ _____
|_ _| |_ ___ | __|___ ___ ___ _ _ ___ ___ | __|___ _____ ___
| | | | -_| | __| _| -_| . | | | . | | | | | .'| | -_|
|_| |_|_|___| |__| |_| |___|_ |___|___|_|_| |_____|__,|_|_|_|___|
|_|
You've Got Mail
From: [email protected]
To: [email protected]
Subject: Interested?
Hi,
We are looking for a smart guy with extraordinary hacking skills.
Our mutual friend assured us that you are our man.
TL;DR: We are observing a group of terrorists that are planning something.
We have intercepted some data, but do not know how to read it (attached).
There is a password somewhere. We have to find it to stop terrorists.
Would you like to join our team? Help us and we will help you in the future.
It's not clear how to start. Our informer told us that the key is somehow related with
three key phrases: `guns`, `and`, `roses`.
Probably these are the names of some messages / datasets.
Would you like to check if you have access to any of them?
If you want to help, please type:
`frequon(subject = "Re: Interested?",
content = "Text of the message that you have access to")`
so as we could read the message too.
Remember: any time you want, you can get some piece of advice, just
type: `frequon(hint=TRUE)`.

This isn’t really an R game, as it instead provides a function that is supposed to submit a form to https://zty.pe to include functions from a package. In my case, that didn’t seem to work and I just got ordinary words in the browser.

A transport puzzle game where you push crates around in a warehouse to get them to storage locations. An alright game. I couldn’t get it to work in R Studio, but did work in the R Gui on Windows.

This is basically Connect 4, except you can choose the size of the board. You can play either against the AI or against another human player.

Pizzle puzzle is a variation on the jigsaw puzzle, where instead, you have to shift rows of pixels until the image matches the original pixel image. Not a bad CLI game at all. It can get quite challenging at the harder difficulty levels.

A graphical R implementation of the classic game snake. Unfortunately, it feels a bit laggy where you have to press your input when the snake is one block before when intending to move.

Images Powered by Shutterstock