Camera work


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.

<several weeks later>



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!

Get Comet

Comments

Log in with itch.io to leave a comment.

(+2)

Always a pleasure to read about Comet. The camera looks great now!

(+1)

Thanks for sharing this. I’m playing with the PlayDate myself for a game that has similar things to think about so I very much appreciate your perspectives. Can’t wait to play this. 😁

(+2)

Really nice dev-log. The extra effort is well worth it; the game is looking fantastic!

(+3)

so gorgeous! incredible work