Why Dungeons 🤔 [demo]

" 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?

prev-1

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.

prev-2
(this gif is long, sorry, patience pls)

Server-side:

  • Will probably be open source because chaos and cheats are fun. :slightly_smiling_face::fire:
  • 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?
  1. Improve performance to make it reasonable (kinda done.)
  2. Farming and pets - to bring life into the game (not done at all, though models are ready.)
  3. Music. :notes:
  4. 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:

  1. Create account here.
  2. Log in here.
  3. Be astounded by being asked to activate the account using money.
  4. 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.)
  5. 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 :netherlands: and would like to join working on client-side (full-time / part-time / quarantine-time) - ping me.


8 Likes

Upgrades, people, upgrades!

I believe there are only two rules of living a good life, and by these two rules I will always stand as a person - be good to others, and write updates exclusively at 3:50am. So here we are.


Consistent Visuals

Following the knowledge bestowed upon me by my friendly neighbourhood corporation Nintendo Inc. colleagues, I refined the looks a bit.
Sharp edges and detailed textures looked pretty, but inconsistent and lazy af. So they are now going to be replaced with smooth curves wherever possible and low-poly gradient textures (credit to Blender Artists Community for showing me that :heart: )
tl;dr; it all saves tons of bandwidth and makes visuals cute and consistent.

👀 HD Preview


(Mind, character model is going to be replaced to fit, too.)

👀 It looks kinda cool when you build complex paths, too


(Writing math for those is fun.)


New models and AI

Since farming and tiny-bits-of-crafting are on the way, started early and added models for the workbench, plants, rocks etc. Also a few nice fences and hedges to add some life to the world :deciduous_tree:

As for the plants - they are the first to receive any kind of active “AI” in the game, before I add pets and some wildlife. (1) You can pick and plant 3 types of plants. (2) When planted, plants will take some time to scout their surroundings and, if there’s space, grow smaller plants around their original location.

wd-scrn-2


Music!

Since every game I ever created was silent af, thought it will be best to start with this early (every except one time when I put Derude Sandstorm in the background of a Flash game, which was probably even worse than being silent :’) )

I’m slowly learning how to make some nice background music, in the meantime I managed to cropped together a few ambient sounds. You can hear birds near the trees, footsteps, and funky UI effects when you do stuff.


Technicalities

As for the background stuff nobody will ever see but still took 500 man-hours and 10k lines of untested code - servers can now use Let’s Encrypt signed HTTPS certificates, so you no longer get a “Unsecure Connection” warning when trying to log in for the first time.

Also the world has been reset to an “official initial state” of a small happy island. Each server will start with it for now, since it’s very easy to modify and add stuff to it.


Next Up

  • New player & equipment models (to match surroundings)
  • Bunnies and sheeps and a cat (you’ll be able to pet and feed and play with them, if they love you, you can name them cause why not)
  • Fishing (to feed the cat, they do eat fish)
  • New items that will be useful for your tamagochi friends and for creating stuff later
  • Crafting (probably won’t get to this one)
6 Likes

Looks really cool! Is there a free demo to test, or some video gameplay?

4 Likes

Not a problem! I meant it when I wrote that this paywall is to block bots / control population.
Demo credentials won’t make much sense, they’d let only one person log in at a time - but if you create an account and PM me here or on discord which email address you used, I’ll activate it for you right away. :slight_smile:

(Applies to everyone, of course, I’ll adjust the main post tmr to make it clearer how to try it without a charge. I’ll also proceed to spawn you as a rabbit or something for dodging payments and ruining my Q3 financial statement though.)

Ziet er goed uit!

1 Like

Never Enough of The Dungeons!


Why Dungeons Is Now Family Business

So 2 weeks back. this guy Srinivas messages me, I reply, he replies back, we go to Discord, all is perfect, Srinivas’s wife joins the call, she’s doing 3D models, 24h of negotiations, everyone is into Why Dungeons, we exchange 3D models of fluffy Mareeps as a sign of peace and trust - long story short, @Srinivas_Prabhu and @cat_runner join part-time the creative team working on Why Dungeons. :heart:

(Additionally, WD passed 60 accounts over this 14 days - out of which I believe 5 were activated and actually managed to log in. :speak_no_evil::chart_with_upwards_trend: )


World Is Absolutely Alive

Now content. First, the world of Why Dungeons received a diverse fauna & flora. :herb: There are bunnies, there are sheeps, there are cute little shady bandito cats - all lively, smart, and independent thanks to the endless amount of if-else statements in their industry-grade Artificial Intelligence “algorithms” :’)


Combine & Refine Everything

kraft

Second, there’s now an operable workbench. :hammer_and_wrench: It can combine, it can refine, it can smash items into dust if used in ways I did not expect players to use it.

(Along with it comes the first bunch of elements, items, craftables, and equipment to make you super strong and foreshadow the inevitable arrival of microtransactions as WD is forcibly overtaken by Activision or Microsoft in the near future.)


Everything Is Totally Fixed

There were buggy issues, now there are fewer buggy issues. I hoped this to be a content update, so technical side of it is mostly limited to bug fixing, AI, and making sure preloading and asset fetching is as optimised as possible (scroll down to find out why. :point_down:)

Also, the game now uses only 2 textures for the entire world (diffuse + color), so everything loads like 1 billion times faster. :’)


All Of That Is Finally Free

And the second most important change - since I set up all the load-balancing, CDN cache, and a bancruptcy insurance - as per request, Why Dungeons is now 100% free. :moneybag:

Regardless whether the account was created earlier or now, anyone should now be able to log in and join the game without activation prompt / paywall - so welcome!


Next Up

  • NPC interactions and chatting (or at least one NPC, that will be helpful with opening the gate out of the starting island. :old_key:)
  • Mobile support (after going through a few articles about PWAs, thanks to @gkjohnson suggestions, it seems that making Why Dungeons run on mobile may be far easier that I’d expect it to be.)
  • Clothing / Equipments.
  • Theme music. (still learning :notes: )
  • And if time allows, first small town outside of the starting island. :houses:
3 Likes