Pages

▼

Nov 24, 2026

Game Debug


Click here to play the game Intervention.
Having made (by vibe-coding with Playground) what I feel is a basically sound version of the science fiction time travel game Intervention, today seemed like a good time to repair some of the bugs and user interface problems that have accumulated in the game. Below on this webpage, I document my efforts to improve the game Intervention. Further down this page, I show the steps used to build a time loop into Intervention, which led to more debugging 😖.

This blog post is Part 12 of a series if blog posts about vibe-coding the game Intervention. Parts 1 - 11 of the series are here: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. 

Casanay sector node in game Level 1.
 It had long been apparent while playing Intervention that the aliens did not arrive in a randomized fashion at the six sector nodes. While I was observing the non-random pattern of appearance of aliens at nodes, I ran into what was the most severe gameplay bug I had yet witnessed. I challenged the Playground AI agent to debug the code for the game and fix these problems...

 Me: Check the game code that controls visitations by aliens (pek, bumpha, Fru'wu, Phari and zeptozoans) to sector nodes on all six game levels. Which sector node an alien arrives at should be random. Currently the aliens do not randomly visit each of the six nodes. 

During gameplay of game Level 2, the arrival of a zeptozoan at the Metropolitan Archology node seemed to cause some parts of the normal gameplay to freeze; it was no longer possible for me to place new tactical agents in nodes or perform "laser strikes" on the zeptozoan. I could still select different nodes by clicking on them and I could could still visit Vythoth robotics lab and then return to the main "Future Earth" game window. No more aliens were able to enter the game at a node. On the screen, on top of the image of the zeptozoan, was the message "Sedron Siphon Conduit Locked".

 AI: Both issues have been fixed and published.
 - Random 6-Node Alien Visitations Across All Levels. Updated the sector node selection logic in App.tsx (using a shuffled 6-node deck and uniform unoccupied-node selection across radar spawns and Zeptozoan arrivals) so arriving pek, bumpha, Fru'wu, Phari, and zeptozoans visit all six sector nodes randomly across all six game levels.
 - Level 2 Zeptozoan ("Sedron Siphon Conduit Locked") Soft-Lock Resolved. Synchronized ZeptozoanModal offer construction and modal/pause refs so opening or resolving a Zeptozoan encounter never stalls with a null offer or desynchronized pause state, prioritized Zeptozoan/alien click hitboxes for laser strikes over sector node selection, and kept tactical agent placement (E/button), laser strikes, and future alien arrivals active even when a Zeptozoan locks a node's conduit on an undefended sector.

Broken image in frame.
 Me: In game Level 6, at the end of the HySy construction process, the game window that shows the final "Pre-Launch Checklist" has a broken image icon showing in the right hand side window frame (see the screen shot image that I attached). In that frame, there should be an image of the completely constructed HySy spaceship ready to travel to Koly.

New spaceship design.
 AI: Fixed the broken image in the right-hand showcase frame of the Level 6 HySy Construction window (HySyConstructionModal.tsx) by binding and preloading hysy_spaceship_hangar_portrait.png for Phases A–E and generating and displaying the completed HySy starship asset (hysy_spaceship_ready_launch.png) ready for the interstellar jump to Exoplanet Koly during the final Pre-Launch Checklist.

Image uploaded to
Playground.
 Me. As shown in the image to the left, the Playground AI agent-generated an entirely new spaceship that does not look like the one that was built.

Updated HySy.

  Me: Replace the image resource that you just made for the previous edit, "Completed Interstellar Starship HySy Ready for Launch", with a similar image that is uses the reference image that I just uploaded as an attachment. This is the HySy spaceship that is already shown in other game windows during the early Phases of construction of HySy.

 AI: Replaced the "Completed Interstellar Starship HySy Ready for Launch" asset (hysy_spaceship_ready_launch.png) with a launch-ready version matching the dark matte gunmetal vertical rocket-profile HySy starship on its four flared landing legs, and verified its framing in the Level 6 Pre-Launch Checklist showcase (HySyConstructionModal.tsx) before republishing.

Image uploaded to Playground.
 Me: Update the technology tree. Currently, much of the displayed text in the technology tree is in a font that is too small. Remove from what is shown in the main technology tree view the following three sections: the "Historical Lore:" section, the "Application" section and the "Risk Assessment" section of all 34 technologies. However, retain and display those those three sections and all of the currently displayed information for each technology in the pop-up frames that open when the "Click For Large View" button is clicked by the game player. In the new main technology tree view, continue to show the remaining parts of the technology tree items (see the screenshot image that I uploaded which uses red lines to mark the elements that should not be shown in the new version of the technology tree), but all of the displayed text in the new technology tree must be no smaller than the size of the text element "Femtobot Endosymbionts" that is seen in the screenshot image that I uploaded. In the new version of the technology tree, change the button labeled "Click For Large View" to "Click for Details".

 AI: The main Technology Tree view has been streamlined by removing the Historical Lore, Application(s), and Risk Assessment sections from the 34 technology cards (while retaining all three sections and full specifications inside the detail pop-up), renaming the card detail button to "Click for Details", and enlarging all displayed card text to at least the size of the technology titles (such as "Femtobot endosymbionts").

  Me:  At the top of the game's technology tree, move the two buttons labeled "Full Screen" and "X" to the right as indicated by the red arrow in the attached screenshot. At the current position of the "Full Screen" button, add a new button labeled "Research All Remaining Techs". That "Research All Remaining Techs" button becomes clickable when the game player has enough cores to research all of the remaining un-researched technologies in the technology tree. If the "Research All Remaining Techs" button is clicked, then all of the remaining un-researched technologies in the technology tree are researched at their combined cost in cores.

 AI: At the top of the Technology Tree window, the "Full Screen" and "X" buttons have been aligned to the far right, and a new "Research All Remaining Techs" button has been placed immediately to their left. When you have enough Chronal Cores to cover the combined core cost of every remaining un-researched technology, "Research All Remaining Techs" becomes clickable and unlocks all remaining technologies in one step while deducting their combined core cost.

 Me:  Modify the game code's logic to impose restrictive conditions under which a player can build the HySy spaceship in game Level 6. It is possible for a game player to reach game Level 6 by Time Travel from another game level. However, building the HySy requires many of the technologies that are in the technology tree. Modify the game code so that if a player is in game Level 6 and progressing through the Phases of spaceship construction and when a specific technology that is required to build the HySy remains un-researched, then the player's ability to continue constructing the spaceship is blocked at that point in the spaceship construction process and the player must return the the main "Future Earth" game window and research that un-researched technology. Add to the Level 6 game code a pop-up message that alerts the game player when they are blocked from finishing spaceship construction and which provides a list of the technologies remain to be researched in order to complete construction of HySy.

 AI: Level 6 HySy Starship Construction (HySyConstructionModal.tsx) now enforces strict Technology Tree prerequisites across all construction phases and steps.
 - Per-Step & Pre-Launch Tech Gating. If you arrive in Level 6 (such as via Time Travel) and attempt to execute a construction step, advance a phase, or complete launch while required technologies remain un-researched, construction is blocked at that exact point without spending Chronal Cores, and prior construction progress remains preserved.
 - Blocking Pop-Up Alert. Attempting a blocked step opens an alert pop-up displaying the immediate missing technology and a scrollable list of all remaining un-researched technologies required to finish HySy, with a "Return to Future Earth" button so you can research them in the Technology Tree before resuming assembly.

Image uploaded to Playground. Poorly programmed [return] code.

The HySy spaceship can be built before
all six game levels are played, but the
player cannot win the game until all of
the game levels are completed.

 Me:  Check the code for what happens when the [return] key is used in the Level 1 game window for the Simulation of the 1942 biochemistry research laboratory. When I used the [return] key while viewing the "Disguised Bumpha Femtobot Scanner" pop-up window frame (see the attached screenshot), the result was: the player being returned to the main "Future Earth" gameplay window. The result from using the [return] key while viewing the "Disguised Bumpha Femtobot Scanner" pop-up window frame (and the other two similar alien technology description pop-up frames in that Simulated lab) should be to simply close the pop-up window frame that is open and displaying information about one of the alien technologies.

 Note. This requested edit (above) caused the Playground AI agent to run for an unusually long time and then a pop-up message said that the edit failed and should be tried again.

 AI: Fixed the [Return] (Enter) key handling in the Level 1 1942 biochemistry research laboratory Simulation (FoundationReality1942Modal.tsx, CasanayGreatRoomModal.tsx, and App.tsx) so pressing [Return] while viewing the "Disguised Bumpha Femtobot Scanner" or either of the other two alien technology description pop-up frames closes only that pop-up frame and keeps you inside the 1942 simulated laboratory instead of returning to the main Future Earth window.

Top panel: old version with tiny text. Bottom panel: new version with larger text.
  Time loop.  I'll define "time loop" as a situation where someone receives useful information from themself in the future. Later, in that future time, they must complete the time loop by sending back through time the information that they previously received.

 Building a time loop. The player gets information from the future, but then must send that information back through time from the future era. I decided to link (1) a Level 1 meeting between the game player and Vythoth inside a Simulation of the Ekcolir Reality to (2) another encounter with Dr. Vythoth the Fru'wu inside Vythoth's robotics laboratory in game Level 2.

Image uploaded to Playground: setting for the game player to have a meeting with Vythoth..

  Me:  Make the following three changes to the game window that has the title "Eddy's Desktop Reality Viewer". (1) Change the title of that window to "Eddy's Reality Viewer". (2) Enlarge the center window frame that shows information about the three different Realities (the Foundation, Chronicler and Ekcolir Realities) so that frame is displayed with a larger size on the game player's screen and the font sizes for the text are all increased. The center window frame should cover most of the wasted black space that is currently in the "Eddy's Desktop Reality Viewer" game window. The central window frame should be displayed with  Full-Bleed Screen Coverage from the left hand side of the player's display screen to the right hand side. (3) When the game player returns to the "Eddy's Desktop Reality Viewer" game window after having been inside the Simulation of the Ekcolir Reality, a new blinking button labeled, "Message from the Future" is in the lower right hand corner, to the right of the "End Viewing" button. If the game player clicks on the "Message from the Future" button, then a new game window titled "Dr. Vythoth" opens (use the attached image as the background for the "Dr. Vythoth" game window. The background image of the window titled "Dr. Vythoth" should be displayed with  Full-Bleed Screen Coverage from the left hand side of the player's display screen to the right hand side. The background image of the window titled "Dr. Vythoth" depicts Dr. Vythoth the Fru'wu inside the robotics research laboratory where Tyhry does her Ph.D. research project. The game window titled "Dr. Vythoth" depicts a vision of the future being received from a future time when Tyhry is doing robotics research in Dr. Vythoth's laboratory. Note: the "Message from the Future" button is only visible to the game player after they have previously been inside the Simulation of the telepathy experiment in the Ekcolir Reality. 

Playground-generated window titled "Dr. Vythoth".
Uploaded to Playground.

  AI: All three updates to Eddy's Reality Viewer and the new "Dr. Vythoth" window have been implemented and published.
 - Title Update. Changed the window title to "Eddy's Reality Viewer".
 - Full-Bleed Center Frame & Larger Typography. Expanded the Reality Viewer and its center three-Realities panel to full-bleed left-to-right screen coverage, eliminating surrounding black margins and increasing all font sizes across the Foundation, Chronicler, and Ekcolir Reality cards and buttons.
 - Blinking "Message from the Future" & Full-Bleed "Dr. Vythoth" Window. Returning to Eddy's Reality Viewer after entering the Ekcolir Reality telepathy experiment simulation now reveals a blinking "Message from the Future" button in the lower-right corner next to "End Viewing", which opens the full-bleed "Dr. Vythoth" window showcasing a future vision of Tyhry's Ph.D. robotics research inside Dr. Vythoth the Fru'wu's laboratory (bg_dr_vythoth_future_vision.png). 

Playground-generated 
Vythoth sprite.
  Me:   When the game window titled "Dr. Vythoth" opens, the game asset "Vythoth Sprite" is in the middle of the background image frame of the "Dr. Vythoth" game window. The player's tactical agent sprite is in the lower right hand corner of the "Dr. Vythoth" game window. When the game window titled "Dr. Vythoth" opens, the "Return to Reality Viewer" button is not active. The Vythoth Sprite automatically walks to the the glowing blue data console in the lower left part of the "Dr. Vythoth" game window. When the game player walks to the position of the Vythoth Sprite, a pop-up speech frame opens and Dr. Vythoth says, "Let Tyhry Watson know that she should do her Ph.D. research with me. I will teach Tyhry how to build a robot that has human-like consciousness." Now the "Return to Reality Viewer" button is active and the game player can click the "Return to Reality Viewer" and return to the "Eddy's Reality Viewer" game window.

 AI: The "Dr. Vythoth" future-vision window (DrVythothVisionModal.tsx) is now an interactive 2D scene.
 - Interactive Sprites. "Vythoth Sprite" (new_asset_1795534682085) spawns in the middle of the laboratory backdrop and automatically walks to the glowing blue data console in the lower-left area, while your Tactical Agent spawns in the lower-right corner and can navigate with the Arrow keys, WASD, or floor clicks.
 - Gated Return & Dialogue. The "Return to Reality Viewer" button starts inactive when the window opens. Walking to Dr. Vythoth's position at the lower-left console opens a speech pop-up where Dr. Vythoth states: "Let Tyhry Watson know that she should do her Ph.D. research with me. I will teach Tyhry how to build a robot that has human-like consciousness.", activating the "Return to Reality Viewer" button so you can return to Eddy's Reality Viewer. 

Game Level 1 meeting with Dr. Vythoth.

   Me: Modify the code for the Dr. Vythoth's robotics research laboratory game window in game Level 2. While viewing Dr. Vythoth's robotics research laboratory, the game player can walk the game player's tactical agent sprite to the position of Dr. Vythoth. In the pop-up speech window frame for Dr. Vythoth, include "Send message to the past" as a clickable option. Clicking on that option is a requirement for completion of game Level 2. When the user clicks on "Send message to the past", Dr. Vythoth says, "We have successfully sent a message to your past self, who was the one who told Tyhry Watson to do her Ph.D. research here in my laboratory." Completing this game feature earns the game player a bonus of 10,000 game points iff the player also spoke to Dr. Vythoth in game Level 1. Include in the game Instruction Manual a description of how the player can speak to Dr. Vythoth in game Level 1 and then complete the time loop by speaking to Dr. Vythoth again in game Level 2.

 

Vance replicoids on HySy.
 AI. Updated Dr. Vythoth's robotics research laboratory in Level 2, wired the Level 1 → Level 2 causal time loop, and updated the Instruction Manual.
 - Level 2 "Send message to the past" & Completion Requirement (VythothLabModal.tsx & App.tsx). Walking your tactical agent sprite to Dr. Vythoth opens Dr. Vythoth's speech frame with a clickable "Send message to the past" button. Clicking it triggers Dr. Vythoth's reply ("We have successfully sent a message to your past self, who was the one who told Tyhry Watson to do her Ph.D. research here in my laboratory.") and satisfies the mandatory Level 2 completion requirement.
 - 10,000-Point Causal Loop Bonus (App.tsx). Completing "Send message to the past" in Level 2 awards +10,000 bonus points if and only if you also spoke to Dr. Vythoth in Level 1 (DrVythothVisionModal.tsx).
 - Instruction Manual (InstructionsModal.tsx). Added instructions explaining how to speak with Dr. Vythoth in Level 1 and complete the causal time loop in Level 2.

   Me: Make the following three corrections to the game code. (1) Since the previous game edit, there seems to be a new problem in game windows such as the "Temporal Bridge View"; something can break the ability of the game player to to use the [return] key. For example, in one play of the game, in the "Temporal Bridge View" game window,  using the [return] button to select the "Speak To Alien" option was broken as was using [return] to select the "Engage Defenses & Resume Gameplay" button after having spoken to the alien. In another play of the game, in the "Temporal Dissonance" pop-up window, use of the [return] key (enter) stopped working. In both cases, loss of [return] hey function occurred after the player earned the 10,000 point time loop bonus. Check the validity of the game code that controls the game's responses to the player using the [return] key. (2) When the player earns the 10,000 point time loop bonus, immediately add those 10,000 points to the running total of points that the game player can see in the game. (3) Notice that the game player can move from Level 2 to Level 1, so it is possible for a player to first speak to Vythoth in Level 2 and then return to Level 1 and speak to Vythoth in Level 1. Through the wonders of the in-game temporal mechanics, this order of meeting Vythoth twice also allows the game player to successfully complete the time loop and earn the 10,000 point time loop bonus.

 Me. The edit shown above was sent to the Playground AI agent late one morning. I got a pop-up window saying that the edit was taking a long time and they were having high traffic. I told it to keep working. Eventually, the edit progress messages were gone from the screen and there was a button for reloading the game. I used that button. Playground was still showing that it is in "MODE EDIT" and there are "joke" messages that keep streaming at the bottom of the left hand chat window, but there were no edit progress indicators visible. In the text entry box it showed "please wait" and the square "stop" icon is showing. I asked Google's AI Mode and it said to stop the edit and reload. It looks like the entire edit was erased from the chat stream. I decided to split the previous edit into parts.

Tyhry on Threy.
 Me: Since the previous game edit, there seems to be a new problem in game windows such as the "Temporal Bridge View"; during gameplay something can break the ability of the game player to to use the [return] key normally. For example, in one play of the game, in the "Temporal Bridge View" game window,  using the [return] button to select the "Speak To Alien" option was broken, as was using [return] to select the "Engage Defenses & Resume Gameplay" button after having first spoken to the alien. In another play of the game, in the "Temporal Dissonance" pop-up window, use of the [return] key (enter) stopped working. In both cases, loss of [return] key function occurred after the player completed the game Level 1 part of the time loop by meeting with Vythoth the Fru'wu inside a Simulation of the Ekcolir Reality. Check the validity of the game code that controls the game's responses to the player using the [return] key as a way to activate buttons and how responses to the [return] key might get altered during game play.

Eddy and Zeta.
 AI: Fixed the [Return] (Enter) key regression across "Temporal Bridge View", "Temporal Dissonance", and all modal windows.
 - Removed Leaked Capture Keydown Listener. Fixed a capture/bubble mismatch in BookstoreSimulationModal.tsx where removeEventListener omitted the capture: true option, leaving an orphaned capture listener that intercepted Enter/Return with stopImmediatePropagation() after visiting Level 1 simulations.
 - Hardened Global & Modal [Return] Handling. Stabilized App.tsx's global keydown handler (fixing pause-menu priority, Quick Start guarding, and Temporal Bridge primary CTA focus), added explicit Enter/Return/NumpadEnter handling and auto-focus to TyhryDreamWorldModal.tsx (for Temporal Dissonance / Precognition pop-ups), reset nested modal states cleanly on close in CasanayGreatRoomModal.tsx and FoundationReality1942Modal.tsx, and added strict isOpen guards across modal keydown listeners.

Tyhry
 Me: In game Level 1, after all of the 4 required meetings with game characters have been completed, clicking on the button in the main "Future Earth" gameplay window that is labeled "Casanay Great Room (Eddy & Zeta)"only briefly opens the Casanay great room game window, and then, almost at once, the "Simulation of the Foundation Reality" game window opens. Check the code for the Casanay great room game window an make sure that opening that window cannot trigger opening of the "Simulation of the Foundation Reality" game window.

 AI: Fixed the Level 1 Casanay Great Room (Eddy & Zeta) auto-open bug (CasanayGreatRoomModal.tsx and App.tsx) by consuming and resetting open1942LabSignal on transition and clearing all nested sub-modal states whenever the room opens or closes, so clicking "Casanay Great Room (Eddy & Zeta)" no longer triggers "Simulation of the Foundation Reality". 

 Me: In game Level 1, after all of the 4 required meetings with game characters have been completed, pressing the [return] key no longer functions correctly to activate buttons in the "Temporal Bridge View" game window. Using the [return] button to select the "Speak To Alien" option is broken, as is using [return] to select the "Engage Defenses & Resume Gameplay" button after having first spoken to the alien. In other game windows such as the "Temporal Dissonance" pop-up window, the same problem occurs: the [return] key no longer functions correctly to activate buttons that should be activated by pressing the [return] key.  Check the game Level 1 code that allows the game player to progress to game Level 2 after completing all game Level 1 requirements. Try to repair that code to prevent it from altering the game's response to the game player pressing the [return] key. The function of pressing the [return] key to activate buttons should remain during the entire game.

Playground game editing mode.
1947 Simulation

  AI: Fixed the Level 1 [Return] (Enter) key breakage across "Temporal Bridge View", "Temporal Dissonance", and subsequent windows.
 - Removed Leaked Capture Listener & Modal Guards. Fixed the capture-phase keydown listener cleanup mismatch in BookstoreSimulationModal.tsx and added active-open (isOpenRef / DOM) and key-repeat guards across the Level 1–2 modals (CasanayGreatRoomModal.tsx, CasanayBasementModal.tsx, FoundationReality1942Modal.tsx, MannyManagerOfficeModal.tsx, DrVythothVisionModal.tsx, EkcolirReality2040Modal.tsx, ZeptozoanModal.tsx, and TyhryDreamWorldModal.tsx) so closing any Casanay Quartet encounter or Level 1 window never leaves a listener intercepting Enter/Return.
 - Stabilized Global & Modal [Return] Activation (App.tsx). Updated Temporal Bridge View ("Speak To Alien" and "Engage Defenses & Resume Gameplay"), Temporal Dissonance, and Zeptozoan [Return] handling with synchronous ref cleanup so pressing [Return] remains reliable before and after completing all 4 Level 1 requirements and advancing to Level 2. 

 Me: Notice that by using the Time Travel feature of the game, the game player can move from game Level 1 to game Level 2. Then the game player can move from Level 2 to Level 1 by Time Travel: so it is possible for a player to first speak to Vythoth in Level 2, send the message into the past and then return to Level 1 and speak to Vythoth in Level 1. Through the wonders of the in-game temporal mechanics, this order of meeting Vythoth twice (first in Level 2 and then in Level 1) must also allow the game player to successfully complete the time loop and earn the 10,000 point time loop bonus. Modify the game code so that earning the 10,000 point Time Travel bonus can be accomplished in two ways: (1) first visit Vythoth in game Level 1 and then visit Vythoth again in game Level 2, or (2) first visit Vythoth in game Level 2 and then visit Vythoth in game Level 1.

The uppity robot.
 AI: Updated the Dr. Vythoth causal time-loop bonus (+10,000 points) so it can now be completed in either order.
 - Level 1 → Level 2. Speak to Dr. Vythoth in Level 1 (DrVythothVisionModal) first, then click "Send message to the past" in Level 2's Dr. Vythoth Robotics Research Laboratory (VythothLabModal).
 - Level 2 → Level 1 via Time Travel. Jump to Level 2, click "Send message to the past" in VythothLabModal first, then return to Level 1 via Time Travel and speak to Dr. Vythoth in the Level 1 "Dr. Vythoth" window (DrVythothVisionModal).
Both halves persist across Time Travel and mid-run retries (awarding the +10,000 bonus once upon completing the second half), and the Instruction Manual (InstructionsModal.tsx) now documents both completion paths. 

Time Loop instructions from the Intervention game Instruction Manual.


I used Time Travel to complete the Level 2 visit with Vythoth first.



Then I went back in time and met Vythoth in Level 1.
  As shown above, it is now possible to get the 10,000 point Time Travel bonus in both ways. I initially feared that the Playground AI agent would not be able to understand how to engineer the Time Loop, but it seems to have done the required coding. The Intervention game project file now has size 162 MB.

Next: forcing an AI to behave; the 'joys' of vibe-coding the game Intervention.

Vance and a replicoid copy of Vance?

No comments:

Post a Comment