Strega

LD22

Ludum Dare 22 Complete: Leave me alone

This was my second Ludum event and my first time entering the compo. It was pretty tough to motivate myself through the whole competition. I wasn’t even sure I was going to enter until late Friday night. I’m glad I did.

With the theme, “Alone”, I decided go with the desire to be alone. To escape the clutches of others or to run away from your own inner demons. My dare entry, “Leave Me Alone”, takes this idea and runs with it, literally.

“Leave Me Alone” is a fast-paced platforming game where you have to evade the demons that are chasing you. As you run try to collect fragments of yourself and escape their clutches forever.

Leave Me Alone – Entry Page


Ludum Dare 52

It Was All For The Tuna - Post Mortem

Hi everyone, we’re Cosmic Adventure Squad and we’ve been doing game jams for over 10 years! You may have seen or played some of our previous games such as Deepest Sword and Game Name. We’ve been asked by a few people to share some of our processes and thoughts for how we made It Was All For The Tuna, our LD52 entry.

It Was All For The Tuna is a chill fishing game where you play as Toro the cat and you’re tasked with catching Tuna to feed the citizens of NekoTuna.

Play the game here: https://ldjam.com/events/ludum-dare/52/it-was-all-for-the-tuna

This is part 1 of a 3 part post-mortem taking a look at how we approached developing the game. In this part I’ll be talking about the programming and gameplay aspects of the game. Thank you for reading, please leave a comment if you found this informative or helpful!

Part 1 | Part 2 | Part 3

Title.gif

Programming

Hi, I'm Strega and I'm the programmer on the team. My schedule for LD52 was a bit different from the usual flow. For the last two jams I took Friday and Monday off of work to prepare and recover, but this time I only took the Monday off. I didn’t realize the start time had changed for LD52, starting at 12 noon PST instead of 3 pm like last time. This really cut into our development time since I lost over 5 hours the Friday since I was still working and since the jam started earlier that meant it also ended earlier, overall I lost probably close to 9 or more hours of programming time that we normally would have had, but I think we were still able to get a lot done!

We spent most of Friday just brainstorming ideas and narrowing down which concept we wanted to develop, but eventually landed on a fishing concept with a top down view. Brainstorming took longer than normal so I didn’t have much time to prototype multiple ideals like we usually do. Instead, before going to bed I focused on making a task list and set up our base Unity project and updated packages that we normally use like LeanTween.

Saturday was when I started really working on code! Normally I start by focusing on prototyping the gameplay and making sure that the core game is fun before moving on to supporting systems and polishing. However, this time after I set up some basic movement capabilities using WASD controls, I decided to work on the water and environment setups.

Water Shader

For the water, I created a shader following this toon water shader tutorial by Roystan. This was a great base that I was able to modify to fit our needs. I tried to optimize the water shader to be just a relatively small quad that moved around with your boat as you moved, but this proved to be kind of a waste of time since just stretching the quad across the whole world was performant enough and ended up looking better at the camera angle and FOV that we landed on.

Terrain Shader

To test out the water shader I decided to use Unity’s terrain system to create the world’s environment. This ended up working out really well for us. We’d never used the terrain system for any of our previous jam games since it is usually overkill for such small projects, but since this game was about exploring vast oceans with small islands it made sense.

We were really inspired by A Short Hike by Adam Robinson-yu (everyone should play this game!) and its environment and wanted to do something similar. Luckily, Adam was kind enough to have tweeted about how he achieved the look for his terrain by using a technique called triplanar mapping and a clever clamping technique with Unity’s terrain system to get nice hard edges between different painted layers. I started from a Triplanar terrain shader by Robert Yang and modified it with the techniques from A Short Hike to get the look we wanted.

Ripples Shader

After that, I wanted the water to react to the boat’s movement. This meant adding some kind of ripple effect. I found a great interactive water ripple tutorial by Minions Art that was based on using a render texture. I was able to integrate this into our water shader and after a bit of tuning all the shaders together the environment started to look pretty good! Here’s an early gif of it all working together.

progress-terrainAndWater-short.gif

Lastly, I found a toon shader that I liked and applied it to all the game’s models and integrated it with the terrain shader to unify the game’s look.

After all these shaders were done, I showed RosyPenguin how to tune everything so that she could independently iterate on the game's visuals as she worked on the art. Getting to this point took most of Saturday. I was starting to worry that we wouldn’t have enough time to make good gameplay so I had to switch gears quickly!

Fish Behavior

Since we were making a fishing game, I had to of course make some fish! I wanted them to behave somewhat realistically so I implemented a simple flocking system for their AI. You can learn more about how to implement a simple flocking system here. I also gave them some environmental awareness so they wouldn’t get stuck swimming into the islands and boat avoidance to make them feel responsive to your presence. You can see some of this behavior below.

progress-fish-short.gif

Next, I knew we wanted to have a lot of fish in the game, like hundreds of them and this would likely be bad for the framerate. We wanted a fixed number of actual hand positioned fish to make the game feel handcrafted and intentional. So I started by doing some tests, placing 100, 200, and then 400 fish into the world to see how the game would perform to make sure my intuition was correct. I’d be happy if it all just worked with 400 fish, but of course it didn’t. Luckily, I knew some techniques for solving these kinds of perf issues. I was able to apply a spatial partitioning pattern to make it so only the fish around the player were updated and visible. With a bit of tuning and some other optimizations I was able to get a decent frame rate with the WebGL build. I highly recommend learning about gameplay programming patterns here!

Fishing Gameplay

Now that I had fish I needed to figure out how to catch them. Originally we wanted you to be able to upgrade from a fishing rod to a net to an ocean rake, but ultimately these other methods got cut and we decided to focus on just the fishing rod mechanics to reduce scope. I wanted our fishing mechanic to feel like there was some element of skill and not be a quick time event, an arbitrary bar, or a separate minigame. I wanted it to feel integrated and seamless with the rest of the game. It took a few iterations to get there and took up most of Saturday night and Sunday morning. I ended up staying up all night, I don’t recommend doing that!

To start off, I focused on how you hooked a fish. I didn’t want the player to have to spend a lot of time waiting for fish to come latch on to their hook so I opted for making it so you could just click on a fish to start the catching phase, this made the gameplay feel more immediate. I used a cursor to help players confidently aim and target fish. I used both a raycast and a sphere cast from the mouse to confirm which fish the player intended to click on and allow for less precise targeting. To make the hooking part feel more juicy I created a procedural line that flailed out from the rod and snapped to the fish and reel itself back in once you were done. This helped provide feedback for what was going on, sell that you’re using a fishing rod, and made it fun to even hook a fish in the first place. At this point I decided to simplify the control scheme from using WASD to move the boat to just click and hold to move towards the cursor. This made it so you had a lot finer control over your boat’s direction and speed, turned the game into essentially a one-button experience, as well as making a mobile port possible in the future.

Once I had the hooking done I started to experiment on the core fishing gameplay. I knew that we wanted to be able to upgrade the player’s fishing rod and that there would be different levels of fish so I had to keep in mind what aspects could be tuned and scaled for both the rod and fish. To make it easier to think about, I treated the fishing game like a battle system, the fish had health and you were doing damage to it with your rod. This meant that I could generally tune the strength of the rod and the health value of the fish. Now I just needed to figure out how to best deal damage.

I started simple first, I had a system where you just had to hold the mouse button for long enough to continuously damage the fish. To make it feel more dynamic I made the fish swim away from you and drag you through the water. You can see this early interaction in the gif below.

progress-fishing-small.gif

This actually felt pretty good, but I was worried there wasn’t enough of a skill factor and people would get bored just clicking and holding their mouse button. I had my teammates and people on our discord play to get feedback and this confirmed my intuition. I needed to add a more skill based mechanic and some way to lose the fish. First I tested out adding a stamina system, this made it so you’d drain stamina as you held the mouse button down and could release the mouse button to recover stamina, if you held too long you’d run out of stamina and stop fishing or if you didn’t hold enough then the fish would swim off and escape.

After playtesting with the stamina system, we felt that it didn’t quite feel right. You were stuck in a mini-game now, if you encountered a fish that you couldn’t catch you had to wait for it to escape or intentionally fail. This made the player lose some autonomy, because you could no longer just stop fishing by simply letting go of the mouse button since that now made you recover stamina. To solve this I had to think of a different approach for how to interact with the stamina system.

I didn’t want to complicate the control scheme by adding extra buttons so that left me with using the mouse’s position in some way. What I realized was that I could create 2 virtual button spaces by splitting the screen in half based on where the boat was. The area of the screen in front of the boat which contained the fish could act as one button, and the area behind the boat could be the other. This made it so I could remap holding and releasing the mouse button to simply moving the mouse from one section of the screen to the other. Doing this motion also had a sort of tactile sensation like pulling back on the fishing rod as if you were actually fishing. This felt right! You could now release the mouse button any time if you didn’t want to fish anymore and play the whole game with a simple press and hold action.

To enhance the skill aspect, I made it so if you positioned your mouse to form a straight line from the fish through the boat to your mouse position you’d more effectively reel the fish in. To give the player more feedback, I made it so the fishing rod would visibly angle towards the mouse position. These things really helped to sell the feeling of fighting the fish and reeling it in. You can see the final result below.

Fishing.gif

There were a bunch of other things I added to make the gameplay feel even better. I gave fish stamina as well so that they could get tired and become easier to reel in. I added text doobers to help communicate state and congratulate the player for successful catches with different phrases based on the size of the fish you caught. I made the fish get pulled out of the water so you get a chance to see what you caught and get rewards. Then, I added VFX and SFX hooks for Tenlki and RosyPenguin to add their parts and improve the feedback. I think all these things added together to make the fishing mechanic feel fun.

Upgrades and Fish Currency

With the core mechanic done it was time to move on to the supporting systems. At this point it was probably late Sunday. I quickly put together a simple upgrade menu that could be accessed from any of the towns. I put together an upgrade system that could switch out your player’s model and stats. And then, I made it so the fish could drop fish cutlet doobers for the player to collect and use as a currency for upgrading.

upgrading.gif

With this we had our core gameplay loop completed: catch fish, upgrade your boat, repeat. Simple, but effective. To make it easier to find fish, we added a radar system that would upgrade with your boat that slowly revealed more and more information.

Sunday evening, I spent some time doing an initial tuning pass to make the progression feel pretty good.

UI Screens and Tutorialization

The last few hours were all about getting all the UI screens and the tutorial system together. Most of our recent games have a pretty standard UI structure consisting of a title screen with a start button, a HUD with some gameplay elements, a pause button and menu with audio controls, credits, and other settings, some kind of dialog system, and ending screens. However, each game tends to have a unique tutorial system since all of our games have fairly different gameplay. Since I felt we had a pretty novel fishing mechanic, I needed to prioritize teaching people how to play in the game rather than relying on instructions in the game’s description on the webpage.

I didn’t have much time at the end so I had to rely on our simple dialog setup and just displaying text tutorials as the player interacted with the game. I personally dislike games that just show a big image or wall of text describing how to play, so I wanted to make sure that instructions arrived in a timely manner and didn’t interrupt the player’s exploration. I used Unity’s coroutine system to set up a simple way to sequence detecting the player’s actions and displaying the appropriate tutorial dialog. For example, telling players how to move and then detecting that the player had actually moved before going to the next step or waiting for the player to hook a fish before telling them how to reel the fish in, all while never blocking the player from controlling their character. This was really effective to do in the last few hours of the jam.

tutorial.gif

With the title, tutorial, and end screen hooked up in the game, it finally felt like we had a nice complete package. I was really worried we’d run out of time and submit an incomplete experience, but luckily everything came together more or less in the last hour.

Overall

Overall, this was a pretty intense jam. I think I only got like 4ish hours of sleep the whole time, I highly recommend actually sleeping during jams! We definitely over-scoped at the beginning, but were able to recognize that midway through and adjust our planning and expectations to deliver on a solid experience.

I’m glad that I put time into the visual side of things early for this jam. It was good to practice shaders and really helped solidify the idea of the game. I felt like I lost hours just driving the boat around watching the water ripple and the fish flock and avoid my boat.

Originally we had planned for there to be AI boats that were also catching fish, for fish to grow and reproduce, for there to be different upgrade paths and options, and multiple endings. I had spent a lot of time making sure everything would scale once we started adding all these other systems, but we ended up just cutting those concepts for the sake of time. Sometimes it’s better to cut your losses and focus on the core things rather than try to squeeze more things in. Ultimately, I’m proud of the simpler, more chill game that we ended up making.

By the way, don’t let this write-up make you think I somehow coded everything perfectly. There were plenty of nasty hacks I did to try to save time and bugs that I spent hours on only to discover it was bad math or an extra semicolon somewhere. Also, not everything was perfectly sequential, I was constantly going back to tweak or fix things in the shaders, fish’s flocking algorithm, tuning variables, camera positioning, etc throughout the whole jam. That being said, the more jams you do the better you get at pre-planning how you structure your code, anticipating when to use programming patterns, making tuning variables, or predicting performance issues. Good luck on your next jam!

~ Strega

Part 1 | Part 2 | Part 3