Dev Blog | Comet

This was good stuff! Worth a watch.

I've mostly been fixing up bug lately and it's been REALLY fun!

Two main themes

  1. Splitting up the state of the player so I can turn player sprite elements off and on at different times.
    Update bugs

  2. Implementing my own metadata system
    Having a sprite that is two tiles means you run into a lot of edge cases where things look wrong. When you want to hide the player so it looks like they are behind a wall.

And then i'm wanting to place down a lamp in the world. But I don't want to place it if...
~the light level is 0 (Then the player can loose it)
~if the location you're placing it is solid
~if the location you're placing the lamp is "behind" something (As it would replace the tile)

The only meta data tiles have is solid or not. You can't define a tile as above.

I was planning to simply list many if statements for each "above" tile but @orkn had a better idea. So all credit to him on this one.

Orkn's Metadata system

"So if the solid function didn't exist, and we wanted some way of knowing if a tile is "solid" or not, and we wanted to check if a tile is solid or not in multiple places around our project, we might decide to make our own version of the solid function. In the game script we add:

on isTileSolid do
  if tile=="white" then
    tileIsSolid = 0
  elseif tile=="black" then
    tileIsSolid = 1
  end
end

and we can keep adding elseifs for every tile in our game. (As a potential optimisation we realise we could start the event with tileIsSolid = 0 and then only add ifs for those tiles that are solid, but maybe we appreciate the explicit list of all tiles as it makes changing the metadata easier, idk!) Then wherever in our code we want to check if a tile is solid, we do this:

tile = name x,y
tell event.game to
  call "isTileSolid"
end
myTileIsSolid = tileIsSolid

and that is functionally equivalent to the actually built-in

myTileIsSolid = solid x,y

The isTileSolid event is effectively a function with an input tile and an output tileIsSolid , it's just Pulpscript doesn't support event arguments and return values so we just have to be careful juggling global variables. The solid function does exist, so this isn't necessary, but if we want to add new kinds of "metadata" to tiles, like their "aboveness" in this case, then you could take this approach."

I took that and made the following.
In game I have

on isTileAbove do
	tileIsAbove = "false"
	if aboveTarget=="roof top" then
		tileIsAbove = "true"
	elseif tile=="other" then
		// tileIsAbove = "true"
	end
end

And in my on cancel event which I use tileIsAbove for checking if the player can place the lamp

Above

Place lamp code
on cancel do
	
	if lampHeld=="true" then // holding the lamp | There's zero lamps on the screen
		lampTargetX = event.px
		lampTargetY = event.py
		
		if playerLastMove=="L" then
			lampTargetX--
		elseif playerLastMove=="R" then
			lampTargetX++
		elseif playerLastMove=="U" then
			lampTargetY--
		elseif playerLastMove=="D" then
			lampTargetY++
		end
		
		lampTarget = name lampTargetX,lampTargetY
		lampTargetSolid = solid lampTargetX,lampTargetY
		aboveTarget = lampTarget
		tell event.game to
			call "isTileAbove"
		end
		
		if lightRadius>0 then
			if lampTargetSolid==0 then
				if tileIsAbove=="false" then
					tell lampTargetX,lampTargetY to
						swap "Lamp"
						lampHeld = "false" // not holding the lamp
						lampRoom = event.room
						
						if illumination=="dark" then
							// re-illuminate the room so that the radius now centers around the lamp instead of the player
							emit "darken_tile"
							tell event.game to
								call "darken_room"
								call "illuminate_tiles"
							end
						end
						
					end
				elseif tileIsAbove=="true" then
				  sound "prohibited"
					say "Can't Place lamp behind things" at 1,10,21,3
				end
			elseif lampTargetSolid==1 then
				sound "prohibited"
			end
		elseif lightRadius==0 then
			sound "prohibited"
			say "I don't want to lose this lamp in the darkness" at 1,10,21,3
		end
	end
end
3 Likes

Been doing lots of bug fixes since I last updated everyone.

Two big changes tho.

The first is a static light system.
This was needed for the start of the game before the player has a lamp.
The second is a new pretty light system where we round the corner off on the lamp.

That raised the challenge of the pretty static corners and the player's pretty lamp corners overlapping.
Something like this...

Well with the help of @Drew-Lo we were able to make a system that worked!
playdate-20220627-204721

2 Likes

The heartrate: XX is supposed to trigger a game-over if it gets too high? Maybe make it only count up from 60? With heartrate: 00 you'll be just as dead as you would be with heartrate: 300 :wink:

1 Like

Oh yea this system is just a debug state right now.
I'll have some sort of UI to represent it eventually.

1 Like

Long time no see people.

Not so long ago, I got my Playdate.


And unfortunately, Comet didn't run so hot.

I thought Pulp Mill might be able to save it, but unfortunately, it was too buggy.
Some bugs were understandable, like not knowing about new Pulp functions.
Others were odd like north and south exits working but east and west cause a crash!?

I felt pretty low about the whole thing, but both @Drew-Lo & @Jongjungbu came in to support me.
They helped refactor which tiles were being addressed when updating lighting, moved lots of logic out of my draw event :sweat: and advised on how I should be drawing Stella.

Performance improved but it still wasn't great.
17-20 FPS when standing still at night, 15 FPS when walking, 4.5 when cranking to change the light level.
We tested removing more of the UI but the result was the same.
And we think we could have improved how we handled cranking but even then, basic movement within the game would feel bad.
The frame based method to create my ring of light was still too much for Pulp.
It was clear that even stripped back, Comet wasn't going to work on in Pulp.

Now is a good time to say, that throughout my learning journey this year, @Drew-Lo has been endlessly kind, engaged and supportive of everything I've been doing. Comet-P (My ongoing name for the Pulp build of Comet) would be next to nothing without him.
I for sure had major help from people like @stepepson but there wouldn't have been a project for anyone to jump on to if it wasn't for the steady support of Drew. Both technical or otherwise.

So where did that leave me? @ncarson9, @Jongjungbu and I had a little Pulp crew huddle and I was sharing what was going on. And for some unknown reason, @Jongjungbu said that when he finished Castle Helios, he'd think about helping me bring Comet to the SDK.

Some time passed and then we started getting into it.
And that's where we are.
Now @Jongjungbu, @stepepson, Will & I are working together to make this lil game.

Progress is going well. We're working towards matching Comet-P's feature set, then moving into new area and elements.

We have smooth movement.
playdate-20220913-094238

A true dark layer mask with our intended shape. (Blocky circle vs square with rounded corners)
stephversion

LDtk integration & larger maps (Although in testing, not this large but much larger than Pulp.)

We now have some lamp placing action
playdate-20220915-121318

And now animated tiles.
playdate-20220916-135235

This represents a lot of work by @Jongjungbu in a relatively short period of time. So big shout out to him.

16 Likes

So happy for you that you can continue this project! The community here and on discord is so wholesome

4 Likes

If you're not in the Playdate Squad discord, come check it out.

2 Likes

Looks really cool! Pulp 2x2 retro res + full SDK effects!

1 Like

Do we think this could turn into the record for longest devlog? Or maybe @orkn has that record cause the Resonant Tale is mighty massive :grin:

1 Like

It's really cool to see how much this has developed - now in the full SDK! Could there be a better using-pulp-to-get-into-dev story than that!

3 Likes

Great devlog! Thanks for sharing your effort and setbacks. I look forward to playing Comet when the game is out and when I have my Playdate

1 Like

Loved reading all of this and following the journey. So cool to see people coming together like this to bring it to life. I'm here mostly lurking, but hope to try developing something simple at some point soon in pulp

1 Like

Just scrolled through this thread after seeing you around lots of other threads I was reading, and this is some seriously amazing stuff! All the sprites look amazing. Such a cool concept, and cannot wait to see it come to fruition! :slight_smile:

1 Like

Oh thanks. It feels like I've been stuck on Chapter 1 for SOOO long :sweat_smile:.
We're making some good progress now that lots of our systems are in place.

Hope to share some more info and details soon enough.

1 Like

Small update to share what I've been working on.

Over the past few weeks I've been able to get a lot of time to work on tile art and I think It's going well.
At least in adapting from references, I'm getting a lot better.


Buildings

When I started making Comet I used an asset pack on itch that was made for Pulp where the tiles were 8x8.
At the time I didn't think I could get very good looking buildings so I felt they were good enough.
This building for example was flat but it did the job.
image

Many of the assets from the pulp build of Comet got adapted for the SDK build just so we could get it off the ground.

Now on the SDK, I have layers and 10x10 tiles. (And much better tile management to boot)
So I felt like I could come back to and see what could be done to make them look better.

First I started working on new roofs.



Which turned out really well I think.

Then these little triangle sections so I could square them off and use my current building fronts.

All of this looked good in isolation but when attached to a building felt really busy.
image
image

So with some feedback from the team, I started trying to design some building fronts that were more plain.

I think these look great but at this stage they're unique for each width (8-4).

These will be iterated on again in the future but for now they work


Some minor world tile tweaks

Cliff shadows

Before & after

Parts of the map that didn't make logical sense so I've worked to fix them up.

Land heights

Before & after


Likely not noticed by the player but it keeps things consistent world.

Cliffs connections

imageimage

Special transition between tiles
As I build out new areas I'm trying to balance using the tiles I have vs making new ones.
But in this area here I needed to merge how corners blended in with the wider cliff face.

All in all, things are looking a lot better.

Just wait until you see the new sprites!

11 Likes

That's looking fantastic!

Meet the new and improved Stella!
Stella_Idle

Created by our new artist Maria @toahiddenplace.

Development on Comet continues slowly but some exciting stuff is coming together. Drew (@Drew_Loe), Will (@FlipDock) and I are stoked to work with someone as talented Maria. I'm lucky that Team Comet is a diverse mix of people from around with world.

Idle

Check out Maria's ArtStation

8 Likes

Stella looking stellar!

Some more updates

Stella_walking
playdate-20230426-172537

I love Stella's walking animations here.
Normally this is only used in cut scenes and indoors but I used it outside for this gif.

This gif represents work from all of the team coming together recently. @FlipDock's great writing (Not really given time to shine in that gif) @Drew_Loe's great systems work. & @toahiddenplace's top notch sprite work.

You can also see an emoji system that we've been working on.

We have 30 different animated bubbles and grow in and out
These can be used in dialog on Stella or the target. (Think NPC or dog)
Group

There are also looping versions of these which can be set on objects or NPCs.

They disappear the moment you interact.
dot_dot_dot

Here's how the NPC entity looks in Level Design Tool Kit right now.

I just love using ldtk.io Thanks @Nic for making the importer.

Hope to have more to share soon.

Thanks for reading :smiling_face_with_three_hearts:

5 Likes