Slimes and Sandwiches by Nick Rafalski

[raw]
made by Nick Rafalski for Ludum Dare 48 (COMPO)

Unity<em>2021-04-25</em>21-35-39.png Unity<em>2021-04-25</em>21-36-37.png

Click to play in browser!

Game Background

Avoid those slimes and eat those sandwiches! Explore this procedurally-generated abandoned mine that's overrun by blobular beasts! Find the key that unlocks the ladder to the next level! Get as deep as you can!

How to play

  • Use WSAD to move around
  • Use Mouse to look left/right
  • Use Left Shift to dash, but beware, it will take some of your hp!

Tools:

  • Unity
  • Paint.NET
  • Audacity

About the development

I easily spent the most time on the procedural generation system. This is a GIF of it in action:

2021-04-27_14-34-10.gif

The algorithm goes like this: * Generate 10 randomly sized rectangles, and add 2D physics components to them (colliders and rigidbodies) * Let the physics engine sort them out until they are all sleeping * Slightly adjust their sizes/positions to the nearest integer value (for easier tile-based generation later) * Start with a random room, and flood-fill connecting rooms to create the totally connected graph of rooms * * If necessary, remove rooms that aren't connected to the main graph. This happens with 1 room in the bottom-right of the GIF. * Compute a minimum-spanning-tree in order to figure out the fewest number of connections needed to connect all the rooms * * Remove connections that aren't on the MST. These would be good in a bigger dungeon to add alternative ways to explore, but if you add them to too small a dungeon, there isn't much need to back-track, which makes it feel less "explorey" to me. They also reduce the number of leaf-nodes, which are necessary for the next steps. * Identify leaf nodes in the MST. These are any room with only 1 connection. * Randomly select 1 leaf node to be the starting room. This has nothing to do with random room that started the flood-fill. * Find the furthest leaf-node from the starting room (by straight-line distance; not a perfect measure) to be the finishing room. * If there is at least 1 more leaf-node that's not the start or finish, put a key in it, and lock the finish room.

Overall, I'm pretty happy with it. Early on, I wasn't using the flood-fill approach to determine valid connections before computing the MST. Instead, I was connecting all rooms to all other rooms that they could reach, and pruning any rooms that had zero neighbors. This almost works, but can result in having 2 or more distinct groups of rooms, that have no connections between them (like "islands"). The MST computation would hang while trying to find a way to connect the distinct islands. An interesting side-effect of using the flood-fill approach is that, sometimes, you can get a very tiny map. Say you have an island of 8 connected rooms, and another island of 2 connected rooms. When I randomly choose a starting point for the flood-fill, it's perfectly valid to choose the 2-room island. The 8 room island will be pruned before the MST is computed, and the resulting level will have 1 starting room, 1 goal, no key, and no other rooms. Thinking out loud, I could add another step to keep track of the islands, determine their sizes, and choose the largest one. That would be some more work, but is definitely doable.

Ratings

Overall 528th 3.355⭐ 33🧑‍⚖️
Fun 599th 3.081⭐ 33🧑‍⚖️
Innovation 501th 3.117⭐ 32🧑‍⚖️
Theme 547th 3.419⭐ 33🧑‍⚖️
Graphics 490th 3.387⭐ 33🧑‍⚖️
Audio 485th 3.067⭐ 32🧑‍⚖️
Humor 305th 2.839⭐ 30🧑‍⚖️
Mood 444th 3.259⭐ 31🧑‍⚖️
Given 28🗳️ 36🗨️

Feedback

petra_the_kat
26. Apr 2021 · 03:46 UTC
This is certainly a good use of the theme, and actually the first dungeon crawler I've played here so far (I was expecting a lot more).
My biggest gripe is the controls. They seem really weird somehow, like it's hard to get your player to go where you want... but overall, very cute. Like a miniature Doom.
Phobos001
26. Apr 2021 · 05:45 UTC
The floors, walls, and ceilings all being the same color makes it hard to really navigate the level. Slimes are going through walls too. But this was fun for a short while! It's about Level 5 when I lost interest. This kinda reminded me of those old DOS/WIN-95 games that came in huge bundles (250 Best Arcade Games comes to mind). Good work!
IanTheBee
26. Apr 2021 · 14:04 UTC
Slimes and Sandwiches is a nerve-wracking Wolfenstein style fps game where your constantly looking over your shoulder. Love this game!
FussenKuh
26. Apr 2021 · 17:25 UTC
Dang, this game is tough! I REALLY wanted the ability to kill the slimes. Or, at the least have my "speed burst" push them out of the way without me taking damage. It would have added an extra dimension to the game. I also wish that "speed burst" button was mapped to my mouse button as I found that I wasn't using it much with it being mapped to my pinky finger.

None the less, you've made a hell of a thing in 48 hours! Great job!

p.s. I quite enjoyed the sound effects.
Paroxysmal
27. Apr 2021 · 02:07 UTC
Controls are very floaty. The balance is a little off with slimes being right at doors when you enter. Just a few issues on a game that shows promise.
nodice
27. Apr 2021 · 08:18 UTC
It seemed like the collision box for the player was too small as sometimes I would back straight into a sandwhich and miss it haha.

I liked that you went for a pacifist dungeon crawler but I would of liked to have another tool other than the dash to navigate the slimes. Maybe dropping something draws the slimes over too it and gives you a chance to escape?
deadmanjw
27. Apr 2021 · 09:06 UTC
This is a great dungeon crawler, really gave me doom type vibes with the added ability to go deeper into the dungeon. I really liked the audio in this game great sound effects and pixel retro style.
gnaro
27. Apr 2021 · 14:45 UTC
I love this 3D FPS/Pixel art combination!
yulotomorrow
28. Apr 2021 · 00:29 UTC
Love the choice of genre! The control is a bit hard to navigate and the difficulty is not easy at least, but I'm impressed you made such a game with nice graphic in a short time!
Secret Magic 404
28. Apr 2021 · 03:12 UTC
I love that whole Windows95 screensaver vibe going on. Very cool :smile:

Overall I would say it's pretty satisfying to play this game. Those slimes however... moving through walls... they give you no time to rest!

That sandwich sound effect is amazing :laughing:
I think it's my favorite bit of the game. How did you make it?

Great entry!
sacredbacon
28. Apr 2021 · 03:22 UTC
Art style is incredible, 2D X 3D looks awesome. Procedural generation works flawlessly. Keep up the great work!
🎤 Nick Rafalski
28. Apr 2021 · 12:33 UTC
@petra-the-kat Thanks for the feedback, mini-Doom is high praise, and exactly what I was going for (sorta)! Sorry about the controls, I definitely didn't give them the attention they deserved. P.S. Let me know if you find any more dungeon crawler entries, I've been looking for them too, but haven't really found any. Thanks again!

@phobos001 You are very right about the aesthetic being quite confusing. I spent far too long on the code and not nearly enough making sure the game actually presented well. Thanks for playing and the feedback :)

@ianthebee You're hired as my next marketing person! That's exactly what I was going for. Thanks for playing!

@fussenkuh Killing the slimes was in the original scope of work, but got cut when it was already 2PM Sunday before I even had the concept of a slime in the game. I actually had them as pushable at first (only because that's the way the dynamic rigidbody component comes out of the box). It was fun to push them, but it was way too unpredictable. Sometimes they'd fly off the map, other times they'd barely move. Instead of taking the time to finely tune the physics settings, I just made them triggers. I agree that would have been more fun though. Thanks for the feedback!

@paroxysmal You area totally right in your criticisms. I wanted to address the "slimes right by the door" thing, and had a plan for it, but just ran out of time. Thanks for playing :)

@nodice Thanks for the feedback! I too wanted to give you a better way to avoid the slimes. The original scope included being able to kill them with weapons you pick up, but I didn't budget my time well enough for that. Dropping something that they are attracted to is a great suggestion though. It would have been less work than a full blown weapon system, and fit the 'pacifist' theme better. Thanks for playing!

@deadmanjw @gnaro Thanks for all the kind words :) You made my day!

@yulotomorrow Thanks for recognizing the difficulty in creating this game that looks pretty bland on the surface! Honestly, I knew when I started that the genre was probably a poor choice for a 48 hour jam. I knew the final product would lack any real content or polish. I'm still happy I made a functional game though. Thanks for the kind words :)

@secret-magic-404 That was exactly the vibe I was going for! The sandwich sound was just a recording of me pretending to eat something (a bit dramatically). I usually get about 90% of my sound effects from my own mouth lol! Thanks for the feedback :)

@sacredbacon Wow thanks for all the kind words, and thanks for playing :)
gamesplusjames
28. Apr 2021 · 13:44 UTC
This was fun! I enjoyed exploring the levels. It was a little hard to avoid getting hit at times but I really like the sound effects for collecting stuff :D Great work!
PeachTreeOath
29. Apr 2021 · 04:37 UTC
This game was quite the hippocampus test :) I imagine taxi drivers would be good at remember all these room layouts but I definitely had trouble. The slimes were definitely threatening at all times and it made it difficult to figure out the best way to weave through them all. I suppose that's why you leave food everywhere, as you can run into no-win situations - which is fine.

It was very deflating to search 90% of the rooms and realize the key was way in the other direction! Not much you can do about that really. I suppose if you reached a dead end, you could give them 2 or 3 sandwiches to have made it worth their while lol.

I really liked your gif and explanation. I wouldn't have thought to use a bit of physics to provide the randomness. That's a super cool idea, and technically is quite fast to implement from scratch compared to a standard one (at least the first step). Thanks for sharing!
Lex
01. May 2021 · 20:39 UTC
I loved the algorithm explanation, it reminds me of the algorithm used on Tiny Keep I think.
cheesepencil
02. May 2021 · 00:27 UTC
I wish i had a gun taht killed slimes! Great to see procedurally generated game content i love that
LeviDSmith
02. May 2021 · 00:45 UTC
Nice game. I managed to get the key and make it to level 2 after a few tries. Seems like a lot of enemies without any way to fight back. Maybe cut the volume on footstep sound effect by about half.
tengusheath
03. May 2021 · 04:10 UTC
Very much appreciated that you added a mouse sensitivity slider to your game. The movement and controls felt smooth. It was hard to dodge the slimes sometimes though wish there was an attack or something.
Jonrei
03. May 2021 · 16:17 UTC
the sensitivity is quite crazy haha :D
WetBurritoSupreme
05. May 2021 · 00:52 UTC
Good maze and graphics that make this a cool little game, incredible as a compo entry. The inclusion of how you generated the maze is great! Thanks for your entry!
Bea
05. May 2021 · 00:54 UTC
Always really really incredible to see this in depth compo entries. I also really like seeing setups with genres where you'd normally expect combat but there is none. What could be a very straight forward hack and slash is a much more thoughtful but also frantic dash as you accumulate enemies trailing you through the dungeon.
fueelin
07. May 2021 · 23:43 UTC
Maybe you already answered this, but does it go forever? I got to 12 and figured maybe I should stop, but I definitely wasn't bored! The little details really came together well to make it feel satisfying to dodge the slimes. The player's speed, the short aggro/leash range for the slimes, the relatively forgiving collision, the slimes going through walls (I think?) - it made grouping them up and dodging them feel really good. It was like AOE kiting in an MMO game or something :)

Great job!
OadT
08. May 2021 · 10:21 UTC
You did a great job on the procedural generation! Thanks for explaining the algorithm in the description. The game elements fit nicely together and make a fun experience. I would love to see an extended post-jam version! The only suggestion I would have is to make it more clear that there is a dash mechanic in the game
Kooky
09. May 2021 · 14:37 UTC
Very nice! I always like to see procedurally-generated levels or dungeons.

The graphics were fitting and nostalgic. Well done! As has already been said, some variety in the environment could aid with navigation.

Nice audio to add to the mood, too. I like the atmospheric dripping.

It's also great to see a mouse sensitivity slider included!
blobo
13. May 2021 · 00:21 UTC
Yo, I love the method for creating the randomized dungeons, by having the 2D physics move them around. Very neat idea! I love the sound effects, and the "oof" noises are good fun too! Nice game.