Hacker News new | ask | show | jobs
Show HN: I'm writing an MMORPG game for learning programming (bytelegend.com)
229 points by blindpirate 1551 days ago
Hi, I've been developing an HTML5 MMORPG game where people can submit code to play a game, like collect items, destroy defense towers or kill monsters, etc.. I've been working on this for over 1.5 yrs (all my spare time) and now it's ready for preview, does anyone want to try it out? It's mostly opensource (and the rest will be opensource sooner or later)

Please access it with PC, it's an HTML5 game: https://bytelegend.com/

I really want it to expand to more languages, but right now I've only finished Java part. I wonder if anyone can help me with other languages. Besides, I'm not a good game story designer, but I really really want it to be a game with a fantastic story. Any help will be appreciated.

29 comments

No communication between players, what's the multiplayer aspect?

And the programmer NPC in the bar called me "a gay". At least it's an authentic MMORPG culture.

TBH, I don't have a good idea how people do the teamwork. That's why I ask for help here. Ideally, you can click another character to send DMs, and click yourself's character to speak something publicly (which is already implemented but a bit hidden). But what then? People should be able to make a team to fight with something, but I haven't designed how to make it in a programming-learning journey.
Hey, cool idea.

I didn't find it intuitive when first landing on the site. I think I need to sign up first before I get a character that can walk around?

I think it would be cool if when landing on the site I'm given a character and can walk around like a signed in user, maybe forcing me to sign up if I want to leave newbie village.

>I think it would be cool if when landing on the site I'm given a character and can walk around like a signed in user, maybe forcing me to sign up if I want to leave newbie village.

+1 to this

Wow, this is sick!

Hide the hints, add more art, maybe some more mechanics to hide the fact you're learning at first: I think this could be effective and a seller!

Makes me think web programming is the dark souls of programming (I mean Haskell is probably much closer but the sheer amount of what you need to learn for web is what makes that association in my mind - I know it isn't exactly right, as someone who has played all the Souls-like games from Fromsoft) lol.

Webdev is the JRPG of programming - countless barely integrated systems which have compounded over years of legacy buildup into a Gordian behemoth no single individual can truly understand.

C is the Dark Souls of programming - ostensibly simple but with a bunch of unintuitive pitfalls and recommended optimizations. This maps C# and C++ onto DS2 and DS3 pretty well.

Then are Sekiro and Elden Ring like Go and Rust?
> Webdev is the JRPG of programming [...]

Beautifully expressed.

seconding what baash05 said, want help? this sounds like a really neat project and I'm honestly better with helping other people's ideas come to fruition than I am starting my own.

nb: i am homeless so my availability is somewhat sporadic since it's dependent on when I can charge my phone and such. but I got a laptop hiding out somewhere I just never use it out on the streets because it's a battery addict and drains that like an alcoholic does whiskey. also it's a 2006 dell xps m1701 so it's actually just a hefty beast.

but yeah. let me know if interested as well. email in bio etc

This is very cool, but I imagine would be favored by people already well familiar with programming. When the average person sees the "Socket I/O" quest, they have no natural reason to find it interesting besides the small percent of people who will just do any task if it's part of getting to 100% completion. IMO a more enticing premise would be to wrap every task into an internal narrative.
You are absolutely correct. That's why I ask here. I'm a bad story designer, but I really would like it to have a good story to motivate people.
I immediately recognized the Tesla coils from the game C&C Red Alert. Watch out for copyright there.

Some feedback

The game is a bit visually-loud. It's overstimulating for me, I can't immediately figure out what I'm supposed to do to get playing. It took me a while to find the login button.

Perhaps a fix is a smaller field of view with pan and zoom? Take my advice with a grain of salt, I'm no game designer.

Oh come on, nobody is going after an open-source project using some 25-year-old sprites. Nearly all his artwork looks to be borrowed from old tile-based games.
Thanks for the reminder and feedback. Issue created here: https://github.com/ByteLegend/ByteLegend/issues/119

I totally understand the copyright risk. The reason I use it was that I love RA2 so much - that's almost the only game I played when I was a child. I'm proud and happy to put the sprite into a game I design and write. If there's any issue from EA, I'd immediately roll them back, sadly.

Should be fine so long as he isn’t profiting. They are in openRA and that’s an open source version of red alert.
> Should be fine so long as he isn’t profiting

I don't think that is a valid legal argument.

Based on the last ownership of Westwood Studios, EA probably owns the rights to the Red Alert sprites. So "should be fine" depends on how litigious EA chooses to be.

My first instinct when I see EA is to assume the worst, but they've allowed "Return of Reckoning" (an unlicensed version of their now closed MMO: "Warhammer Online: Age of Reckoning") to remain operating for years now so I really have no idea.
True but it’s probably safer than having characters that look like Mickey Mouse
I would think that OpenRA can use the Telsa coils (and other copyrighted elements) because it's a mod for Command & Conquer, which wouldn't be transferable to another project unrelated to C&C
It's not a mod, but as far as I know they simply do not distribute the sprites and content themselves.
it's not a mod, but regarding the assets owned by EA, it's using the license granted by the 'C&C Franchise Modding Guidelines' [0], so that's why I used that word

[0]https://www.openra.net/download/

Fair enough
You dont need a copy to Play openra
You don’t. I just installed it yesterday on a new Linux laptop. What’s interesting about openra is you can run multiple copies at the same time on the same machine to play against yourself for fun
I know, but the files are still not distributed by Open RA, they are downloaded during the installation from the C&C distributor.
I learned to program working on an emulator for an MMORPG called Ultima Online. Emulator was RunUO made with C# started with it in 2001.

I’ve always thought a cool course would be to teach programming with fun examples extending the game with new weapons , items, NPCs, etc

Similar story to me a few years later. I starting out by hosting a Lineage 2 server emulator back around 2005. Slowly got into tweaking a few things, debugging performance issues, eventually writing whole new features. Learned a whole lot about databases from that experience so in 2010 at my first helpdesk job, they found out "you know SQL?!"...so I then was given a ton of reports to write, and quickly a whole lot more responsibilities, launching my career into databases.

While working as a data analyst a few years later, I wanted to improve my programming skills. So as a side project I did a whole lot of work on a ground-up rewrite for a year or so...I had reimplemented: player and npc movement code, npc spawning, a basic AI system (attack, flee, loiter, travel), pathfinding, inventory and equipment slots working, item drops in the world and being able to pick them up, chat (direct and global), and probably a few more things I can't remember!

I was pretty uninterested in the actual Lineage2 gameplay at that point, so I was trying to get the basics working so I could implement a more interesting combat system / skill tree. The game engine had some extreme limitations on what you could actually control just from the server side, but I had a system working that repurposed a news bulletin UI that the engine had in-place to inject some custom HTML based UI's that I could send over from the server. So I was able to disable the existing skill tree UI and inject my replacement system that I was designing.

That project got put on hold when I decided to start my company in 2015. It was amazing for learning, because I was actually interested in it. As I got older, my interest in gaming and gamedev have both waned. No interest at all in going into that hyper competitive market!

"Your first challenge is to star our GitHub repository"
Looks very cool! Good job!

Interesting to see that you have chosen Kotlin for the client parts as well. I am assuming it's compiling kotlin to javascript?

What do you think of it so far?

It would be nice with an available option not to sign in with Github since it seems like the requested stuff like "act on your behalf" makes me not want to login.

It's too much of an hassle to create a new github just to play a game so that is unfortunately where you lost me.

Hi, I fully understand your concern (because if I were you I might think the same as you). First of all, a GitHub app can only "act on your behalf" in the repository/organization where it's installed (which is only https://github.com/ByteLegendQuest). It has no permission to access any other resources outside.

Yes, it's using Kotlin multiplatform, so I can write code once and use it at both frontend and backend.

Because the game highly depends on GitHub API and GitHub actions (when you submit code answer in the game, you are actually creating pull requests), using a GitHub account would be the best option.

Pretty awesome that making an MMO has gone from something requiring a budget of millions to being something an indie dev can put together with Unity and a few cloud services now. It's impossible to overstate just how far the tooling for game dev has come in the last 10 years. What the OP is describing would have been a silly pipedream in 2010.
For the record people were making "MMO's" as hobby or academic projects many decades ago. The earliest MMOs were text based multi-user dungeons and folks were programming them by themselves and running them on university hardware in the 80s. The biggest difference is obviously the lack of graphics, but you might be quite shocked at the sophistication of the gameplay mechanics and multiplayer in the MUDs of the 80s and 90s.
A couple of questions:

- The progression seems to require going to Git island first which is not possible because I lack gold. It hints at going to the chest under the tree which says: "Ask a friend for an invitation code to open this chest". What friend? What does this mean?

- Even though I can't walk there, I seem to be able to click the challenges and do them (I guess this might not be intended, as it allows you to do things completely out of order). I did all of the challenges for "Java Reference and Value" and received only 2 stars on the second challenge. I suppose this means I did something wrong/sub-optimally, but I did not see any feedback on what that was. Did I miss it?

By design, you should be open "IDE" chest to get enough gold to go to Git Island. Didn't you open that chest?

The "invitation code box" is a fallback when people happen to use up their gold.

``` I'm learning programming in a game, come to JavaIsland coordinate (BJ, 94), open the chest with my invitation code 5ZwPT6OWwipmHRG, you and me can both get 500 gold. Join me at ByteLegend https://bytelegend.com ! ```

> Even though I can't walk there, I seem to be able to click the challenges and do them

It's intended. You can finish the challenge there, but you can only get a "key" but can't have the chest open immediately. You have to go close to the chest to use that key to open the chest. The intention is to allow people do challenges without going through the whole story. I'm not saying this is perfect, but this is what current it's designed.

> I did all of the challenges for "Java Reference and Value" and received only 2 stars on the second challenge. I suppose this means I did something wrong/sub-optimally, but I did not see any feedback on what that was.

When you do the challenge, you actually create a pull request on github. There's some comments in the pull request telling you what's the issue in you code. However, I shouldn't have told you this if this is a well-desgined game UI. Thanks for the feedback!

> By design, you should be open "IDE" chest to get enough gold to go to Git Island. Didn't you open that chest?

I now see there was a circle with a key that I was supposed to press to open the chest and get the gold. It wasn't obvious and since it didn't hinder progression I didn't realize like I had/should/could click that.

> ``` I'm learning programming in a game, come to JavaIsland coordinate (BJ, 94), open the chest with my invitation code 5ZwPT6OWwipmHRG, you and me can both get 500 gold. Join me at ByteLegend https://bytelegend.com ! ```

Where was I supposed to find this text?

> When you do the challenge, you actually create a pull request on github. There's some comments in the pull request telling you what's the issue in you code. However, I shouldn't have told you this if this is a well-desgined game UI. Thanks for the feedback!

Nothing in the PR comments indicates there is anything wrong:

"Your answer is being tested by CI. Click here to see more details."

"Congrats! Your answer passed our CI test. I will merge the pull request for you. Please keep challenging and enjoy programming!"

https://github.com/ByteLegendQuest/java-fix-method-passing-v...

I could only find the issue by clicking one of links for details and looking into the "check problems with code" logs to find that commit was missing a new line at the end of the file. Seems unlikely a programming beginner would look that far without being prompted.

Thanks for the feedback. There's actually a bug in bot-commenting code so the issue was missing in PR comment. It should be like this: https://github.com/ByteLegendQuest/java-fix-index-out-of-bou...

I'll fix.

> Where was I supposed to find this text?

It's like a promotion code, you should get the invitation code from someone else, like friends. It's a bonus, not a necessity for the game.

This is so awesome. It's awesome because this statement is ridiculously ambitious, "I'm writing an MMORPG game for learning programming". Rock on! You've obviously made a ton of progress. Keep going, follow your dream.
My kids love prodigy for Math. This looks very similar. I'm excited about it. It didn't seem to work great on mobile, I would recommend adding a warning when accessed on a non-desktop.
This looks cool! One thing that gave me pause was, when granting permissions what is the "act on my behalf" that ByteLegend needs?
Hi, I understand your concern. Let me explain.

First of all, a GitHub app can only "act on your behalf" in the repository/organization where it's installed (which is only https://github.com/ByteLegendQuest). It has no permission to access any other resources outside.

When you finish the code challenges, you actually create a pull request on GitHub and trigger a GitHub action (which is opensource and you can examine the whole process). So "act on your behalf" means "invoke GitHub API to create pull request in github.com/ByteLegendQuest organization". The app won't and can't access any resources outside github.com/ByteLegendQuest organization.

I know the permission request looks a bit scary. But I'm an individual developer, using GitHub API/webhook/actions would be the easiest and cheapest solution for me.

MMORPG enterprise edition.
Very nice work. Amazing what a motivated person can do these days
What did you use to create the multiplayer experience? (Real-time communication protocol or libraries)

What was this part of experience like?

Hey, I know its too much to ask. But will there be a Javascript version of this ? This looks amazing btw.
If I don't authorize the GitHub sign in I get an error page with only this text: INTERNAL_SERVER_ERROR
Cool effort. Keep up the good work and then we can see what new great things you make and do.
You don't know about Netbeans. Sad, sad :(
What's sadder is: I know.
I volunteer to help edit player facing text.
Want help? Rails/JS dev here.
Hi thanks for the kind reply. Actually what I need is:

1. I want to have challenges for more language. This includes a roadmap of that language, and a list of repositories with GitHub actions configured: see https://github.com/ByteLegendQuest . 2. The beautiful map for those language. This not not so hard, and not so easy. Currently it's created by Tiled manually, but I'm planning some automation tool to generate such map in one second. 3. A story. I can provide technical support for game scripts and implementation, what I lack is an idea. What epic should we have to complete with writing these code? Save the world? Fighting with alien? I don't know, I want to have a good story...

Rather than having selections for multiple languages (for each task) it seems like language detection or a selection/setup screen would be best. With fallback, to english, or whatever your default is. Maybe use online translations services?

edit: Oh it seems you do have a language drop down, but there are still multiple languages appearing in quests... this just means more quests I guess eh :)

He means more programming languages
Exactly.
play testing and I can't enter any text into the foo bar java installer field.
Hi, you have to go close enough to the coffee machine to enter text.

There's some hints saying: "To answer the question, you must enter the adjacent tile."

ahhh i see, the problem was that i just clicked the "Foo Bar" sign... which let me in but didn't bring my little avatar dude alone with me.
Yeah... this is by design, your avatar and your viewport are separated: you can be looking at island A while your character is walking at island B.
That's rather unintuitive, and counter to the way almost all modern games do it. If your goal is to lean into the familiarity of the gaming world to teach people programming, you might want to either change that or make it more much more explicit.
Cool idea. Great project!
Wow, the map is so pretty!
brilliant! wish you luck
We already have an MMORPG for learning programming, it's called Stack Overflow
I think this one is more Zelda, less Dark Souls.
Cool idea, but...

> Java is the most popular, most promising and highest-paying progamming language in the world

Most promising? On what terms?

Highest-paying progamming language in the world? Source?