Trouble In Paradise by Nick Rafalski

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

Unity<em>2023-10-01</em>19-55-25.png Discord<em>2023-10-01</em>19-55-06.png

Click to play in browser!

Game Background

  • There's trouble in paradise! Everybody wants margaritas, but they're too drunk to go fetch the ingredients!
  • Luckily the archipelago is rich in natural resources, and specifically the ones needed to mix up some margs!
  • Explore the islands, locate the ingredients, bring them to the locals, and let the party start!

How to play

  • Control your ship with the Up/Down/Left/Right buttons or WSAD
  • Your ship cruises and steers at discrete increments. Tap a button to change the speed/heading; there's no need to hold the buttons
  • Gather the ingredients (Ice, Tequila, Limes) from islands and deliver them to the houses. Once an island has 1 of each ingredient, it's time to party!
  • Bring the party to 10 houses in as short of time as possible!

Tools:

  • Unity
  • Paint.NET
  • Audacity

Meta:

This was my 12th Ludum Dare compo and by far the one I struggled with the most. I actually had a nugget of an idea almost immediately, which is rare for me. The rough idea was "explore a procedurally generated archipelago" and the theme would come in via some kind of cargo management mechanic, but I didn't have a super concrete idea for the actual gameplay. I took most of Friday night to just reacquaint myself with Unity (specifically the Cinemachine camera system), and then nearly all of Saturday fighting with the procedural generation. By Sunday morning, you could pick up stuff, but you couldn't do anything with it. Needless to say, I rushed through Sunday making the most minimum viable product I could, even copping out and just making the "score" time based, which I wanted to avoid since it adds a sense of urgency to a game that is supposed to be chill. I was initially picturing some kind of "overall happiness" rating that you would try to maximize, but it wouldn't necessarily be tied to time.

Like I alluded to, the procedural generation gave me some fits. The initial iteration was very straightforward. With perlin noise, I generate the islands, and easily map that to the Unity TileMap system. I had the basic look of the archipelago within a couple hours. But the devil is always in the details. One problem I ran into is actually identifying the ocean! What if a totally land-locked body of water gets generated that is isolated from the rest? If I start your ship here, you won't be able to get very far in the game. So I used a flood-fill algorithm to detect each "body of water" and assume the largest (by cell count) is the ocean. All others are deemed "lakes" and filled in with a swamp-green color. You can play many rounds and never see one, but you just might. This worked in the end, but at one point the algorithm was using recursion and resulted in consistent stack overflows (hint: don't try to push 32k calls onto the call stack), then my next implementation with a queue worked, but it would take 3 minutes just to flood fill the whole ocean. I finally settled on an implementation that uses a 2D array to track added tiles, and that got the time down to under 3 seconds.

With all the trials and tribulations of the procedural generation eating my time up, I didn't get to many of the features I wanted to: * Different island graphics to, for example, make "lime islands" distinct from "tequila islands" * Different types of ships with different cargo capacity and handling characteristics. You would commandeer the ships either in port or at sea with a minimal combat system. * Detect rare islands (small, far away) and give them something cool to explore like a light-house or pirate camp * Pirates! * "Missions" where a particular harbor would hail you to bring a specific resource asap (there were going to initially be many more than 3 resource types) * Spending more than 20 minutes coming up with, and recording, the background music. Take more inspiration from Jimmy Buffet songs and maybe even incorporate a drum track

Alas, it wasn't meant to be. I'm definitely not going to "expand" on this game directly; the code is too gross for that, but I do think I learned a few lessons about procedural generation that I will (hopefully) remember in the future. As always, it was a fun, but frustrating, experience.

Ratings

Overall 278th 3.229⭐ 26🧑‍⚖️
Fun 322th 2.813⭐ 26🧑‍⚖️
Innovation 270th 3.083⭐ 26🧑‍⚖️
Theme 335th 2.708⭐ 26🧑‍⚖️
Graphics 279th 3.083⭐ 26🧑‍⚖️
Audio 145th 3.354⭐ 26🧑‍⚖️
Humor 101th 3.196⭐ 25🧑‍⚖️
Mood 228th 3.146⭐ 26🧑‍⚖️
Given 23🗳️ 27🗨️

Feedback

Erroneous
02. Oct 2023 · 00:43 UTC
Interesting game, I like the story! The art was fine, I like the map area and rushing around. However, the Ui was a bit intrusive, and I dunno if the screen size is set wrong but when I fullscreened the inventory was looking a bit wack. Also, controls are a bit strange but aren't too bad.
LDJam user 374261
02. Oct 2023 · 17:42 UTC
Nice game, its a but hard controlling the ship, the music is awsome :)
LDJam user 352490
02. Oct 2023 · 23:19 UTC
Feel like I can relate this jam (running circles around code and not getting time to flesh out the idea). The map generation is pretty cool! I guess my tip in a pinch would be to make the map smaller with less houses so it's easier to finish, since there isn't much to motivate players after the first couple.

By far the coolest thing was getting to read about your process! It's super fascinating to see how something got to the place it's in.
Nikolaj
03. Oct 2023 · 04:21 UTC
i had a little trouble getting collisions right when getting close. I loved the procedural islands though, and music was relaxing and of course the theme puts me in the right mindset :sailboat:
don.shinski
04. Oct 2023 · 22:15 UTC
The intro is hilarious, nice job. I really wanted to get everybody partying, so you got off to a good start with the idea. The procedural generation seemed to turn out good from what I could tell. But alas, I was not very good at getting everyone to party hardy, haha. Good work though, enjoyed it :smile_cat:
BinayaS
05. Oct 2023 · 05:13 UTC
Cool idea. Impressed that you managed to get procedural generation working in such a short time frame, coding always takes longer than you think.
Medow
05. Oct 2023 · 05:14 UTC
I super applaud the effort of procedural generation, fog of war, and minimap! Those are hard to do in a short time so I understand the struggle. I didn't understand that you had to click on the ingredients at each house that you went to so it took me a while to know what was going on but I eventually got it. If the game had all the things you wanted I'm sure it would be really great but it's a little rough right now.
LDJam user 280036
05. Oct 2023 · 06:21 UTC
I got everyone partying :sunglasses: :tada:

The tech here is amazing for 48 hours. You have a mini-map, and procedurally generated islands, and fog of war, which aren't trivial! Well done :clap:

Only gripe is that I accidentally dumped my inventory on accident -- maybe add some friction there.
airwaffle
05. Oct 2023 · 11:22 UTC
Very nice game. Impressive getting fog of war and minimap in! Though the controls are a bit hard, I kinda like it. Think it would make a good speedrun just because of how precise you have to be to not lose speed.

![Capture2.PNG](///raw/c41/f2/z/5fbd4.png)
milq
05. Oct 2023 · 14:33 UTC
An amazing game for such a short development time! It reminds me of PC simulator and strategy games from the late 80s and early 90s! My congratulations, although the controls might be a bit difficult at first, you get used to them. It doesn't fully fit on my 1080p screen, and it doesn’t when I switch to full screen either. Despite that, all I have left to say is well done, I think it's a fantastic game and admirable for being a Compo game. Great job!
leparlon
05. Oct 2023 · 20:47 UTC
You had me on the procedural generated islands (with shallow water) but the fog of war and mini map were overkill! Fantastic job for a compo game! You should feel proud!
Music + scenery makes for a great atmosphere as well.
![Captura de tela 2023-10-05 224050.png](///raw/59a/1/z/5fd00.png)


I also have a flood-fill story to share. Had to use it on my game (although much simpler than yours), to which I was surprised I could code from memory! But then, it not surprising, didn't work at all. Checked the code, checked the code, looked for pseudo codes online, added prints, read about GODOT debuging, nothing makes sense... then... out of nowhere I look at the input array and see: *levelArray[pos.x][pos.x]* fixed it, saw the scoring system / greenefication working first time, went immediatelly to bed semi frustrated (3 AM)
Commit message:
![Captura de tela 2023-10-05 225505.png](///raw/59a/1/z/5fd03.png)
Translation:
Reverted the id thing to improve shot (caused worse bug).
Flood fill counting points.
tomorrow little cars
(shot is how I called creating canals, the walls shoot a "building canal" that when colides with a canal, trace the path back creating canals to all nearby building canals. I had added an ID to prevent another building canal to build another canal shot at the same time. Sounds fancy but that code is HORRENDOUS. In the end I "fixed" it by making the canals shoot much much faster, which also improved the gameplay on accident, so win win)

No regrets. Good luck! May our code works first run on the next compo!
🎤 Nick Rafalski
05. Oct 2023 · 22:57 UTC
@leparlon Hehe I can totally see myself making that same indexing mistake (pos.x, pos.x), glad you figured it out eventually! Calling your canal-creating-things "shots" is so funny! I can totally picture how that developed over time. Thanks for sharing the laughs, and thanks for all the kind words about my game :)
Germdog53
06. Oct 2023 · 05:05 UTC
This is a very nifty and neat game. I enjoyed the game play. There are a ton of features for a compo game, really well done.
steiner2001
06. Oct 2023 · 13:05 UTC
This game's potential is overshadowed by frustrating controls that make it difficult to navigate. Finding ingredients is a frustrating challenge, and the unresponsive UI adds to it. But nice idea, lovely graphics and music
bloodyaugust
10. Oct 2023 · 15:18 UTC
I made it in 477.62! A very impressive entry from a technical standpoint. Proc gen and the minimap both worked very nicely, impressive to get those done in the space of the compo. I thought the art and sound were both cute, and overall it came together for a nice experience. Personally I enjoyed the control scheme, but I can see how a continuous scheme like that of a joystick would work for more people without taking away from the experience. Honestly, I'm not sure how "fun" it is, but with some further work to diversify the gameplay elements, I think it could do well as a simple mobile game. Nicely done! :tada:
Phlip45
11. Oct 2023 · 23:29 UTC
Definitely a lot more than I would expect from a compo game. Minimap, inventory system, procedural level generation. Just one of those would have been the entire goal for me! haha.

For me the game would have been fine if the keyboard controls mirrored the onscreen controls. I'm assuming it is a bug, but pressing 'A' for left or 'D' for right only moves the ship one tic. Holding the button does not continue to turn the ship left and right so you have to constantly tap the keys which is frustrating. I noticed that when you click and hold on the onscreen buttons that you do turn smoothly (still tic by tic, but holding it keeps you turning).

If you fix that, do @ me so I can play it again!
EX3D0
18. Oct 2023 · 22:28 UTC
Pretty cool game, the graphics and audio were pretty well done and I have to give you props for the procedural generation as it worked out super well. I wasn't a huge fan with how the boat controlled but other than that it was a pretty fun experience!