Skip to main content

Day 09 Cosmic Horrors Jam

·677 words·4 mins

5:30

Can’t sleep so might as well code.

Awesome to have Tim back. He loaded up the project on Github and applied some lighting and fog effects. What a difference it makes!

7:07

Just tried out Godscrown by Caaz. Gorgeous art. Very smooth tutorial and gameplay. Beautiful stuff. https://caaz.itch.io/godscrown

Then I noticed his website. He’s got a document for his jam game and I think it’s being updated on the fly! https://caaz.me/game-ideas/cosmic-horrors-jam-4/

His homepage says he’s running a pipeline from Obsidian to Hugo. Not too different from what I’ve got but he’s completely automated it vs. mine I need to run a script and tweak some images.

Inspiring!

But also distracting. I need to get back to work.

I’ve got spirals appearing on the door to the big bad. Now I just gotta redirect the player when they enter.

I refactored a bit because the room code was getting pretty hairy. Now it’ll be a little more manageable as I add the new big bad functionality.

11:54

Ran into a problem because of the order of init() and ready() being called. From now on I’m changing init() to setup() to get rid of confusion with _init() . I’m also gonna have setup return self so I can instantiate like this:

var instance: Thing = thing_scene.instantiate().setup(important_var)

12:07

Phew! Finally!

I had problems, too, because I was adding event listeners and those events we’re firing in _ready() so that means I needed to ensure those listeners were in place before calling add_child(). I think I get it now. I should probably write it on the whiteboard or in a flash card as a reminder.

Glad that is sorted.

Spirals!

This is the big bad room. Pretty silly for now but it’ll get some treatment.

16:43

Okay, I’m doing this wrong. I just coded up a state machine for the music manager and walked around and it’s not doing what I want. I don’t know exactly what I want but it’s not that.

So what do I want?

Walking around normally, play explore track.

If player walks into a room with the enemy, fadeout the explore track and do the chase tracks. The chase tracks are working well.

If the player manages to lose the enemy then wait “for a little while” and then play the explore track again.

If the player walks into a room with the signs, play the signs track. If they enter, then keep playing the signs and start playing the big bad track. If they leave then fadeout the big bad track. If they leave the signs room then fadeout the signs track.

If the player is being chased and they enter the signs room—yeah, see? It’s like I need to define every combination of states. It’s not enough to just stop the previous song and play the new song when the state changes. Some of them layer and others do not.

If the player is being chased and they enter the signs room I actually don’t know. Maybe lower the volume on the chase tracks and play the signs track?

If the player is being chased and they enter the big bad room the chase is over.

if thesigns and bigbad
	makesurebothtracksareplaying
	stopothertracks

if thesigns
	makesurethesigns is playing

	if there's a chase
		make sure the chase tracks are playing
		volume down on the chase tracks

if story
	make sure story is playing
	stop other tracks

if menu make sure menu is playing
	stop other tracks

if game over who knows yet

19:15

Okay, I think I’ve got the music to a place I like. I also added a delay before the explore music starts up, just gives it a better balance to let the ambiance play out there. Great call from Tim to have a separate ambiance track that basically plays all the time.

Man there is a lot to do and time is slipping away.

20:12

I got a start on the endgame door. I better be really careful with my time going forward but rest is important, too. Calling it a night.