Dev Blog | Comet

Been holding off on sharing the running animation until some work was finished in town.
Stella's cape is animated beautifully by @toahiddenplace
Stella_Running Without Lamp

When outside, Stella runs about.
But when inside she walks.
Her mama taught her manners.

In this gif you can see a spattering of Maria's amazing NPC's Along side of bunch of tech work @Drew-Lo's been working on.

We now have a generic entity in LDTK
Where we can declare...

One of the things you wouldn't think of on the first pass is making sure the logic is correct to allow you to walk behind an NPC.

Changing the depth of the player depending on if they are above an NPC or below it. That took a little thinking to do.
Correct layers for NPCs

And as you could see in the gifs above, we have two types of NPC.

Standard NPC's bob away and turn to face you when you speak to them.
Then return to a default facing.

Unique NPCs don't turn but have cool animations. Settings easily applied in editor.

We finally have a logo! Original concept was done by Rae on the discord server.
Then it got further updated and refined by @stepepson

Still playing around with the colours but it works really well at Pulp's 2x resolution.

Title_Screen_Test Title_Screen_TestBW

The team really enjoyed the book animations I shared last time.

Since then we're matured our understanding for how the book will be used.
Which lead to this fun idea.
Comet_Book_Load2

Finally, I'm holding off on sharing too much of @FlipDock's writing.
But maybe next time we'll be able to show off some other stuff he has cooking.

Thanks for reading :smiling_face_with_three_hearts:

12 Likes

Back again with a bunch of Comet development updates. @drew has put in a bunch of work since we last checked in.

A big focus this month was making the critical path of chapter 1 playable. This doesn't mean everything is perfect, but just that you can start the game, move though puzzles and trigger events that enable the player to get to chapter 2.

This required scripting all of the scenes that @flipdock has written for us, and a lot of testing for different "quest" lines.

Not easy to show off but an important milestone for the team.

But there's a bunch of fun stuff I can show off.

Stairs!

In the Pulp build of Comet (go back to the start of the devlog to see more of that), when walking up the steps the player would also move up and down based on the direction they were traveling.
PulpStair

Well now that hot industry-leading stair tech has been added to the our SDK version.
SDK Stairs

It looks normal here but without it, movement over stairs feels clunky and cumbersome. And because we want environments to look interesting, it's important to make them look good.

We did also played around with putting "stairs" in areas like this to enhance the feeling of depth.
earth_stairs

Lighthouse!

One of my goals with the Pulp build of Comet was to make a game that didn't look like it was made in Pulp. I didn't want people to see the tiles.

I wanted each major area to have a set piece building or object. For the fishing village, that was the lighthouse.

Here's how the lighthouse looks over two Pulp rooms.

This is made up of a bunch of 8x8 tiles.

Comet now has 10x10 tiles and so the world has been scaled up a little.

Applying a 2x to the lighthouse wasn't going to work.
Lighthouse Mockup2
It needed to be something inbetween.

So we remade it.
Lighthouse

I couldn't have done it without @Maria coming in to fix my mistakes.

None of the line work on the nighttime versions of levels are final. I For now I just draw outlines.
In the future we'll go though and rough them up.
Pulp Lighthouse lines

Birds

Lighthouse Ingame
They fly!

New dialog boxes with character names

There was an idea that it might be okay for the player to remember who's who within the chapter 1 town. In testing, we noticed that it's actually quite hard to keep track of who we're speaking to and so it might be nice to display names with our dialog boxes. So I started working on a new design.

Our old dialog box was taken straight out of the Pulp build.

But it always felt flat to me.

The full SDK gives us more flexibility so if we need to add name plates, I thought I'd explore some new shapes too.
First Test

This was my first test. I thought changing the silhouette of our box could be interesting and give a sense of depth. And mocked up a button too.

@Steph and I actually mocked up this idea in Pulp
Pulp Shape

But we moved away from it for one reason or another.

After making the first mockup I tested some different name plate designs.
Textbox_options

Now I stuck the portrait in the bottom left hand corner because I imagined there might be a requirement to reduce the load on Drew.
But the team really didn't think this would work.

It was too cramped and what if the name was too long for the box?

So I designed another mock up.


The name could be extended. Let's see how it looks in game...

As you can see, what I thought might be an interesting design choice to have some space around the window to see the background actually results in an image that's harder to read.

At this stage, Steph was getting sick of me flailing about and made what would become our final design.
Final Dialog
The portrait and box stick into the corners but we have a new non square shape. And a little nine slice on the name plate means it can fit most any name we throw at it.

Level art updates

The building site (AKA, the tutorial section of the game) was being used for some screenshots on our Itch page, so I needed to finish designing it.

Before

After

I somewhat worry this is too noisy, so it may need to be adjusted after playtesting.

When seen up close, it looks pretty good
Building site Zoom

Our beach got a glow up too.

Before
Comet_FV_Beach

After
Beach

Drops

Again, to support more interesting level design and puzzles, I want to use elevations where it makes sense.

To support that we needed to make some drop entities. When a box goes down the drop it bounces an extra tile so you can still get behind it.
These are now working in game. Just place down these entities in LDtk

And boom!
Drop

Music

In February of 2022, I had been posting development pictures of Comet on the Playdate Squad Discord server and a guy named Triple / Kyle McAuliffe saw my work and offered to make music for Pulp.

What a talent!
I sent him over small playlist of tracks that embody the feeling that I had in mind.
From that, he was able to capture the vibe I was going for perfectly!

This is the first track he made called Fishing Village - Day

I really fell in love with the notes 24 seconds in! :heart_eyes:
They still feel magical.

All of this out of Pulp's sound tools. He made 9 tracks for the game in the span of about 10 days.

Well, before the game moved to the full Playdate SDK he tried his hand at remaking some tracks in full fidelity to see what they sounded like. So when I reached out last year to formally request we rebuild them, he was excited to jump in.

It was a joy going back and forth with Kyle to remake these tracks, and while he was in the grove he made a few more.

Music

Let the new version of Fishing Village wash over you!

As you might have noticed, we have different arrangements of tracks based on your context.
Indoor/outdoor, day/night...

Inspired by the iMUSE system for sure! But don't expect any special transitions here :slight_smile:

(Find him here: https://www.youtube.com/@tripletritone)

4 Likes

Today we're reached some big milestones on :comet:Comet!

  1. Chapter 1 is playable!

  2. We launching our store page!

Follow us on itch!

4 Likes

Great job! Looking great and sounds great!

I was wondering if people were keen to help me brainstorm some Puzzle Mechanics for chapter 2 of :comet:Comet.

Let me lay out the problem i'm facing.

I'm open to replies here.

Or you could jump into the :comet:Comet dev log channel in the Playdate Squad discord server.

In our last devlog, I talked about Chapter 1 being playable. Sadly, that was in reference to an internal milestone, not something people could download (yet :eyes:).

Thank you to everyone who reached out and asked how they could get their hands on it, and forgive me for the confusion.

There are a few systems I’d like to work on before we put the game into the hands of people outside the team, so it might take a little more time until folks get to play it.

Plus, there are a few developments outside Comet that I’m dedicating time to…

Life Milestone

Pretty soon after we last caught up, my wife and I had our first child!

She’s had a number of health issues which have affected her growth and sleep. This has been really rough on us. Thankfully we have family that live close by which has made all the difference. Our little girl is back on track now which should hopefully result in a more stable schedule for everyone.

Comet Milestone 2

For a long time now, Comet hasn’t been very performant on Playdate hardware. The team was so focused on building the content creation pipeline and game foundations that performance took a back seat.

Comet quietly has a lot going on and it’s really important to Drew that the game runs well and loads assets quickly. He’s done a lot of work already to load assets on the fly when they’re needed rather than all at once, but while I was on Dad duty, he wanted to take the time to focus on getting our framerate up and with a bit of head room.

Here’s what he found…

Performance

Hey guys, Drew here.

A little context before I start, Comet’s levels are built in a tool called Level Design Tool Kit or LDtk.
This is an easy option for us because the great Nic Magnier (creator of Pick Pack Pup) built an importer for Playdate and shared it with the world.

When I started working on performance, the game was running somewhere between 20-26 fps in the larger outdoor areas. The goal was: get this up to a smooth 30 fps.

There’s lots of stuff going on here that could be slowing our game down: We have large areas with tons of sprites, lots of different layers that need to be rendered with lots of invisible collision rects that prevent the player from walking through solid objects, and lots of animated sprites with timers that are updated every frame.

I did my testing in the Fishing village at night time, since this is the level with the most going on (size, number of entities, animated tiles, etc.)

Baseline: 20 fps

Walking to the neighboring area, we saw that it already ran at a noticeably zippier 26 fps, but still too far from our goal of 30fps for me to be happy with. This screen also has entities to load, all of the layers, and the water that we need to animate, but just having less.... stuff to animate and update already meant that it ran faster.

Guard encounter: 25/26 fps

Check Lantern UI

On the left side of the screenshot above, you can see Stella’s hand holding the lantern. Under the hood, the game was checking a bunch of stuff every frame to see if it needed to update the animation frame based on how strong the lamp was. We should really be conserving the operations that we do every frame, so instead we can make this check only when the lamp radius changes.

While we're at it, the code checked the crank every frame using “playdate.getCrankTicks(4)”. Instead, we can try using a callback function which is only called when the crank is turned. Let’s see if that was more performant…

...

...

...

it wasn't.

So... no luck there. I guess it's time to look elsewhere for some performance savings.

:squid:Squid's Performance Recommendation | Cache Animated Tilemap

This was suggested by Squidgod, an absolute bro in the Playdate community who was nice enough to take a look and give us some suggestions on how to improve our game's performance.

For our animated layers such as the water, we had a single 10x20 animation that we were tiling over whatever size we needed to get the overall effect, such as the ocean.

Every animation frame, we're grabbing one 10x20 piece from this spritesheet and tiling it over a large area to make our ocean move.

Squid's suggestion was that we pre-bake a big sprite sheet by doing the tiling operation one time upfront for each animation frame, and saving one big spritesheet of the animated ocean to memory. That way the process-intensive part only has to be done once when we load the level. Let's give that one a try...

BINGO!!!

…and... we're up to a solid 29/30 fps, even with larger levels with multiple layers and animations!

...BUT... the new method takes up lots of memory... causing the game to crash :-{

It turns out we traded one problem for another. Pre-rendering the different versions of the animated background offloads the processor, but the tradeoff is that it fills up the Playdate's memory which has to hold a large image for each frame of the background animation (like those beautiful ocean waves.)

In those cases the game still runs ok (until it crashes), so the tradeoff was worth it, but I need to keep a close eye on the memory usage from here on out!

Time to see how I could free up more memory. The playdate has 16MB of RAM, and we were using about 6MB of it in the Fishing Village before, so plenty of headroom! After caching the tilemaps though, we were closer to 12-13MB. It was still enough in theory, but it seemed that when we change levels, if there's not enough headroom then the game generates all of the tilemaps and stores them in memory before Lua's garbage collection can kick in, causing a crash. Blargh.

I decided to try and move on from drawing the animated tiles across an entire layer (with a mask). Instead, I drew them onto some smaller-sized sprites. Rather than each animated entity having its own layer in LDtK, I created a special entity where you can select the animation and the size it should be tiled over.

The game's code will then pick up this entity, and when the level loads, it’ll pre-bake the animation for the exact size we need it for.

Once I got that working, it drastically reduced the amount of memory that I needed. It went from hitting the 16MB limit down to having the memory usage consistently at ~9MB. Also, the loading times for the large Fishing Village were down from 8 seconds to around 6. BONUS!

Now we're at a smooth 30 fps! Time to sit down, relax and enjoy the fruits of my labor.

Back to you Donald.

Book Intro

In previous blogs, I showed off some book animations and a cool concept for how to transition from menu into game.

Well, that’s no longer just a concept!

We went back and forth about what the book is.
Is it a story that Stella is writing in her diary?
Or is it a story the player’s reading about Stella?
In the end we felt the latter was more appropriate.

Before we built it, we sat down and came up with ideas of how we wanted the intro to look.

Will, Drew and I all pulled our pen and paper out to come up with ideas.

  • How many fades should we have?
  • Should we have some sort of team logo then the game logo?
  • How should we transition from the card nicely?
  • How long do we want it to be?
  • Should we have a unique sequence the first time the player loads, then a quicker one next time?

From the brain storming, I made this mock up.

And Drew got it working!

Around the same time, Rae on the Playdate Discord was talking about using a little trick to display an exit animation.

After seeing that, Drew couldn’t help but work on it real quick.

To save time in testing, it’s been turned off (for now) but all in all, I think these sequences look great.

Team Logo

After a while, that left blank page started to bug me.

We had an idea earlier in development that this might be a book found in Stella’s room.

But I couldn’t get it to look good with my poor art skills, so we moved away from that concept and left it blank.

Some time later, I realized we could stick our team logo there.For a while, I’d been collecting examples of logos that would work well in 1-bit.

With some ideas in mind, I asked if anyone on Discord would want to make something for us.

Choosh was keen to give it a crack.

Given that Comet is half the Playdate’s resolution at 2x the size and our logo needed to sit inside the left page of the book, I didn’t give him a whole lot of room to play with, but after some back and forth I was really happy with the result.

Seeing as it will only be seen in game, I think it reads well.

We opted for a Comet that points up to represent our team making progress, and to avoid something that looks too much like our game logo, or FF7 (best not to invoke the wrath of Square Enix’s lawyers).

Slap a bit of detail into the background and I was able to get it in game pretty easily.

Key Art

After finishing the sprite art for the NPCs in the fishing village, I asked Maria if she could work on some key art. We’d need it for store pages, and it’s helpful on social media.

I gave Maria the guidance that it should show Stella with her lamp going on an adventure. Although she might be in the woods at night, the art shouldn’t invoke a feeling of fear.

And she nailed it!

Maria went through quite a process to get to the final result.

Here are some WIP shots.

Full Art

Banners

The result is something that blends in well for the itch page, and pops in a thumbnail.

Card Art

With the key art for the store page done, we went about adapting it to 1-bit for the game’s card art.

First, a scuffed mock up was made by me using Daniel kaasiand’s dithering oven.

After that, Steph took over. He did a wonderful job converting Maria’s work down to 350x155, by hand.

Then I took the torch back to finish it off with animations, a border & logo.

Collectables / Menu Image.

Chapter 1 of Comet has big hangout energy, but we also have some puzzles with a blend of difficulty levels to change things up.

As a reward for completing them, we introduced a few collectables: shells (+ a few animal treats).

Collectables gif

We also needed a way for the player to track what they’ve collected, and perhaps what’s missing.
So we decided to use the Playdate’s menu image system.

At the same time, we could have a little flavor text to remind the player what their goal is.

What better way to show it off: Stella giving Nat the Cat a fish.

Half Lit Indoor Areas

In a 1-bit game, it’s not easy to show a scene going from day to night.
We get around that by having a transitional scene in Stella’s house where she goes to bed then wakes up.

But when she wakes up, we found it wasn’t obvious to the player that it’s night time inside.
So I played around with having a black/transparent checkerboard pattern inside that implies some low-light lamps being left on overnight for Stella (seeing as she’s afraid of the dark and all).

In testing it reads really well.

But I was worried about how it might look when testing on device…

On device it looks great!

I gotta say, I love testing :comet:Comet on device. It just comes to life! It’s a very special feeling.

NPC Portraits

During the milestone push, we also finished the portraits for all other characters in Chapter 1.

I really like how these turned out.

Thought Bubble

Will and I found it tricky to tell when Stella was thinking to herself vs talking.
So Steph made this new dialog box we can swap in where needed, and Drew was kind enough to come back to the dialog system to put it in.

Early Level Design of Chapter 2

And finally, during this time, I began blocking out Chapter 2.

Chapter 2 opens up and allows the player to explore different areas of the woods.

The plan for now is to block up the basic shapes of the woods as a whole level.
Then break it apart into smaller more manageable rooms.

Each main area will have different types of puzzles, most of which will require the player to make clever use of the lamp’s light.

The two areas I’ve been able to work on without programming support have been the rocky area with a lot of cliff puzzles.

And the lost woods-style section which I won’t show off just yet.

What’s next?

The team has scattered recently but we plan to make a push before Christmas & New Years.
There are a handful of polishing tasks for Chapter 1, then I think we’ll all be focused on developing Chapter 2.

Look out for it next time we talk!

Be sure to follow us on Itch!

5 Likes

Great read on the improvements for pre-baking animations. To reduce loading times you could write the pre-baked animations to disk, and the load them from disk if they already exist there. That way you'd only have those long loading times once.
Alternatively you can copy them into your project assets after pre-baking them in the simulator, that way you can avoid the baking times on the device entirely.

I was playing around with the source of "Lights Out" by PossiblyAxolotl to get it running smoothly on the device despite moving light cones, and that's how I ended up with smooth FPS and still very short loading times.

I'm loading all levels once on startup when in the simulator:

And when initializing the lighting for a level, I try to load the animation from the source assets. If they aren't there and I'm in the simulator, they are generated. (After that I manually copied them over from the simulator's data folder to the assets in the game sources.

3 Likes

Great read, I especially liked the part on the half-lit indoor areas to get across it being at night!

1 Like

Some people in the Playdate community were asking me questions about how we use LDtk with our game

When I got into LDtk there weren't many youtube videos that actually showed people using the tool.
Just general hey look at this thing. Let me read the website and play with it for a few min.

So I decided to make a video.

It also shows a behind the scenes look at Comet's development.

My not so secret plan is to make it the defacto level editor for Playdate devs so I encourage you to check it out.

3 Likes

Mini :comet:Comet Dev Log

@Drew-Lo spent some time on getting the camera looking nice in our decided document it.

Hey everyone, Drew here again!

Up until now, the camera in Comet was always centered on the main character. This works just fine, but I wasn't happy with how the camera scrolls off screen and shows you the ugly edges beyond where our level is.

I thought it would look much nicer if the camera stops at the edge of the screen so that camera never leaves the game world. Let's give it a go!

It looks better already! BUT things are never this easy. Implementing this has brought an additional challenge:

As you can see, since the camera is no longer centered on the player, it can happen that the text box is overlayed on top of the player, which doesn't look great.

We've seen this addressed in lots of games, where usually the dialog box is moved depending on where the player is, so I gave this a try.

This works pretty well, but the team agreed that this could look better. It turns out that we already had top and bottom versions of the dialog boxes that I didn't know existed!

I was able to implement these fairly quickly, so let's take a look at how it looks:

so now we have all of this working, and I think the game looks much more polished now!

Wow, that was a long day, and it's starting to get dark, so time to call it a day, crack open a beer and celebrate the...what the!?

To quote Guv Bubbs: "Look at that sausage being made"

It turns out that now that I've changed the camera logic, It's totally broken the logic that overlays the dark layer to give us the nice lighting effect at nighttime.

Looks like i'm going to need to re-wire our logic for displaying the dark layer now that our camera logic has changed. This is no easy task given the complexity of the lighting logic. I'll check back in in a bit.

So there we are, one step closer to having a polished game! Time to get back to fixing the rest of the game's jank. Until next time!

4 Likes

As we move towards the end of the year here, Team Comet has been working to polish off chapter 1 so in 2024 we can focus on chapter 2.

Let me show you what we’ve been working on…

New Scenes for the Intro and Night Time Transition.

Previously, Comet opened in Stella’'s room. We turn the page and she’s standing there. A simple text book greeted you.

Something needed to be done.

I specifically wanted a solution that remained low effort as there's still plenty to build in the game.

With the art we already had on hand, I was able to make the assets for the waking animation and abrupt wake up. Will wrote up some intriguing dream thoughts and Drew scripted it.

I'm much happier with the result.

I'm not a great animator so I actually used powerpoint to animate the final result!

  1. Fly in alongside a shrink

  2. Screen capture with ScreenToGif then trim the ends

  3. Imported the result into Aseprite, then I cropped & touched up a few bits

Given that we’d coded this already we thought it would be wise to tune up another cutscene, later on in the chapter where we transition to night time.

Death and Respawn Updates

We now have our death and respawn animations in. Keeping it simple and flexible, but adding some flavor with random emojis each time you respawn.

Updated Dark Layer Art

Comet is a game about being afraid of the dark and using your light to solve puzzles so most of it takes place at night.

We haven’t shown a lot of night time gameplay for a few reasons, a big one being: we still had temp artwork for the night layer (how each asset shows up at night, and how Stella’s torch interacts with them).

My art skills are getting better but I tend to stick to simple solid lines when it comes to assets. .

Now that the level design is locked, it was time to take a different approach with the night time outlines.

What do you think?

Panels Cutscene

A goal I had for Comet was for chapter 1 to really capture the player’s attention. Start strong, ya know?

As a part of that, I wanted the ‘inciting incident’ to have a big budget cutscene, just like PS1 RPGs.

There are a few ways we could’ve done that on Playdate but my hope was to have an interactive comic using Panels, a Playdate framework. (Made famous in Cadin Batrack’s game, The Botanist)

I’m pleased to say we’ve started using Panels and it’s going great, however we’re not ready to show anything off just yet…

… But here’s a sneak peek!


Credit to @xmenekai for working with us to create our Panels

Vote for Comet!

Right now the Playdate Community awards are going on.
If you’ve liked our devlogs, gifs, or screenshots we would love it if you would vote for Comet in question 13, Most Anticipated Game.

(Hot tip, If you’ve already voted, you can actually go back and edit your response)

Vote now!

Thank you

Team Comet :heart:

2 Likes

Hey friends,

I can’t tell you how nice it is to be working on Chapter 2 in earnest. Comet started as a small project when Pulp was released in Feb 2022. It was then rebooted in September that same year as a full Playdate SDK project.

Since then we’ve worked hard to build many foundational systems that allow us to quickly make content and iterate on feedback, and we can finally show off a lot of that work in a trailer!

Reflecting on the journey so far, I've spent a lot of time looking at different versions of our opening town and I’m proud of how far we’ve come.

The current day and night time views of Cliffside Crescent.

When we last caught up we talked a lot about polishing up Chapter 1 so this time around I want to tackle Chapter 2. Before that though, I’ll handover to Will who’s going to close out our devlog journey with Chapter 1.

Writing About Writing

Hello, hello!

I’m Will, the lead narrative designer on Comet! I’ll spend this slice of the devlog delving into two narrative topics that’ll (hopefully) further draw you into the world of Comet: characterisation and worldbuilding.

Since Donald’s going to give you a glimpse at the progress of Chapter 2, I’d like to take you back a bit and give you some more insight into Chapter 1 and how we breathe life into the little fishing village Cliffside Crescent.

Producing a Personality

You’ll be spending a lot of time with our heroine Stella so we wanted her personality to shine throughout the game. As much as I like playing as Gordon Freeman-style protagonists which let the player shape who the character is, that wasn’t what we wanted for Comet. We want you to feel connected to our cheeky charming heroine, but unless you’re a pre-teen girl who lives in a fishing village, that might not come naturally.

These go all the way back to the pulp days

We started building up an idea of who Stella is; What’s her earliest memory? What does she dream about? What are her fears? Who does she look up to? What’s her favourite food? Is she left- or right-handed?

Then, we didn’t add any of that to the game… Not directly anyway. Reading through lines of descriptive text about Stella might be interesting to some, but it wasn’t exactly the pace we wanted to set. Instead, we used these traits/facts about Stella to inform how she approaches different scenarios.

For example, Stella enthusiastically greets people she knows, and she loves finding out more about the world so she questions people whenever she can. She has an internal monologue that helps her think through things. She’ll have little asides where she talks to herself and reminisces about a memory. Capturing that smart but naïve childlike view of the world through the lens of our intuitive adventurous protagonist.

And some of these double as gameplay mechanics to help guide you through Comet, so you feel like you’re progressing and unravelling things alongside Stella.

Generic NPC #5

So, how do we capture that same sense of characterisation for NPCs who we don’t spend as much time with? What about an optional NPC who has one line? How do we characterise them? How do we keep the balance right? Let’s explain one of the ways we do this with an example: take this unassuming character below.

He’s an optional NPC who gives two relatively inconsequential lines to Stella.

Most of you can happily ignore him, but for those interested in exploring the world and looking into each nook and cranny, you might come across a building that gives you a deeper look into Duke Farrell II.

Using a touch of environmental storytelling, you can peek into this guard’s life and get a sense of his personality. That, and a few other tidbits dotted around town, help you understand his connection to the village and to other NPCs… but I’ll let you discover those extra pieces in-game if you care to pull the thread of curiosity.

And this doesn’t just apply to characters. We also use environmental storytelling to give you an insight into the fishing village of Cliffside Crescent and the wider world.

Piece by Piece

Outside the main story and characters, there are plenty of optional bits and pieces you can find, hinting at the world and character backstories.

Some of this is done through environmental storytelling, some of it is done through dialogue, some via Stella’s monologue, and more. It’s all there to help build an idea of where you are and how characters live their everyday lives.

Let’s use this building below as an example. If you wander in and explore, you’ll find a puzzle with a prize in the middle.

Now, if we add a splash of worldbuilding…

You might get a sense that kids often run amok as avid explorers around town, and clearly someone isn’t too pleased with it! It also allows us to reinforce the bold explorative parts of Stella’s personality.

To build a world, we need layers composed of visuals, design, gameplay, narrative, underlying systems, and more. To make a location feel lived-in and real, all these elements interplay with each other to make it seem like if you, the player, weren’t there life would keep on moving.

Hidden tidbits like optional dialogue and puzzles enrich the experience for those who chose to explore. And for those who don’t, they still get an engaging story/gameplay duo to enjoy.

When Comet comes out we hope you’ll be enticed enough to poke, prod, and interact with most of the environment. Keep your eyes peeled and hit the ‘A’ button when you see something new. Whenever you do, the world feels that much bigger.

Back to you, Donald!

Bigger and Bolder

Now it’s time for us to talk about Chapter 2.

A big goal for me over the holiday break was to have the bones of Chapter 2 in place to allow the rest of the team to get stuck into it.

In Milestone 2, I shared a HUGE version of the woods. I decided to make it this way so I could get a general feel for this section of the game as a whole.

  • How does the hub connect to the other main regions of the woods?
  • How do the rivers cut up the map and where do they come from?

It’s important to me that even if the player can’t see or notice how the rooms connect, they feel like there’s a bigger picture in mind. Even when they won’t notice, I want to make sure that everything fits together well, so I’ll plot out things like: how high above sea level are you right now? What’s the elevation of that hill in the distance?

After making that big map and mulling it over, we were able to come up with a structure for this Chapter, and the woods as a whole. At a more detailed level we know what the player is doing here and how they’re going to progress.

So then I got cracking and started building out the rooms.

Here’s a rough picture of what Chapter 1 looks like:

And here’s our draft version of Chapter 2 at the time of writing:

The very rough maths makes it out to be about 200% bigger.

Chapter 1 is a dense little intro chapter where the player gets on their feet.
Chapter 2 is a large open environment full of puzzles that the player can tackle in a mostly freeform way.

Dr Lumen’s Hut

At the center of the woods is our hub.
A run down science outpost where you’ll meet Dr Lumen.

Back when Comet was a Pulp game, my idea was to have some key buildings in each area which stood out for the player.

I asked our artist Maria if she could design Chapter 2’s building and she was keen.

The requirements were:

  1. Run down hut
  2. Some softer curves
  3. Two stories tall
  4. Floor plan that looks something like this
  5. A water wheel at the front
  6. And something cool on the roof.

Initially I thought it might be cool to have a glass section on the roof; an angled edge or a bubble.

As with the buildings in the fishing village, I tried to make the interiors interesting with something that catches the eye, whether it’s a fish tank or saw blade.

In the back of my mind I pictured that the water wheel in front of the hut would power some sort of science stuff inside, but the details of what ‘science stuff’ meant was still hazy to me. Then Maria asked for more details to help her understand the full vision, so I had to figure it out.

The world of Comet doesn’t have electricity so I needed to look into what water wheels were actually used for. Around that time I’d watched the trailer for the show Lessons in Chemistry. In it, Brie Larson’s character uses a homemade centrifuge.

That led me down the track of looking at wooden centrifuges and STEM toys for kids. And then I found this…

I found my ‘science stuff’: a mechanical model of the solar system. From there Maria had what she needed, and soon after she showed us this mock up:

Which led to a detailed design:

And then came the final result:

This is the idle animation version, with the full animation being saved for you to see when you fix up the water wheel in game.

Once the outside was done, I started blocking out the rooms inside.

First, I drafted up the size of the rooms to get the feeling right (I have an equation for this :sweat_smile:).

At that point, I moved over to Aseprite so I could play around with some machines!

These cogs are used for the roof’s mechanical solar system, but what are they powering on the ground floor?

Some more puzzling with the team led us to think of large bellows and a furnace. So, any scientist using this building can make new lenses for the telescope (a key feature on another building we haven’t revealed yet), and flasks for… science stuff :sweat_smile:

At this point, I was happy enough and it was time to get it into the game. Thankfully, our programmer Drew’s work on our integration with LDtk made it very easy to do.

Enjoy!

Puzzling Ideas

When you pull back and look at Comet as a whole, the Core Mechanic that the game was formed around was: using the crank to control the lamp.

The secondary mechanic was: Sokoban puzzles (think of puzzles in games like Chip’s Challenge).

I chose these for a few reasons.

  1. Making Content
    Making content for games is tough. I often hear that it's the killer of indie projects, and I’ve seen this scenario pretty often: it’s fun to build and test out tech for a game prototype, but when you need to build out levels you realize that it’s a lot more work than expected. No shade on people that struggle with it though, we struggle too.

  2. Ease of Programming
    This project, Comet, has had a number of bumps in the road, and has a fairly large scope. It’s a project I can’t do on my own anymore which is why I’ve found awesome people to help me with it.
    I believed in the grand scheme of things, this style of puzzles would fall on the easier end of the spectrum, which would free Drew up to work on all manner of other things.

3.Core Mechanic Synergy

I could easily think of systems or puzzles related to cranking the lamp, as well as reasons to be in the dark and in the light (Much of this you will see in future dev logs).
But just knowing from the outset that these two parts of the project could compliment each other was encouraging to me.

With all that said, Drew was able to build out a lot of these extra systems in the past month.
We’ve got spikes, walls and buttons, boxes exploding, fire twigs and lightable torches.

As well as real pushing animations and box nudging!
Since ‘pushing’ was a major gameplay verb, I wanted to make sure we juiced it up to feel nice and tactile.

Check out a little montage here.

4 Likes

Hey friends,

It’s been a few months since we talked last.
The team worked really hard to get the trailer out at the end of February, and as is often the case with these sorts of things, you push hard one month and take it easy the next.

In saying that, we’ve done a lot since we last spoke, let me show you some of they systems work, design updates and sprinkles of flavour we’ve added.

Enjoy some gifs that show off what we’ve been up to.

Systems

For a long time, I’ve had the fear of the dark system designed on paper.
Now that we’re in chapter 2, it finally made its way to the top of the to-do list.

Stella is afraid of the dark and will be affected depending on how long she stays in it.

Her heart rate goes up, her vision becomes shaky, and it feels like the world is closing in on her.

Stay in the dark too long, and you will respawn at a checkpoint (Another new system we have).

So be careful to not venture too long out in the darkness. It could be scary out there!

Chapter 2 also forced us to make water work correctly.
It is no longer a solid; you can fall in now.
And you can push boxes in, you know, for puzzles.

Design

Lots of new design work has been done in the last few months.

In the lab, we finished animating all of the machine parts that let Dr Lumen and others work.

This has made a considerable jump since our last major devlog.

The beams are animated, and we now have some science stuff happening on the table.
I wonder what that might be for?

We had a bit of fun designing all the floors of the tower, hidden away in the woods.

And just like chapter 1, SO many of the objects are interactable.
We even went back and added new points of interest to the fishing village..

More puzzles and environments continue to be built out in the woods.
I would say that these are 80% done now.

Flavour

In milestone 2, I shared the book opening I had made.

It was rough, but the team was proud of it.

Well, Modem from the Playdate Squad Discord saw what I had made and asked me if he could redesign it.

It’s a pretty big glow-up if you ask me.

And here are a few odds and ends.

  • We now have sound effects for most of the objects, which helps bring the game to life.
  • A pivotal scene now has a farting emoji :dash:
  • We updated our font with some better kerning.
  • Every current level in the woods now has all its dark layer tiles
  • And we animated this simple little gate

Now, this post doesn’t tell the whole story.
We’ve been cooking on some secret stuff in the background.
Some we’ll share soon, some that you’ll need to wait a while longer for.

Please wishlist Comet on Catalog!

6 Likes

Hey Friends, Donald here!

Normally we wouldn’t have a blog post so soon after the last one but Will and I had some stories we wanted to share that were a bit too long to go elsewhere but we’re really proud of.

Enjoy!

Playtesting Comet

A few weeks ago I was invited to share Comet at the International Simulation & Gaming conference at the University of Canterbury as part of a local games exhibition.

I was initially hesitant to sign up. I wanted to have a few more systems in place which would really round out the Comet demo, so I was worried we wouldn’t have enough for people to care about.

We’ve had a few people playtest the game but I’ve never SEEN people play the game.
Our playtesters have sampled a slice of Comet remotely so I’ve been unable to see people’s faces react to what they’re playing.

Getting that kind of genuine unfiltered feedback can be invaluable so I decided that this could be a good opportunity for me/the project, took the afternoon off, and went along. You never know what might come of it!

Game Day

On the day of the event I went in with rock bottom expectations. Who knows how many people would be around or if they’d even care about our game.

I won’t speak for others on the project, but I’ve been working on this project for so long it’s now easy to ask the question “Have we made something that’s any good?”

While we’re working on features, I believe in them. They spark joy, and I think about future players encountering them. “This is fun, they’re going to love this!”

But over time it’s easy to let the doubt creep in, to forget about what made each element special. It’s like the game has a new baseline and you wonder again “Have we built something anyone will enjoy?”

I set up our station with Comet running in the simulator on a PC while the Playdate itself acted as a controller. I recorded the gameplay and had a webcam capture people’s faces so we could see their reactions.

Overall, the experience was a lot of fun, and people were overwhelmingly positive about Comet! I had to drag feedback out of them.

I was there for around 3.5 hours and I had people playing the game the entire time. I was shocked. When I visit events like this as an attendee I tend to spend 5-10 mins playing demos, I chat with the dev and then I move on. But players were locked in and only stopped once they got to the end of the demo area.

What Did People Think?

When I got back home, I pored over all the feedback given and sorted them into 4 categories:

Visuals
Everyone who played Comet or watched it being played were drawn in by the full experience. Many didn’t know what the Playdate was and wondered why it was in black and white, but they still noted that the game was easy to read and thought Stella’s animations were so much fun. They loved the emojis and felt the game was really cute.

Writing
People said they were really compelled to keep playing. They wanted to know more about the world and the town. They laughed at so much of the dialog (even some cheesy jokes). To see people read words I’ve seen a 100 times and start glowing was a real treat. Players appreciated the tight clear intro, and felt like they understood our plucky protagonist Stella and her wistful brother Mars.

Audio
Quite often, I play games without audio so I’m not closing myself off to the world entirely (part of the perks of fatherhood). Despite this, I’ve cared a lot about music and sound design to help bring the world of Comet to life. Focusing on details like your footsteps making different sounds based on the surface you’re running on.

People noticed all the little audio elements and told me they enjoyed the music.
So once again I want to thank Kyle "Tripletritone" McAuliffe for the music & Monster Logo Studios for our sound effects.

Here’s a clip of a player getting visibly affected by the ‘fear of the dark’ mechanic I talked about in the last blog post.

Design
When it came to design, I was worried Chapter 1 might be too boring. The opening chapter has a heavy focus on exploration, talking to people and getting immersed in the fishing village of Cliffside Crescent.

There were a few times I thought people were lost or might be getting frustrated but they all said they felt fine and were enjoying poking around the town.

We have about a dozen puzzles in Cliffside Crescent. Many optional, and many felt really simple to me, so I was surprised to see a few people struggle.

One puzzle requires you to push a box into a hole to cross a gap, and one player pushed the box right next to the hole… then walked away.

At the end of the demo, I asked about it and they said “I’ve never played a game with systems like this before, but I felt it was optional so I was okay to come back to it.” And they did just that. After moving through an area later in the demo, they had learned all the skills they needed, then came back and aced it.

Learnings

It wasn’t all wonderful though. I learned a lot about some important encounters. Some issues we anticipated, others we didn’t, and some flat out failures.

It’s also worth noting that none of these players had ever held a Playdate before, they didn’t know about the menu button meaning they missed the information we present on the menu screen. In fact, one player never even thought about turning the crank in the opposite direction. It’s really helpful to see people point out these blindspots.

Lots of feedback for change, and I have to imagine that people were being kind, speaking face-to-face with a developer. That’s human nature.

Now that we’ve broken the in-person testing seal, it’s time to start letting more people play. My local game dev scene has a monthly playtesting day so I think I’ll start coming along to those.

Thanks for reading, now I’ll throw over to Will to talk about a cool character we made for Chapter 2.


There’s a lot of really useful feedback we’ve already started to implement from the event, but the entire team were super happy to hear about the positive reception Comet received. And as the lead narrative designer I was particularly happy to hear that people liked the writing (and cheesy jokes)!

As Donald mentioned, it’s easy to question whether your work’s any good when you’ve been working on a project for a while, so the positive feedback was very welcome.

A lot of work has gone into the narrative and the entirety of Team Comet has played a part in putting Stella’s story together.

In this part of the blog, I want to break down an important piece of that narrative work for you; characters.

Character Creator

Throughout Comet you’ll meet a whole host of characters who will affect the story, and Stella, in various ways.

One of those characters is Dr. Lumen, a nurturing scientist whose innate curiosity and thirst for knowledge sometimes ironically leaves her oblivious of the obvious.

“But Will, why focus on Dr. Lumen?”

That’s a great question, fictional reader who helps me get my point across. I’m focusing on Dr. Lumen because she’s a pivotal character in the story and the team’s all chipped-in to bring her to life.

I want to use Dr. Lumen to dive into how we craft characters in Comet.

Brainstorm

Like many aspects of game development Dr. Lumen’s life began as a faint outline of an idea, which then snowballed and grew into a fully-fledged character.

Team Comet had a group call where Donald pitched the outline for chapter 2 and the team got talking; “Could we add [REDACTED]?” “We could use that to [REDACTED]” “Then Stella can [REDACTED].”

A very serious Team Comet brainstorm meeting, featuring Mischka the dog

Without revealing too much of the plot, we needed Stella’s journey to involve some self-discovery while in the woods. We could’ve solely used game mechanics or monologues or even a whole village of characters, but we decided on a mentor-figure who could act as a sounding board for Stella - so she had the space to grow on her own in Chapter 2’s large map, but she also had someone to allow her to reflect on the growth she was undergoing when she returned to the hub area.

Who is Dr. Lumen?

After we’d decided on a mentor-figure we needed to figure out who that mentor figure was going to be. Ideas had been percolating in my head since our group discussion, but Donald helped unfurl my thoughts with a bit of a personality quiz.

He asked me questions like:

  • “Why is she in the woods?”

  • “What’s she working on?”

  • “What does she know?”

  • “What doesn’t she know?”

  • “What’s her Myers Briggs type?”

  • “How’s she feeling when we meet her?”

These questions formed the skeleton that allowed me to add the muscles and nerves and organs (if you’ll excuse the odd metaphor).

After that, it was time to give Dr. Lumen a look.

Designing the Doctor

There are two visual aspects to each character in Comet: the in-world sprite, and the dialogue portrait.

Sprites for Philip and Stacy at the top, and their corresponding character portraits below them

As you might know PlayDate has a screen resolution of 400 x 240 pixels, but because Comet began life in the Pulp engine (and because of a few other miscellaneous factors) the game runs at half resolution meaning we’ve only got a resolution of 200 x 120 to play with.

Match that with the fact that our character sprites are around 20 pixels tall and portraits are 12 pixels wide, and that’s a recipe for technical limitations.

Luckily, we’ve got a super talented team and great collaborators to help work through the complications. We went through several rounds of feedback and iterations but I think we landed on a great final design. What do you think?

Our artistic collaborators Steph and Meadow worked with myself and Donald on Dr. Lumen’s portraits:

The early concept sketches of Dr. Lumen looked great! But they were a bit more exuberant/bubbly than the personality we settled on

Trying out a few different hairstyles for the portrait

Et voila, our in-game portraits for Dr. Lumen

Our lead artist Maria, Donald, and myself came together to bring her sprites to life:

The starting point for the lab coat-laden scientist

Then we took her glasses shopping

And added a spring to her step!

What’s in a Word?

While her design was being iterated, Dr. Lumen needed something else to bring her to life; a voice. I knew what kind of character she was in isolation, but how she’d talk and react and treat Stella had to be planned and written out.

How would she introduce herself? Why would she help Stella? How/why would she help Stella realise [REDACTED]?...

I hate to leave you hanging, but to know the answer to those questions you’ll have to stay tuned and play Comet to get a look at Dr. Lumen’s dialogue (please don’t hate me).

See you in the next blog!

3 Likes

Hey guys, Donald here.

Over the last two months, Comet has made some incredible progress in both game design & tech.
In this dev log I want to finally talk to you about some cool stuff we’ve been working on:

  • A peak at Chapter 2’s main light-based puzzle mechanics
  • Our new crank-to-undo system
  • Some amazing tech upgrades that let us make the game look and feel even better

It’s been so energizing to see some of our oldest and thorniest outstanding tasks on our to-do list get nailed, and then some.

But how were we able to make so much progress in such a short time?

Long-time readers will know that Drew Loebach, our Programming Lead, has been helping me out since February 2022 when I started making Comet in Pulp.

Drew has been a great friend who has saved Comet more than once now, and recently Drew had a fantastic idea for a little side project he wanted to work on (I’ll leave the reveal to him).

Comet is a passion project for all of us in Team Comet. Everyone on the team is stealing away time from our busy lives to work on the project. So when life stuff comes up, we encourage each other to take it easy. This might be frustrating to you if you’re reading this and waiting for the game to be done (Or if you’re my wife :sweat_smile:) but it’s what’s kept this project going.

Drew has impressive design skills and has put them to work in other side quests like his Playdate game Jolly Chimp Champ which came out earlier this year.

So when Drew mentioned his exciting new idea, I checked in with him to see if we can continue to make progress on Comet. Were there other ways I could help support some of the programming tasks in the Comet backlog? Drew felt confident that he could get through most of them quite easily except for one: the wigglers. They were an exciting new mechanic for Chapter 2 but they’re REALLY complicated.

I like to problem-solve and floated the idea that maybe I could ask someone from the Playdate Squad Community to help us with the wigglers and a crank-to-do system, which would free Drew up to work on more exciting things. He thought that was a wonderful idea.

Energized with a way I could push Comet forward, I went to work on writing up requirements and sharing them with the community. THAT NIGHT, not but a few hours later, Jan said he would be happy to help us out and by the next day it was clear that he was the best person for the job.

You might think I was too quick to make that decision, but sometimes you feel it. Sometimes, you gotta bounce…. on these opportunities.

Jan, aka Mouflon Cloud, had JUST finished work on Kye, a port of an old Windows 3.1 puzzle game (which Playdate friend gingerbeardman also worked on).

What’s notable here is that this version of Kye has a CRANK-TO-UNDO SYSTEM (we needed one of those!)

Jan had a proven track record for releasing games and has been a staple member of the community for as long as I’ve been around. And I’ll tell you what, we couldn’t have been luckier getting to work with Jan. And the timing was perfect for him to be distracted by a little side quest.

With that set up, let's get into all the things we’ve been working on.

In the Spotlight

In our Milestone 4 post, I say the following…

When you pull back and look at Comet as a whole, the Core Mechanic that the game was formed around was: using the crank to control the lamp.

The secondary mechanic was: Sokoban puzzles (think of puzzles in games like Chip’s Challenge).

Our core mechanic has always been about interactive dialogue and manipulating the world with the light from your lamp, which is controlled by the crank of the Playdate.

You’d be forgiven for not believing me up until now. Most of what we’ve shown up to this point has focused on the systems that were needed for Chapter 1. But now, the first set of unique light mechanics are in the game for us to test and tweak.

The Wigglers

These little guys are something I've had in my mind for well over a year now. Perhaps as far back as the Lua reboot of Comet.

Since we were focused on getting Chapter 1 built, I didn’t talk about them with the team but they often wiggled their way into my mind when I worried about the game being fun.

The wigglers are a set of little creatures who, like Stella, are afraid of the dark but once they’re brought into the light they’re keen to find something to eat.

It's your job to get them to a tasty bush safely. To do that, you need to set up a path with your light which they can navigate around the edge of.

In their most basic form, the bushes are locks that block your progress, and the wigglers are your key.

I thought this could be an area of design with a lot of synergy with the systems we already had.

  • Resizing the lamp.
  • Changing the environment with our sokoban tool

About 11 months ago, I wanted to lock down the logic for the wigglers and design a set of rules that were easy for players to understand, and possible for us to program.

I had the crux of the idea but I wasn’t exactly sure how to prevent the player from just getting the wigglers stuck in their own light bubble and moving with them.

Inspired by Strupf / Lukas I decided to do some public brainstorming.

It’s often so helpful just to have a sounding board. Maybe I should get a rubber duck.

With help from our community I landed on the following:

  1. Wigglers live in a hole, and one has its head poking out. Just chilling.
  2. When that wiggler is within an unmoving light source, it pops out and all the wigglers travels around the light source clockwise.
  3. If the player gets within a tile of a wiggler, it runs off. If it’s in the hole, its head hides. If it’s out of the hole, it just runs into the darkness.
  4. If the player moves a light source that the wiggler is in, it also runs away.

Soon after, I wanted to find some visual references for the wigglers. I had the idea that each wiggler would be its own independent creature but they would act as a group. I knew I’d seen something like that before but couldn’t quite place the reference, so once again I asked for some help.

Falinks from Pokemon was what I was looking for!

With the logic in place, I spent most of the New Year’s break designing all the wiggler puzzles in chapter 2 and writing up some detailed design docs for the team.

Then Maria tested out a bunch of designs. We wanted to pack a lot of character into a small amount of pixels.

And as you can see, Maria excels at that!

Drew then got started on the logic

It's clear that there are many complex factors to consider.

Drew had really only scratched the surface of building out the wigglers before Jan came in and gave us a hand.

Maria finalized the design of the last few elements. Here we have our wiggler hole & bush eating animations.

Jan understood the vision for the wigglers perfectly. He helped refine their implementation to make the rules more understandable for players and in turn, more fun

Let's show off a few other examples

The wigglers will scatter when you spook them

And If they ever get broken up, they slowly realize and start to panic!

Oh yea, and those levels I designed at the start of the year? They basically worked as I intended! I’ve certainly had to make some tweaks, and no doubt I’ll make more, but how cool is that?

Now we don’t wanna give everything away but here are a couple of gifs of some other creatures you’ll encounter in Chapter 2.

Ctrl+Z Crank

When Comet got rebooted in Lua, we started using Github to manage the project.
I knew at that time that an undo system was kind of a must-have for sokoban style games.

‘Crank To Undo’ was issue #16 (now we’re up to issue #261!) but it has always been put aside. Because it’s a tricky system to build.

There’s a lot to think about:

  • Which actions are recorded?
  • How many actions can we store in allocated memory?
  • How do we capture multiple actions at once or chain reactions?
  • Can we design this in a way that doesn’t impact performance?
  • How do we teach the player?

Jan had all of these front-of-mind and knocked it out of the park.
We actually have…. unlimited steps recorded? And the game doesn’t miss a beat!

This will have a huge impact on everyone who plays the game. Needing to reset an entire puzzle when you make a simple mistake is just too painful.


Click here If you wanna hear the fun audio feedback we added to this.

Speed of Light

As Jan started working on the crank-to-undo feature, I offhandedly mentioned that he might need to do some optimisations to get the game running well with the new systems he was about to build.
crack knuckles
That was all he needed to hear. Jan went on to change foundational systems which dramatically transformed the experience of playing the game.

Some changes had huge gains of about 30% improvement to CPU & memory usage from about 3 hours of work, other changes took about a week for only 3% or 4% improvement.

But once all is said and done, the experience is night and day.
Here’s a demo of a build from June and a build from this week which shows you just how much better it is.

Performance Enhancing

The game now loads new rooms almost as fast as playing in the PC simulator, and due to some major reconstructive surgery, our largest, most complicated rooms now look WAY better and run at smooooooth framerates.

Let’s dig into what we did:

Collision Clash

Every time something moved in Comet, every object would look at every other object and check if something should happen. As you can imagine, most of these checks don’t matter.
A Bear is never going to read a sign (literally and figuratively).

So we now have collision groups that limit what is being checked.

Entity/Class Collision Group Collides With
Player PLAYER Obstacles, Lantern, Triggers, Stairs, Buttons, Holes, Collectables, NPCs, Boxes, Animals, Signs, Burnables
Box BOXES Obstacles, Holes, Buttons, Boxes

For example, the player entity needs to check if it’s colliding with a bird, but boxes don’t need to bother.

Instead of creating a sprite for every static obstacle in the game, we now use a few collision tilemaps for the most frequent static tiles: water tiles and fixed obstacles. Instead of checking 150 trees, stones and cliffs for collision with the player and other moving sprites, we check just once with a map that checks if the specific tile the player (or box, wiggler etc.) wants to enter is accessible or not. In some levels, this cut down 50–70% of sprites and more than 10% of cpu calculations.

Squishing Layers
As you guys might know, we use LDtk as our level editor. Up to this point, we’ve been using Nic Magnier’s LDtk Importer for Playdate to take the 14 layers of tiles we use to design our rooms, and render them in game.

This worked well for the most part but on larger levels, with a lot of entities, we’ve had to limit the scope of our ideas if we wanted the game to run well.

In fact, the fishing village in Chapter 1 got cut in two a few months back due to issues with loading speeds & framerate.

But there’s a better way!

Expanding on the ‘fast loader’ feature Nic already created when we run the game in the simulator, we now pre-render & crunch a bunch of layers down into a single large image for each room. This was a massive win!

We also created simple tilemaps for obstacles and water, saving a lot of sprites, which saves a lot of collision checks and makes the levels load faster. We generate them (and calculate the collision maps mentioned above) when building the game so it’s ready when needed in game without slowing down the game itself.

Caching In

Caching image tables and images to prevent multiple loads of the same file (and additional logic for keeping the previous level assets in memory).
This is seen well in the video above. Returning to a room that’s still in memory now loads in less than a second. Rather than 7 or 8 seconds.

Loading…

By default LDtk Levels are loaded all together from the core LDtk file. In our case, the complete set of levels was permanently taking about 7 MB of Playdate’s precious memory. That’s almost half of it and that’s just the static level data, so the game was running pretty close to the 16 MB limit all the time. This made larger file loads dangerous because of possible memory overflow, and also made garbage collection run very hot, checking all that data all the time.

But LDtk has an option to save levels to separate files and the importer respects that. Now, when we walk into the fishing village, the engine only loads that 73 KB room on the fly which keeps our memory usage low.

Jan also customized our garbage collection, the system that removes objects in memory that aren’t needed anymore. Now that our memory usage is a lot lower, we can tell it to relax. Now it runs for 1 millisecond when the load is low, and only ramps up when memory use is above 50%.

Burn Bright

With the new performance gains we’ve been afforded, we’ve upgraded our visuals a bit too.

For a long time now, people have been asking why our lights haven’t been animated. Well now they are!

We also went in and animated all of our rivers and lakes in Chapter 2.

This was actually a very manual process of exporting auto-tile data as PNG images, then hand-placing our water animations for 24 different rooms and rendering them out as single large sprite sheets to be rendered in-game. It was mostly a lot of busy-work but I’m really happy with the results.

Example of exported autotile data.
Example of exported autotile data, or abstract art?

And finally, we made it so you can see the burning bushes on the dark layer of the tilemap.

DevOps

I’ll also give you a look at a couple of behind-the-scenes changes of the really nerdy stuff that helps us during development. Things you might not see/experience in-game, but help us make Comet more efficiently.

Automated Builds

Now this is pretty clever.

After helping us out for a while, Jan set up our GitHub instance to automate our builds using Github Actions.

Before all of this work, if we wanted to make a build and test it on device, we would:

  1. Save our changes
  2. Compile the game
  3. Run the game in the simulator
  4. Copy the full folder of LDtk Lua level files from the Sim’s data folder to the source the level folder.
  5. Compile again.

As you can imagine, this gets to be a pain in the butt.
Drew and I both had some shortcuts to make this easier, but it was never fully automated.

Jan developed a system where Github would do steps 2-5 all in the cloud.
The virtual computer builds the game, then runs the Simulator twice in a headless mode (without a display or a sound card) and then publishes the zipped result.

It took an afternoon filled with dead ends and small breakthroughs because the Simulator isn’t designed for that sort of thing so a lot of stuff needed tweaking.

So awesome, we have a good history of builds but the process of sending the game to the Playdate still took a LOOOOONG time.

It turns out most of Comet’s 50 mb file size is music. So Jan added some parameters to the automated build process so it spits out 3 files:

  1. A full dev build as we’ve always used
  2. A mini build that strips out the music
  3. A release-style build that removes unused assets like raw LDtk files.

That mini-build is now down to 3 MB! So much nicer to test with.

Before release, we’ll review our options to compress the size of these files down to ease the load for players installing the game.

Now, when we’re finished working on Comet for the day, the team pushes the change to Github and a few mins later, the change log and build links are posted to the development discord server for everyone to enjoy! (Thanks IFTTT)

Visible Build Numbers

With so many changes going on in the code over the last few months, there has been a lot of testing going on. When bugs come up is it in the main branch of GitHub? The undo branch? The wiggler branch? It can be confusing. So we added the build number to the main menu screen, making it easy to track versions.

In our next blog post, we should have hit our Chapter 2 alpha milestone.

Which means the logic will all be in place and we’ll be able to play through Chapter 1-2 end to end! :crossed_fingers:

Thanks for reading, and don’t forget to wishlist Comet on Catalog!

:wave:

6 Likes

Awesome update!

I can see so many similarities with what Jan did for Kye. My role on that game was graphics, game design, ideas and suggestions (easy), music, and support programming.

I reckon.Jan has earned his place on the Team Comet credit screen.

I was wondering if the optimizations to the LDtk importer can be implemented in he LDtk importer library? So that way we all benefit from your work. It's not required but it would be amazing. Same with the GitHub actions?