frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: Mochia, a virtual pet browser game, built with Rust, SolidJS, Postgres

https://mochia.net/
7•lemphi•6h ago
Around three years ago, I was reminiscing about how much I loved playing Neopets as a kid. Meanwhile, I was also looking for a project to better learn Rust and SolidJS. So.. I figured making my own virtual pet browser game would be a fun way to practice! Since then, I’ve been working on it nearly every day, and.. it’s grown quite a bit! Here are some bulleted lists for your convenience:

Technical Details:

  * Backend monolithic Rust server runs on a single $5/month VPS

  * Lean frontend with just 3 dependencies (SolidJS, Solid Router, and Mutative)

  * Around 130,000 combined lines of code (frontend + backend)

  * Rust server uses axum, sqlx, tokio, rand, strum, tungstenite (websockets)

  * No server crashes or data loss in 3 years (thank you Rust + Postgres!)

  * Almost all graphics (500+ assets) are SVGs for perfect detail at every zoom level

  * Fully mobile responsive and playable on all modern browsers and devices

  * Actor model for player actions enables trivial parallel, multi-core scaling

  * Single page application that preloads entire game world on initial page load

  * Instantaneous navigation between pages (no additional page fetches required)

  * Lightweight game engine for minigames, powered by custom WebGL shaders

  * Rust is the single source of truth for data structures shared between browser and server

  * Custom derive macros used to autogenerate TypeScript bindings and binary decoding functions

  * Binary WebSocket messages with custom protocol for client-server communication

  * O(1) selection for nested, weighted-random item reward pools

  * Minigames can be played without an account (but rewards can't be saved)

Features:

  * Completely free to play with no ads or tracking

  * Multiplayer browser-based virtual world with 80+ locations to explore

  * Dark mode toggle switch

  * Simple minigames that smoothly run at your display's refresh rate

  * Public leaderboards that track the top scores in each minigame

  * Pet training system with turn-based card-based battle arena

  * Dynamic player economy with player-run shops

  * Player guilds that members can level up to unlock perks

  * Abandoned mines area created by maze generation algorithm

  * Create / adopt pets, adorn them with hats, give them pets, change their color, etc.

  * 220 items to collect (food, toys, cosmetics, books, charms, tiny creatures, etc.)

  * In-game currency with banking, auctions, stock market, and jobs system

  * Villagers you can talk to, befriend, and complete quests and jobs for

  * Optional push notifications (like for when you win an auction)

  * 38 achievement avatars to unlock

  * Social features: befriend others, send gifts, and share your recent activity

  * NPC shops that restock over time (sometimes with very rare items!)

  * Luck system with ways to boost your luck for better rewards

  * Many puzzles that grant items or MP (currency) when solved

  * Fishing, gardening, caves, random events, fountains, galleries, etc.

  * Wheels to spin, treasure maps to complete, and secrets to explore!

  * Much, much more but I don't want to spoil everything!

Links:

  * Website URL: https://mochia.net

  * Community Discord: https://discord.gg/ub6z8YH866

  * Gameplay Video: https://www.youtube.com/watch?v=CC6beIxLq8Q

  * Screenshots Album: https://imgur.com/a/FC9f9u3

I'd love to answer any questions, hear any thoughts, or read any sort of feedback or criticism!

Comments

npinsker•1h ago
I played Neopets a long time ago. It meant a lot of different things to a lot of people, and -- while you're obviously not 100% there yet -- it's incredibly impressive to have done such a large piece of it on your own.

That said, I always saw the "core fantasy" of the experience as developing a relationship with your pet(s). I liked having to feed my pet, and read books to it, and then it would talk to me back. Playing games and going on adventures were framed as being done "with" your pet. The pets were well-drawn and cute, and the higher-level cosmetic items were expensive but very desirable.

From your page, I wasn't sold on that fantasy, or any fantasy in particular. If you look at the popular pet-care games nowadays, they have a fraction of the features you do while still (clearly) striking a chord with a huge number of people. Maybe part of it is because they focus on that relationship more? Especially in today's world -- but even back in 2000 -- I think features like games, items, stats, etc. need to tie in to some sort of greater fantasy in order to catch interest.

You don't have to care about any of this though, especially since you're making it for yourself. It looks fun and the tech stack seems awesome.

Is it actually possible to play minigames without creating an account? I couldn't figure out how.

lemphi•1h ago
Thank for you for this thoughtful reply!

Yeah, I definitely hear you with regard to the "greater fantasy" aspect. Some other players have also recently mentioned their desire for more fleshed out lore. It's something I personally struggle with but I should definitely do better in this regard, as I do want mochia to be enjoyed by more people.

You currently can feed your pets, give them toys, and read books to them (each book also has unique text that you can read inside, often with secrets about the world), and your pets should reply with their reaction (as different pet species like different things), but I agree with you that a lot of these interactions don't really "sell" themselves, and they certainly deserve more polish.

And yes, the minigames don't require an account. My apologies, I should have been more clear in the original post on exactly what a minigame is in this context. These are the locations that start off with a black tutorial screen, and then generally involve a game loop. Most other locations require an account because they require making a request to the server, but minigames can just be played entirely client-side just for fun. Here's some of my favorite ones that don't require a login:

https://mochia.net/map/airia/shrumble

https://mochia.net/map/whisperwood/enspell

https://mochia.net/map/treehollow/snarf

https://mochia.net/map/treehollow/loose-lambs

https://mochia.net/map/airia/leapscape

https://mochia.net/map/whisperwood/stellara

https://mochia.net/map/airia/sugar-rush

https://mochia.net/map/dunespire/pyramid/brick-break

https://mochia.net/map/ghoulery/spelunker

https://mochia.net/map/whisperwood/comet-rush

https://mochia.net/map/whisperwood/fruit-blast

https://mochia.net/map/whisperwood/radiant-revival

https://mochia.net/map/flakefall/matchicle

Show HN: Built email parsing for booking confirmations for my travel app – Aruko

https://www.aruko.world/
1•ankit21j•2m ago•0 comments

Autopoietic Networks (a few more examples)

https://gbragafibra.github.io/2025/05/27/autopoietic_nets2.html
1•Fibra•7m ago•0 comments

Trump's tax-and-spending bill passes Congress in major win for president

https://www.theguardian.com/us-news/2025/jul/03/trump-tax-bill-passes-congress
2•leotravis10•8m ago•0 comments

Building a fast website with the MASH stack in Rust

https://emschwartz.me/building-a-fast-website-with-the-mash-stack-in-rust/
1•gametorch•8m ago•0 comments

There's No Undo Button for Our Fallen Democracy

https://kottke.org/25/07/theres-no-undo-button-for-our-fallen-democracy
2•leotravis10•9m ago•0 comments

Guy accused of working at 4 YC startups at the same time

https://twitter.com/Suhail/status/1940287384131969067
1•v5v3•11m ago•2 comments

Printcrime

https://craphound.com/stories/2006/01/12/printcrime/
2•foxfired•11m ago•0 comments

The Scam of Age Verification

https://pornbiz.com/post/17/the_scam_of_age_verification
1•Lucasoato•14m ago•0 comments

Ocean-2: wave based power generation [video]

https://www.youtube.com/watch?v=Q7Pmgq2JKbI
1•clacker-o-matic•14m ago•1 comments

Show HN: Listopia Open Source AI Powered List Manager

https://medium.com/@spaquet/saas-is-dead-how-i-built-listopia-with-ai-to-replace-clunky-task-managers-fd09e0c15111
1•spaquet•16m ago•0 comments

Active CPU pricing for Fluid compute

https://vercel.com/blog/introducing-active-cpu-pricing-for-fluid-compute
2•raybb•17m ago•1 comments

Unreal Engine 5.6 Release Notes

https://dev.epicgames.com/documentation/en-us/unreal-engine/unreal-engine-5-6-release-notes#runtimevirtualtextures(rvt)
1•ksec•18m ago•0 comments

CO2 sequestration through accelerated weathering of limestone on ships

https://www.science.org/doi/10.1126/sciadv.adr7250
2•PaulHoule•20m ago•1 comments

Provider of covert surveillance app spills passwords for 62,000 users

https://arstechnica.com/security/2025/07/provider-of-covert-surveillance-app-spills-passwords-for-62000-users/
2•gametorch•21m ago•0 comments

The curious case of the British F35B jet stuck in India

https://www.bbc.com/news/articles/cy8gj2nlnywo
3•lsllc•22m ago•0 comments

What Are MCP Servers?

https://fly.io/blog/mcps-everywhere/
1•russellthehippo•22m ago•2 comments

Wordserpent

https://www.wordserpent.online
1•tiantiankaixin•26m ago•0 comments

DeepSWE: Training an Open-Sourced Coding Agent by Scaling RL

https://pretty-radio-b75.notion.site/DeepSWE-Training-a-Fully-Open-sourced-State-of-the-Art-Coding-Agent-by-Scaling-RL-22281902c1468193aabbe9a8c59bbe33
1•sijuntan•29m ago•1 comments

Los Alamos Scientist's Insights on the GBU-57 Ordnance Penetrator

https://www.twz.com/nuclear/los-alamos-scientists-insights-on-the-gbu-57-massive-ordnance-penetrator
1•howard941•31m ago•0 comments

How to write Rust in the kernel: part 1

https://lwn.net/Articles/1024202/
2•signa11•32m ago•1 comments

Health effects of processed meat, sugar-sweetened beverages and trans fat

https://www.nature.com/articles/s41591-025-03775-8
2•ckcheng•32m ago•0 comments

Data Science Weekly – Issue 606

https://datascienceweekly.substack.com/p/data-science-weekly-issue-606
1•sebg•35m ago•0 comments

Why Are Liberal Professors More Conservative on Campus?

https://dailynous.com/2025/06/17/why-are-liberal-professors-more-conservative-on-campus-guest-post/
1•bikenaga•37m ago•0 comments

Jaguar Sales Drop by 97 Percent in Europe, Which Is Allegedly Fine

https://www.thetruthaboutcars.com/cars/news-blog/jaguar-sales-drop-by-97-percent-in-europe-which-is-allegedly-fine-45129343
2•RickJWagner•38m ago•0 comments

Uncommon Uses of Python in Commonly Used Libraries (2022)

https://eugeneyan.com/writing/uncommon-python/
1•sebg•39m ago•0 comments

What to do if your SSRI is making hot days even worse

https://www.washingtonpost.com/wellness/2025/07/02/ssri-heat-intolerance/
2•bookofjoe•40m ago•1 comments

My love/hate relationship with Unix-likes

https://www.unmappedstack.dev/blogs/love-hate-unix-likes
2•UnmappedStack•40m ago•0 comments

Marketing for maintainers: Promote your project to users and contributors (2022)

https://github.blog/open-source/maintainers/marketing-for-maintainers-how-to-promote-your-project-to-both-users-and-contributors/
1•sebg•43m ago•0 comments

Show HN: Turn any webpage/video into a summary, podcast, or mindmap

https://unrav.io
1•rriley•51m ago•0 comments

Stabilizing Naked Functions

https://blog.rust-lang.org/2025/07/03/stabilizing-naked-functions/
1•exiguus•52m ago•0 comments