The Dungeons Of Tweet_Dungeon (๐Ÿ˜ถ Tweet_Dungeon dev log #4 ๐Ÿ’€)

avatar

zeldabannerLARGEcolorpaletten.png

previous dev-log
next dev-log

The Dungeons Of Tweet_Dungeon

Can't have a dungeon-crawler without dungeons! Today we'll look at how the dungeons in Tweet_Dungeon take form, and what you can expect to encounter while traversing these dangerous-depths!

divider.png

Making Fun Dungeons

In yesterday's dev-log, I talked about the tools we're using to help build Tweet_Dungeon. In it, I showed-off the "Cavern Crafter" app I made to help speed up the process of making rooms (or as they're referred to in Tweet_Dungeon terms: caverns).

Due to the way the game is played (turns taking 20 minutes to resolve), it's important that each cavern you enter is fun & filled with interesting stuff. That's why I decided to skip "total-random-generation", and instead opt for more of a "semi-random" method. Me & my project-partner, ROLLINKUNZ use the Cavern Crafter to design a bunch of caverns, then my code takes care of the rest. This gives us a little more control over what you'll encounter, ensuring fun & fair gameplay.

Making Dungeons. Fun?

The first version of this code actually just generated a bunch of totally random sized "pockets" and placed them randomly all over a map:

Each of these "pockets" of open, walkable space, were added to a list. I then iterated over that list, adding connection hallways between room to room:

This worked well enough, but was a bit too linear. Plus, we decided on implementing a MAP command, where players could request to see an overview of the entire dungeon that they've explored so far. The MAP command would return an emoji-based map, like the following:

image.png

Because of this feature, we would have to ensure that each room / cavern in the dungeon is aligned to a grid. Thus, the new dungeon-generation method was born!

Making Fun, Dungeons?

Well... of course, it wasn't without a few bumps & bruises along the way... Glitches are, in every game-dev project, to be expected:

sometimes things get glitchy...

But this got remedied and thankfully dungeons now look pretty. Here's a bit of a step-by-step in how this all goes down:

PREVIEW
EXPLANATION
dungeonfixedglitched.png
First, we create a grid based on how many caverns wide & how many caverns tall we want our dungeon to be, multiplied by the size of each cavern
dungeonrandomcaverns.png
Then, we randomly choose caverns from our "cavern stack" (which is just an array of caverns that we've created by hand) and place them into these empty grid slots. BUT! That doesn't look so good, we should add hallways connecting the rooms together!
dungeonhallwaypurpleindicatorcleancaverns.png
So, we add a 1-tile sized buffer between all rooms, this will be the hallway. Then, we need our code to find where we placed our "hallway entry points" (the little 1-tile sized holes in the wall) for each cavern (in this example, they all match up & are aligned, but that's not always the case)
dungeonhallwayhorizontalconnections.png
We then add these entry points to one of four lists: Top points, Right points, Bottom points, Left points, depending on where they're located. We loop through the "Right points" list, connecting each point to their neighbor in the "Left points" list.
dungeonhallwayverticalconnections.png
Apply the same loop from the above step, but do so for the "Top points" list & the "Bottom points" list. Now you've got connected caverns!
divider.png
divider.png

Making Dungeons Fun!

Now that we got a stack of caverns to randomly place throughout the dungeon, as well as hallways that connect to various points, our dungeon system is ready for prime-time fun, and it looks great as well!

bunch of randomly-generated dungeons, with no duplicated rooms per map

And there you have it, semi-random, grid-based, cute little emoji dungeons that you can keep exploring until the inevitable heat-death of the universe! Enjoy!

divider.png

newbanner.png

What Is Tweet_Dungeon? ๐Ÿ˜ถ๐Ÿ’€

Tweet_Dungeon is a Twitter-based dungeon-crawling roguelike game, where the entire game (moves, attacking, looting, exploring, etc.) takes places entirely on Twitter. Players vote on what the little adventurer will do using Twitter polls. Turns are 20 minutes long, and updates constantly all day long.


Follow along with my progress where each day I'll post a short dev log showcasing the latest stages of the gameplay. Will I be able to make the deadline of Thanksgiving (November 28th, 2019)? Only the game-dev-gods can tell...

T-4 DAYS...

๐Ÿ‘‰ Follow Tweet_Dungeon On Twitter To Play When The Game Launches! ๐Ÿ‘ˆ
previous dev-log
next dev-log

divider.png

BlankBanner.png

twitter
instagram
main website
mystery attic
Twitter.png
Instagram.png
StuffBySpencer.png
MysteryAttic.png

take care! :^)



0
0
0.000
6 comments
avatar

This post was shared in the Curation Collective Discord community for curators, and upvoted and resteemed by the @c-squared community account.
If you are a community leader and/or contest organizer, please join the Discord and let us know you if you would like to promote the posting of your community or contest.
@c-squared runs a community witness. Please consider using one of your witness votes on us here
0
0
0.000