" React and three.js are like beer and wine - don’t mix them. "
Preamble
Welcome to the merry circus of Why Dungeons - deep, immersive experience on par with games like Anthem, Fallout 76, and Cat Mario.
Currently featuring: a lot of disconnected features, puppies, persistent world that’s reset every time I have to make a change, 3 frames per second on RTX 3080, questionable pricing model, and quite a bit more.
And on a completely serious note - this tiny demo of a game got to a state where it’s time to connect stuff that’s already there, and to make it into an actual fun experience. I thought it may be a good idea to post it and build upon feedback over time, maybe collect a few devs to join as well, see what happens.
(I honestly have no idea how to setup discord / discourse / devlog, so I’ll be thankful for some suggestions. Or, if that’s ok, I’ll just post occasional updates here, since it’s 100% three.)
Play Why Dungeons (desktop-only), or read further!
🤔 What Dungeons?
Why Dungeons is a game - and that’s probably the only way to describe it right now. It has a browser client (merged partially with WTL because laziness and greed, obviously) and hostable world servers - more details on that below.
Since everything is MMO these days - I kinda want to not make it MMO. Rather a cooperative multiplayer game with 25-50 dungeoneers per world, and some lighthearted Souls-like gameplay (mind this is not there yet, right now it’s just tech and networking.)
🤔 What makes these Dungeons?
I usually don’t care about what I’m using on the tech side, but since it’s a tech forum - Why Dungeons is created with three, React (no-fiber, no-hooks), regrets, and node.js (for server-side world servers.)
Client-side:
- Game started from a stale project that allowed to build LEGO-like buildings - hence, you can click on the top menu, open building panel, and build stuff anywhere. Reusing stale code is also the only reason why the game uses React and state at all :’)
- World is tile-based on the client - new tiles are streamed when you move around. Considering the amount of objects (ground is tiles, height-maps are too '90s, sorry.) that was a good decision.
- There are some funky optimisations on the client to make it bearable for your GPU and sanity - like reducing FPS when using UI, calculating wall chains to make pathfinding faster, dynamic env-maps, event queues for when you disconnect suddenly, etc. Still, game is far from optimised, especially regarding tiles and elevation.
- Game data is decoupled from the client and streamed on the go - so updating models, worlds, items etc. does not require any updates. You just get it from the server and cache occasionally. Most materials are generated and applied to models on the client side to make meshes more reusable (similar to how Blizzard handles equipment in WoW / Diablo 3.)
- A few fancy things - like reflections, clouds, and puppies - had to be disabled for now, until I find some time to make them run above 3 FPS.
- There’s a day-night cycle that’s based on your local time. If game’s too dark / bright, just fly to another country to change time of the day.
(this gif is long, sorry, patience pls)
Server-side:
- Will probably be open source because chaos and cheats are fun.
- Will be open source only when I’m not horrified by how its code looks.
- World servers basically only handle sync between connected players. May also add validation of actions later.
- Worlds are persistent - in a way that they allow up to 500 players to connect and stay. Player becomes a part of the world like NPCs and objects (you can see logged out players currently, that won’t happen in the future :’) )
Assets, models, textures etc. are all done in Blender, PS, and some in-house scripts (quixel-to-three was technically part of the project, to generate PBR maps on the go.)
🤔 Plans for Dungeons?
- Improve performance to make it reasonable (kinda done.)
- Farming and pets - to bring life into the game (not done at all, though models are ready.)
- Music.
- Fix tiles. They break from time to time.
🤔 How to get to Dungeons?
Gamers: “Did you just ask me to pay for a game that doesn’t even work yet?”
2020 gamedev:
- Create account here.
- Log in here.
- Be astounded by being asked to activate the account using money.
- Use money to activate the account (it’s a one-time $4.99 fee. It will put a smile on my face. If you want a refund just ping me. That will break my heart tho. Paywall is there only to keep bots and randoms out of the test server. And to buy me that sweet Ferrari F430 Spider.)
- Play!
🤔 Open-source Dungeons?
Client-side is currently basically a single file with ~4k lines. Github will ban me for just pushing it to their servers.
Server-side will be open-source - it’s much cleaner and definitely hackable / moddable.
If you are a webdev around Amsterdam and would like to join working on client-side (full-time / part-time / quarantine-time) - ping me.