During the past whole year, I was learning CS courses at OSU. However, I have never touched Java before. Therefore, I decide to learn Java and I am using https://bytelegend.com/ to do so.
ByteLegend is an open source software project on GitHub: github link. It is a free HTML5 MMORPG game where players can learn real world programming knowledges and skills in Java. I found it half a year ago, saved the website link as a bookmark, and was hoping to play it someday to self learn Java.
While learning a new programming language through it, I am also trying to contribute to this OSS project as a game data contributor so that I could improve my skills in using Git.
Also, for some starters like myself, I decide to generalize a RPG game walkthrough in this blog.
There are 255 stars to be earned to get all the achievements. I will try my best to finish all of them by Christmas.
Walkthrough of ByteLedend
Java Island (Newbie Village and Foo Bar)
- Sign up with Github account
- Turn on/off music and choose your preferred language on the right up corner
- On the left up corner, you can see your mouse coordinator
- Click the book to see tutorials
- (1 star) First star: Star the project: https://github.com/ByteLegend/ByteLegend
- Enter the Foo Bar by clicking on the door
- (2 stars) Second star: install JDK on your laptop, then put “java -version” in your terminal shell, copy paste the output into the input box.
- Talk to the old man at the village gate and hand him the java/coffee.
- (5 stars) Click on the Request board to learn about GitHub Pull Request. Your action would be recorded in https://github.com/ByteLegendQuest/remember-brave-people. By completion of this task, you will earn 3 stars. Now you should have 5 stars.
- (6 stars) Install an IDE, I personally recommend IntelliJ IDEA Community Edition: https://www.jetbrains.com/idea/download/. Then copy the “about” content into the input box. This will award you one star and one key to open the chest for 100 coins
- If you go up, the soldier will ask you to wear a Git Amulet to pass. Therefore, you have to go to the star face NPC, pay 50 coins to go to Git Island.
Git Island
- (7 stars) Welcome to Git Island! Click on the chest and install Git. Type “git -v” to find your git version and copy paste that output into the input box to earn your seventh star and a chest key.
- Use the chest key to open the chest. Now you have got the Git Amulet.
- You shall not pass for now. So go back to Java Island. Yes, you have to pay the star face 50 coins again.
Java Island (Java Basic Structure)
- Click on the gate to learn how to clone and run a Java program.
- Open your shell. Create a new folder, name it whatever you want. I named it ByteLegend. In your shell cd to this folder.
- Type “git clone https://github.com/ByteLegendQuest/java-clone-switch-branch” to clone the project in the new folder.
- Open the pom.xml with your IDE, choose “Open as Project”, and then choose “trust the project”.
- Find the Main.java file under src/main/java/com/bytelegend.
- (8 stars) Click the run button next to line 7. You will see Base64 Encoding String in your window. Copy and paste that string into the input box to earn your eighth star and a door key for the gate.
- Click on the second gate to learn how to switch branch and run with a different JDK.
- In your IDEA, click the “main” at the right bottom corner and then choose origin/jdk17, and then click on “Checkout”. Wait for the project to sync and now you are in brank jdk17.
- (9 stars) Click the run button next to line 7. You will see another Base64 Encoding String in your window. Copy and paste that string into the input box to earn your ninth star and a door key for the second gate.
- (10 stars) Click on the bug to start this challenge. Open the “this simple Java program”, change the sign and then click on “Submit Answer” and then wait for a while to earn your tenth star and a knife to kill the bug. For beginners, I highly recommend you to follow the suggestions to practice this on your local IDE but it is not required.
- (13 stars) For the following three challenges, you can do them in either sequence you want. This is for “Create a New Class”: In the online editor, open the Cat.java file and create a public class called Cat. Notice: if there is a style issue, like no new line at the end, you will only get 2 stars. Cheat: https://github.com/ByteLegendQuest/java-create-a-new-class/pull/767/commits/e38ea2849388b40a63e91c1c71bc83d6945698d2
- (16 stars) This is for “Import Class” Challenge 1: In the online editor, open the Home.java and add the import statements. Tip: be careful of typos. Cheat: https://github.com/ByteLegendQuest/java-import-class/commit/89130d7a169b0b7e0ac6c15581bc36e9803eec59
- (19 stars) This is for “Import Class” Challenge 2: Modify the code in Home.java. Cheat: https://github.com/ByteLegendQuest/java-import-class-with-same-name/commit/675584fee9e696763b28cd9abfdfa704c6d28f97
- (22 stars) This is for “Import Class from 3rd Party Package”. This is a hard challenge, it is OK you do not understand it for now, please check here for the answer: https://github.com/ByteLegendQuest/java-import-3rd-party-class/commit/9683c56df10bb992289fff9d29b20c65770d234f
- Now you should have three Gold Swords, use them to destroy the three towers to eliminate the alien.
- (Side Quest) Enter Dungeon: Comment & Javadoc.
- (25 stars) Comment. Change the comment from single line comments into multi-lines comments and multi-lines comments into single line comments. Open the chest for 100 coins.
- (28 stars) JavaDoc Challenge 1. Learn JavaDoc style, open the ChallengeEn.java doc, and edit the author part. This is an easy but IMPORTANT challenge to accomplish.
- (31 stars) JavaDoc Challenge 2. Correct this JavaDoc. There is an obvious error. However, this is not a good challenge, for the other errors which are meant to be tricky. Please check the answer: https://github.com/ByteLegendQuest/java-fix-broken-javadoc/commit/f81b8d9df1ad1e75385c329b8c643d2648afe38a
- With the chest key, get another 100 coins.
- (34 stars) Java Methods Challenge 1. Learn what is a public static void method.
- (37 stars) Java Methods Challenge 2. Learn about data types.
- Destroy the defense tower with the gold sword.
- (38 stars) Method Overload. This is a challenging and rewarding challenge. Tip: do not make your method private like it should be. Cheat: https://github.com/ByteLegendQuest/java-write-overloading-methods/commit/bcc017593330abc779560ed90655f8986c19c0c8
- (40 stars) My personal beautiful solution above will only give you one star. To get three stars, pay attention to the coding style, you need this solution: https://github.com/ByteLegendQuest/java-write-overloading-methods/commit/64c1ef9a29bc21c783525706a21be66748c6cee2
To be continued…
Part II: https://blogs.oregonstate.edu/ligan/2022/11/23/walkthrough-of-bytelegend-part-ii/