1
0
Fork
You've already forked ghost-game
0

improve portals and scene transitions; tidy up old code #5

Merged
andrew-mc merged 16 commits from portal-positions into main 2026年06月09日 23:41:03 +02:00
Collaborator
Copy link

Changes:

  • Implement scene switcher based on makertech tutorial, adapted to allow setting scenes via exported properties on SceneTrigger and EntranceMarker rather than string-matching on node names
  • Add basic fade in/out animation when switching scenes
  • Add entrance/exit for cottage interior
  • Remove some unused and commented out code
### Changes: - Implement scene switcher based on [makertech tutorial](https://youtu.be/sKqtCc_HykM?list=PLMQtM2GgbPEWKQuyv9sXHwGWDXLY3Zjpw), adapted to allow setting scenes via exported properties on SceneTrigger and EntranceMarker rather than string-matching on node names - Add basic fade in/out animation when switching scenes - Add entrance/exit for cottage interior - Remove some unused and commented out code
SceneTriggers and EntranceMarkers should now be configured through the 'connected_scene' and 'valid_prev_levels' properties in the inspector. Using @export_file lets us choose the specific level scenes, and Godot should keep track of them if we rename files etc.
I have a feeling we should link SceneTriggers to specific EntranceMarkers and vice versa (perhaps even wrapping them as Portals?), but this does the job for now :)
This adds a new SceneTransition scene containing a ColorRect and AnimationPlayer which can fade in or out. It's use in SceneManager to fade in/out when entering a door. Also had to allow disabling player input to avoid moving during the fade.
If doors in two levels were in similar positions, the player would spawn and trigger the door before it was repositioned. This commit updates SceneManager to only allow one scene transition at a time. There's probably a proper way to turn off physics or something but this seems to work.
andrew-mc deleted branch portal-positions 2026年06月09日 23:41:04 +02:00
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jfml/ghost-game!5
Reference in a new issue
jfml/ghost-game
No description provided.
Delete branch "portal-positions"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?