rostrum.blog - R is a game engine, fight me (2024)

rostrum.blog - R is a game engine, fight me (1)

tl;dr

R is ‘a free software environment for statistical computing and graphics’. Ahahaha, no it’s not, it’s a game engine. I’ve created a ‘splendid’ list of games you can play—written in R—to prove it. Help expand it.

Stats only!

R is not a general, multi-purpose programming language. It was written to do statistical analysis and make charts. You are literally not allowed to do anything else with it. You should use <LANGUAGE> instead, which is much more suited to your specific use case. R is a joke language for nerds.

You should not read beyond this point if you think, quite rightly, that mirth and frivolity are unsuited to an R session.

Stats only?

Unity. Unreal. GameMaker. Godot. All of these videogame engines are now obsolete.

It is R—humble R!—that represents the future of gaming.

To prove it, I’ve created a list of ‘splendid R games’ in a GitHub repo1 that you are welcome to contribute to.2

Yes, R can be used for fun. Do not tell R Core.

Wait, he’s serious?

I think there’s three kinds of ‘platform’ for games written in R:

  1. For the console
  2. In Shiny
  3. Ported

Games played in the console are pretty straightforward and probably most common. You can run some code, or a function from a package, to launch some code in the R console that you can interact with. A simple option for this might involve use of readline() to receive user input, for example, like Giora Simchoni’s excellent text-based puzzler, Castle of R.

rostrum.blog - R is a game engine, fight me (2)

Shiny can give you a little more flexibility when it comes to graphics and user input, at the expense of needing to host the app and maybe some extra JavaScript skills. A great example of this is Pedro Silva’s winning entry (app, source) to the Posit Shiny contest in 2020.

rostrum.blog - R is a game engine, fight me (3)

The third category is a little more boundary-pushing. Imagine if R was powerful enough to let you port existing games. Well, surprise, ya boi Mike Cheng (aka coolbutuseless) has pushed hard on expanding the capabilities of R to run fast enough and with realtime user input,3 porting the classic Another World (1991) to R, which was showcased at 2022’s Posit conference (source, video, blog).

rostrum.blog - R is a game engine, fight me (4)

Of course, within these ‘platforms’ are genres like word games, arcade games, puzzle games, etc. Will you be the first to create an MMORPG (a massively-multiplayer online R-powered game)?

I am an indie game dev now

I’ve always been interested in how videogames are coded,4 wishing that I could do the same myself. Of course I could simply learn ‘real’ programming languages.

Except that’s blasphemy. Of course I’d rather break my own mind and spirit in an attempt to make R achieve 0.1% of what might be possible in P*thon.

Case in point, I’ve made a few R packages containing some little toys (in order of gooddest to baddest):

  • {r.oguelike} (source, blogs) for a procedural-dungeon explorer with enemy pathfinding and inventory
  • {tamRgo} (source, blog) for a cyber pet in your R console that persists between sessions
  • {safar6} (source, blog) for a text-based re-make of the Safari Zone from the first generation of Pokémon games
  • {ActionSquirrel} (source, blog) for a tile-based, turn-based minigame in the R console
  • {hokey} (source, blog) for minigames that use direct keypress inputs with {keypress}

rostrum.blog - R is a game engine, fight me (5)

I’ve got something in the pipeline that involves extremely rudimentary physics in the R console. Wow! For release in 2023 (because game launches never go wrong).

Ready Player 2

The splendid list must be missing a bunch of games. Please leave an issue or pull request in the splendid-r-games repo to add more examples.

Next stop: letting people run R games in the browser without an installed copy of R. This is already possible with a service like Binder, which can spin up an instance of RStudio with packages pre-installed I did this for {r.oguelike}).

rostrum.blog - R is a game engine, fight me (6)

But soon you might be able to use WebR to play games in the browser without even spinning up RStudio, ooh. So look out for an R version of itch.io in future, lol.

rostrum.blog - R is a game engine, fight me (7)

Environment

Session info
Last rendered: 2023-10-11 12:51:08 CEST
R version 4.3.1 (2023-06-16)Platform: aarch64-apple-darwin20 (64-bit)Running under: macOS Ventura 13.2.1Matrix products: defaultBLAS: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib; LAPACK version 3.11.0locale:[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8time zone: Europe/Rometzcode source: internalattached base packages:[1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] htmlwidgets_1.6.2 compiler_4.3.1 fastmap_1.1.1 cli_3.6.1 [5] tools_4.3.1 htmltools_0.5.6.1 rstudioapi_0.15.0 yaml_2.3.7 [9] rmarkdown_2.25 knitr_1.44 jsonlite_1.8.7 xfun_0.40 [13] digest_0.6.33 rlang_1.1.1 evaluate_0.22 

Footnotes

  1. I originally labelled the GitHub repo as an ‘awesome’ repo, which I later learned has a very specific meaning. You might have seen awesome lists before, like the awesome-quarto repo by Mickaël, or the new awesome-webr list by Nan Xiao. ‘Splendid’ is much more of a Bri’ish word than ‘awesome’, so it feels more natural anyway.↩︎

  2. Note that I have carefully released this post just after April fool’s day, which means I am super, super serious. As usual.↩︎

  3. See the {nara} and {eventloop} packages in particular.↩︎

  4. I like YouTube devlogs by folks like Seb Lague, ThinMatrix, SquidGod, Jonas, TanTan and others. R can never achieve what they’re up to, but I like listening through the logic of what they’re doing.↩︎

Reuse

CC BY-NC-SA 4.0

rostrum.blog - R is a game engine, fight me (2024)

References

Top Articles
I tried this Abercrombie & Fitch trick that’s all over the Internet
Abercrombie Gutscheine September 2024 : 15% Rabatt Code + 77% sparen! | AlleCodes
Skyward Sinton
Jordanbush Only Fans
Food King El Paso Ads
Star Sessions Imx
Nco Leadership Center Of Excellence
Brgeneral Patient Portal
Shorthand: The Write Way to Speed Up Communication
Tx Rrc Drilling Permit Query
Hallowed Sepulchre Instances &amp; More
Publix 147 Coral Way
What is IXL and How Does it Work?
12 Best Craigslist Apps for Android and iOS (2024)
Rapv Springfield Ma
Hillside Funeral Home Washington Nc Obituaries
Nj Scratch Off Remaining Prizes
Worcester On Craigslist
Craigslist Pets Sac
RBT Exam: What to Expect
Comics Valley In Hindi
Toy Story 3 Animation Screencaps
Tygodnik Polityka - Polityka.pl
Mission Impossible 7 Showtimes Near Marcus Parkwood Cinema
623-250-6295
[Cheryll Glotfelty, Harold Fromm] The Ecocriticism(z-lib.org)
EASYfelt Plafondeiland
Today Was A Good Day With Lyrics
Tu Pulga Online Utah
yuba-sutter apartments / housing for rent - craigslist
Happy Homebodies Breakup
Jordan Poyer Wiki
Ficoforum
Booknet.com Contract Marriage 2
Used Safari Condo Alto R1723 For Sale
About | Swan Medical Group
10 Most Ridiculously Expensive Haircuts Of All Time in 2024 - Financesonline.com
Mandy Rose - WWE News, Rumors, & Updates
Dying Light Nexus
Bernie Platt, former Cherry Hill mayor and funeral home magnate, has died at 90
Empires And Puzzles Dark Chest
Barber Gym Quantico Hours
Easy Pigs in a Blanket Recipe - Emmandi's Kitchen
2017 Ford F550 Rear Axle Nut Torque Spec
Dickdrainersx Jessica Marie
Iman Fashion Clearance
15 Best Places to Visit in the Northeast During Summer
The Blackening Showtimes Near Ncg Cinema - Grand Blanc Trillium
Glowforge Forum
Lorcin 380 10 Round Clip
Coldestuknow
What Responsibilities Are Listed In Duties 2 3 And 4
Latest Posts
Article information

Author: Msgr. Benton Quitzon

Last Updated:

Views: 5751

Rating: 4.2 / 5 (63 voted)

Reviews: 86% of readers found this page helpful

Author information

Name: Msgr. Benton Quitzon

Birthday: 2001-08-13

Address: 96487 Kris Cliff, Teresiafurt, WI 95201

Phone: +9418513585781

Job: Senior Designer

Hobby: Calligraphy, Rowing, Vacation, Geocaching, Web surfing, Electronics, Electronics

Introduction: My name is Msgr. Benton Quitzon, I am a comfortable, charming, thankful, happy, adventurous, handsome, precious person who loves writing and wants to share my knowledge and understanding with you.