Main Dev - trigger update

29. June 2025

Hi!
Already a new little update to this chaos!
I got rid of the dialogueBox class and threw out the AudioTrigger and DialogueTrigger to combine the logic into one single DialogueAndAudioTrigger which can handle either one of them or both at the same time.
While I was at it, I put in a little counter to be able to play the Dialogue and Audio in loop if I want to.
In addition I now pause the game loop when a Trigger is active...

Anyway, I'm quite happy with how this turned out.
Next update will be after I cleaned up the code a fair bit and added a tile map or two.

Main Dev and a smal goal

So I just renamed some files and added the Main Dev where I try to make a little turn based RPG.
Probably already have overcomplicated a lot of things with the Collider, Level, Dialogue and Trigger classes... oh well ;)

The fun thing is, that it somehow works. Although I am having some issues now with making sure the dialogue is displayed one after the other and not all at once from an Array.
But I am sure there is a simple solution for it somewhere in my head, just need to pull it out.

Once I have that under controll I'm going to add a little bit of graphics to it to make it look a bit nicer.
For that I wanted to buy something on itch.io but forgot about it and now I can't find the pack anymore, like it never existed.
So sad!

Local Storage Save location

Added a test for using Local Storage on the Currently working on page.
It is fairly simple. I just took the movement code from the Render Tiles & Movement and added the Player Object to local Storage with localStorage.setItem("Player", JSON.stringify(player));.
Then with a simple press of a button on the keyboard I can update the Player in Local Storage.
To render the saved X and Y position I loaded the Local Storage Object into a variable with JSON.parse(localStorage.getItem("Player"));
Quite easy!

Rect Collision

Added a test for Collision on the Currently working on page.
It is a bit of a mess, and probably not that performant when it comes to an actual usecase. Especially since I want to use it for a tile based system. But oh well.
That is something I have to look into at a later date ;)

New Homepage Style

I am learning a lot about CSS and HTML at the moment.
Wrapping my head around stuff like "justify-content", the order of operation and how it all interacts with one another is quite confusing.
That is why I am verry gratefull for the ability to inspect websites to see how others have done it as well as online resources like Stack Overflow and W3Schools

Milk