Share your repls and programming experiences

← Back to all posts

ruby - A cryptocurrency mining game

Have you ever been wondering how is it like to mine cryptocurrency but you don't have a powerful enough computer to make it profitable? No? Just as I thought.
Ruby is a cryptocurrency mining game about spending all of your money on better hardware and trying to become the richest person in the world.

Getting started

To start playing the game, go to my repl (link below the post) and run it.
You should see a main menu screen like in the screenshot below:

If you do not see a screen like this and the game crashes with a StackOverflowException, please give yourself an Explorer role under Roles on and try again.

If you do not have an account, press the down arrow key to navigate on the Signup button, and press enter. Then enter your username and password. Be sure to remember it, or save it somewhere! Then you can login by pressing enter when hovered over the Login button. Make sure you enter your account credentials correctly! The logging in and signing up is managed by the backend server written in Node.JS.

If this is the first time playing this game, an intro should show up. After it finishes, a terminal-like interface should show up. You can think of it as your computer. All of the work is done in it.


Currently there are 3 tutorials available in the game. The game's basics, upgrades and hacking. To view them, navigate to the tutorials directory by typing cd tutorials, then you can view all of the tutorials by typing ls, which shows all of the files in the directory. Open a file by typing cat [filename], for example cat 001_Basics.txt. If you have any questions, feel free to ask them in the comments section!


The main goal of the game is to climb the leaderboards - which can be shown by typing leaderboards [rubies/money] - and become the number 1 player.

Now that I've told you how the game works, let's talk about some technical stuff.

I made this game alone in 2 weeks, and the hardest part was probably the backend server for data saving, which has been done using a MongoDB database.

Technical achievements

  • "Real" account system, made with databases.
  • 2,450+ lines of code on the client and 550+ lines of code on the server, which makes a total of over 3,000 lines of code. (I don't know if I should count this as a technical achievement, but whatever.)
  • ...and that's probably it.


  • 4/11/2019 12:50 PM UTC -> Added an auto-save feature which automatically saves your progress every 10 minutes.
  • 4/12/2019 4:37 PM UTC -> Added hacking (Yayyy!!) alongside with an updated tutorial for upgrades, a new tutorial for hacking and the whois command.
  • 4/17/2019 9:23 AM UTC -> Fixed the leaderboards sorting server-side and made the hacking more balanced.

Link to the repl

If there are any cheaters/bugs please report them to me!
Any feedback is appriciated!


could these actually have irl value like real currency?


it doesnt run for me, do you know whats wrong? this is what its giving me

Command/CommandHandler.cs(70,49): warning CS0168: The variable `e' is declared but never used
                                  Command/Commands/ConnectCommand.cs(25,35): warning CS0168: The variable `e' is declared but never used
                  Command/Commands/HackCommand.cs(143,31):warning CS0168: The variable `e' is declared but never used
                                                          Command/Commands/LeaderboardsCommand.cs(59,62): warning CS0168: The variable `e' is declared but never used
                                               Command/Commands/LeaderboardsCommand.cs(111,62): warning CS0168: The variable `e' is declared but never used
                                     Command/Commands/ShopCommand.cs(203,57): warning CS0168: The variable `e' is declared but never used
                   Command/Commands/ShopCommand.cs(231,57): warning CS0168: The variable `e' is declared but never used
 Game/MainGame.cs(73,31): warning CS0168: The variable `e'is declared but never used
                          UI/MainMenu.cs(121,47): warning CS0168: The variable `e' is declared but never used
                                                  UI/MainMenu.cs(233,55): warning CS0168: The variable `e' is declared but never used
               UI/MainMenu.cs(328,47): warning CS0168: Thevariable `e' is declared but never used
                                       UI/MainMenu.cs(426,55): warning CS0168: The variable `e' is declared but neverused
    Game/GameStory.cs(9,26): warning CS0169: The private field `Ruby.Game.GameStory.mainGame' is never used
                                                Compilation succeeded - 13 warning(s)

                                                   Up Arrow/W - Previous option        Down Arrow/S - Next option   Enter - OK (Accept)
                      Unhandled Exception:
     Stack overflow in unmanaged: IP: 0x558b7f00950c, fault addr: 0x7ffeaf15dce0

                     Unhandled Exception:
    Stack overflow in unmanaged: IP: 0x558b7f07fbb6, faultaddr: 0x7ffeaf15ce28
                    Stack overflow in unmanaged: IP: 0x558b7f00950c, fault addr: 0x7ffeaf15bce0
                                    [ERROR] FATAL UNHANDLED EXCEPTION: Nested exception detected.
                                      Original Exception: at (wrapper managed-to-native) System.RuntimeType.getFullName (System.RuntimeType,bool,bool) <0x000ae>
                                          at System.RuntimeType.ToString () <0x00010>
                          at System.Exception.GetClassName() <0x00027>
            at System.Exception.ToString (bool,bool) <0x00063>
   at System.Exception.ToString () <0x00016>

                                            Nested exception:at string.FillStringChecked (string,int,string) <0x0001e>
                                                          at string.Concat (string,string,string) <0x000a2>
                                                at System.Exception.ToString (bool,bool) <0x00075>
                                       at System.Exception.ToString () <0x00016>

                     exit status 1

I think the server may have hiccuped for a second there.


@launcherman08 Yeah, because I was changing some stuff in the server so it might've crashed but I don't think it should anymore.


But now when I tried again it works


Hey, I was playing yesterday and I got off, but when I came back to login today, it showed this.


I am having troubles navigating the main menu, because Ios logi keboard arrows do not trigger the same event as desktop users. Will there be another way to navigate it.


@XavierDD Sure, I will add a different way to navigate it later today.


@XavierDD Done! You can now navigate the main menu using the W and S keys.


@XavierDD Run it on because for some reason it doesn't work on the site I don't know why. If it still won't work, try giving your self the Explorer role in your account settings.


@Snowflake I think I already have it, and I'll try it on the repl.


Hey, I kept getting an error message. :< Is anyone else experiencing this?


@KatyaDelaney Could you send me a screenshot?


@Snowflake I'm not getting it anymore! :O


@KatyaDelaney Oh well, at least it's fixed. I sometimes also get an error when I run the repl, but then I refresh the page and everything works fine.


I clicked on this thinking it was programmed in Ruby lol.


it's not made in Ruby tho...


@theangryepicbanana Ruby is the cryptocurrency's name that is used in my game, and the game is written in C#


@Snowflake I know that, I was just making a joke


@theangryepicbanana Well, I guess I didn't get the joke. Haha