Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Elara- A free open-source coding game built with Rust and WebAssembly (elaragame.com)
8 points by polymathist on Oct 4, 2023 | hide | past | favorite | 4 comments
I'm excited to share a project that I've been working on mostly solo for the past year! It's called Elara, and it's a free open source game that teaches you how to code. You can play directly in your browser without downloading anything or creating an account. It's targeted toward complete beginners, but if you already have some coding experience, there are optional bonus challenges to really test your knowledge and problem-solving skills. If you like code golf, some of the challenges will be right up your alley ;)

Under the hood, the backend/core game logic is built with Rust and compiled to WebAssembly, and the frontend/UI is in TypeScript and React. In-game, you write code in Rhai, a scripting language tightly integrated with Rust. I chose this architecture for a few reasons: it offers good performance for compiling and running user code, has important sandboxing/safety guarantees like preventing infinite loops, and means the entire game can run in-browser without the need for any servers (aside from just serving static files). Keeping costs low was really important since the game is 100% free and I would like to keep it that way. Check it out and let me know what you think! I'll be checking back here periodically to answer any questions.

The full source code is available on GitHub: https://github.com/albrow/elara.




I had very similar idea about 13 years and it festered for years due to lack of time and fact it was originally implemented in Scala + Swing.

The concept is similar user must write code to solve problems involving a "rover" on a grid.

I took some time to make a ScalaJS + HTML version recently, but it still in perpetual alpha-alpha status. The language I invented is minimal and a bit esoteric. Not really a teaching language. It very primitive compared to Elara.

https://github.com/daltontf/coderover-js

https://daltontf.github.io/coderover.html


Wow, this visual programming interface really helps kids viscerally experience the power of programming. Well done!


Super cool resource for middle and high school students learning to code! I wish this existed when I was in school. Will definitely be sharing it with kids and even older folks wanting to learn the basics of code :)


Very cool! Wish I had something like this when I learned to code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: