Skip to content

Event based system#38

Merged
Tylermarques merged 24 commits intoGoodStartLabs:mainfrom
Tylermarques:main
Jun 19, 2025
Merged

Event based system#38
Tylermarques merged 24 commits intoGoodStartLabs:mainfrom
Tylermarques:main

Conversation

@Tylermarques
Copy link
Collaborator

We've now got a central eventQueue.events array that holds all of the things that should be happening in a given game. Doing this instead of setTimeouts everywhere. It's a work in progress, but it displays the games properly.

Reintroducing the fix for the bug in tween.js (issue 677) that causes
the map to jump at the end of the tween.

Leaderboard name was used twice in the code base, once for the modal at
the beginning of games, and also for the rotating display in the bottom
left. I've removed the modal at the beggining of the game as its data is
stale and not updated yet. I've renamed the bottom left to
'rotatingDisplay' and the bottom right to 'leaderboard'.
The stream should be a 1080p display, so we'll focus on that style for
the moment.
The display wasn't rotating, and the diplomatic relations always doubled
when first starting a game. Fixed both bugs.
The SVG paths weren't getting added to the chart. Should be fixed and
does work in later phases.
I believe this is a working version where we move to the next game after
a delay in the endgame modal. I still need to write tests for all of
this.
Updating some typing errors, removing ports in docker-compose that
weren't used but were stopping others from using them.
There is logic littered all over the place. We don't have some central
way of determining order for operations and it's driving me insane. This
needs a refactoring so we have a central way to control the order of
operations here.
Reintroducing the fix for the bug in tween.js (issue 677) that causes
the map to jump at the end of the tween.

Leaderboard name was used twice in the code base, once for the modal at
the beginning of games, and also for the rotating display in the bottom
left. I've removed the modal at the beggining of the game as its data is
stale and not updated yet. I've renamed the bottom left to
'rotatingDisplay' and the bottom right to 'leaderboard'.
The stream should be a 1080p display, so we'll focus on that style for
the moment.
The display wasn't rotating, and the diplomatic relations always doubled
when first starting a game. Fixed both bugs.
The SVG paths weren't getting added to the chart. Should be fixed and
does work in later phases.
I believe this is a working version where we move to the next game after
a delay in the endgame modal. I still need to write tests for all of
this.
Updating some typing errors, removing ports in docker-compose that
weren't used but were stopping others from using them.
There is logic littered all over the place. We don't have some central
way of determining order for operations and it's driving me insane. This
needs a refactoring so we have a central way to control the order of
operations here.
This is a lot of Claude having at the code base, there is no human
review here yet. That is to come.
The bottom newsbar still needs conversion, as do numerous other pieces,
but we're working our way there. Attempting adding some tests with
Claude, but they aren't functioning yet, making them effectively
useless. Continuing to iterate.
We've mostly got this working. Events get executed in the array of
events. We don't use setTimeout anymore thankfully. I'm not in love with
this system, it still isn't straight forward about what events happen
where, but I do at least now have an ability to better control the flow.
Had a bug where we'd do down a path that didn't result in calling the
nextPhase, meaning we'd end up with zero events in the queue and then
just sit there. Wasn't great.
Was calling the onMessageComplete function twice, fixed that
@Tylermarques Tylermarques merged commit f1a80c5 into GoodStartLabs:main Jun 19, 2025
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant