Tanuki transform into prop ability #10

Closed
devonereynolds wants to merge 8 commits from alexisa into dev
Member

Resolves: https://tasks.bugjam.dev/tasks/101

CoS:

Give the player the option to swap out for a random prop.

Press a button to turn into a prop, press a button again to turn back into the tanuki

Resolves: https://tasks.bugjam.dev/tasks/101 CoS: Give the player the option to swap out for a random prop. Press a button to turn into a prop, press a button again to turn back into the tanuki
@ -210,10 +232,6 @@ func _handle_input(delta: float) -> void:
MAX_OVERHEAD_CAMERA_SPRING_ARM_LENGTH,
)
if Input.is_action_just_pressed(&"jump") and not is_jumping:
Member

Was removing jump and the _should_reset_camera below intentional?

Was removing jump and the `_should_reset_camera` below intentional?
noahg marked this conversation as resolved
@ -44,2 +44,4 @@
const JUMP_FORCE := 5.0
## Add props to children of prop container
const PROPS:Array[PackedScene]=[preload("uid://dvji7pdnf56c5"), preload("uid://cvnm45xvnr3ol")]
Member

This can be a @export for easier management:

@export var transform_props: Array[PackedScene] = []

then we can set them in-editor a lot easier

This can be a `@export` for easier management: ```gdscript @export var transform_props: Array[PackedScene] = [] ``` then we can set them in-editor a lot easier
noahg marked this conversation as resolved
@ -160,3 +182,3 @@
## If true, the player can move and look around
func can_move() -> bool:
return not GameState.game_finished
return true
Member

Was this change intentional?

Was this change intentional?
noahg marked this conversation as resolved
Member

Following our discussion I removed the unrelated changes to the various .import files throughout this branch.
I also removed the broken and conflicting changes to project.godot and addons/phantom_camera/themes/theme.tres from the commit with subject Adding Prop Mesh Container form Tanuki Transform Into Prop Ability / 5ad0b48160979346235f87d402e53bc70b77a39d.
There are still other unrelated or breaking changes and other merge conflicts that will need to be resolved before this can be successfully merged.
I'll take another stab at this in the morning.

Following our discussion I removed the unrelated changes to the various `.import` files throughout this branch. I also removed the broken and conflicting changes to `project.godot` and `addons/phantom_camera/themes/theme.tres` from the commit with subject `Adding Prop Mesh Container form Tanuki Transform Into Prop Ability` / 5ad0b48160979346235f87d402e53bc70b77a39d. There are still other unrelated or breaking changes and other merge conflicts that will need to be resolved before this can be successfully merged. I'll take another stab at this in the morning.
Member

@Alexis_Aurora how are the changes in the new commit you just added light_fixtures:mport and scene creation / 6ae72d610f48bc7af8d98df9386723c836932a3b related to this pull request?

@Alexis_Aurora how are the changes in the new commit you just added `light_fixtures:mport and scene creation` / 6ae72d610f48bc7af8d98df9386723c836932a3b related to this pull request?
Member

@TranquilMarmot I discovered why there were a bunch of modified .import files in this PR.
It was not because of an export template like we initially thought.
Evidently it was because the the project was erroneously opened with an old version of the Godot editor, and that version of the editor must have made all those changes.
After digging through the history of the branch for this PR I noticed that in the original version of the initial commit Adding Prop Mesh Container form Tanuki Transform Into Prop Ability / 64fd8134ed7a62611c1e792aade422d78ce75d00 in project.godot on line 19 it shows that the editor version was changed from 4.6 to 4.3.
64fd8134ed (diff-fc17da9c81)
Now I am certain that all those modifications to the .import files were incorrect and definitely needed to be removed from this PR.

@TranquilMarmot I discovered why there were a bunch of modified `.import` files in this PR. It was not because of an export template like we initially thought. Evidently it was because the the project was erroneously opened with an old version of the Godot editor, and that version of the editor must have made all those changes. After digging through the history of the branch for this PR I noticed that in the original version of the initial commit `Adding Prop Mesh Container form Tanuki Transform Into Prop Ability` / 64fd8134ed7a62611c1e792aade422d78ce75d00 in `project.godot` on line 19 it shows that the editor version was changed from 4.6 to 4.3. https://git.bugjam.dev/BUGJam/pounce-game/commit/64fd8134ed7a62611c1e792aade422d78ce75d00#diff-fc17da9c8188815338845413341b2cc030b1e17c Now I am certain that all those modifications to the `.import` files were incorrect and definitely needed to be removed from this PR.
Member

@noahg wrote in #10 (comment):

@Alexis_Aurora how are the changes in the new commit you just added light_fixtures:mport and scene creation / 6ae72d610f related to this pull request?

I see the commit with subject light_fixtures:mport and scene creation / 814b00e2376d671eb7fea06b4c6d1102696eadcf was eventually added directly to the dev branch in an amended commit light_fixtures: import and scene creation / 3502a87fb8.
This seems to imply that this commit was not related to this PR, so I am not going to include it in my next attempt to finish resolving conflicts while rebasing this branch onto the dev branch.

@noahg wrote in https://git.bugjam.dev/BUGJam/pounce-game/pulls/10#issuecomment-290: > @Alexis_Aurora how are the changes in the new commit you just added `light_fixtures:mport and scene creation` / [`6ae72d610f`](/BUGJam/pounce-game/commit/6ae72d610f48bc7af8d98df9386723c836932a3b) related to this pull request? I see the commit with subject `light_fixtures:mport and scene creation` / 814b00e2376d671eb7fea06b4c6d1102696eadcf was eventually added directly to the `dev` branch in an amended commit `light_fixtures: import and scene creation` / 3502a87fb8c34dc9bea789de744ca6728597df21. This seems to imply that this commit was not related to this PR, so I am not going to include it in my next attempt to finish resolving conflicts while rebasing this branch onto the `dev` branch.
Member

@Alexis_Aurora the new commit Light Fixtures & Lamps: Fixed file import, added outdoor lamp/fixture mesh to zoo 4d2b13a340 that was just force pushed seems to be for an unrelated new feature.
I created a new branch named alexisa-light-fixtures-and-lamps for you to use pointed at your most recent commit.
I also added a branch protection rule to alexisa to block force pushes until we can finish fixing and reviewing the pull request for it.

@Alexis_Aurora the new commit `Light Fixtures & Lamps: Fixed file import, added outdoor lamp/fixture mesh to zoo ` 4d2b13a340fece341deff60bba7a0e9719005bb2 that was just force pushed seems to be for an unrelated new feature. I created a new branch named `alexisa-light-fixtures-and-lamps` for you to use pointed at your most recent commit. I also added a branch protection rule to `alexisa` to block force pushes until we can finish fixing and reviewing the pull request for it.
Member

After I determined the cause of the unnecessary changes to .import files I realized that there were additional unwanted changes in .tscn, .tres files and in project.godot.
Through a long series of forensic steps I was eventually able to differentiate the committed changes caused by mistakenly opening the project in Godot 4.3 and extracted the actual net change.

For posterity, here are my steps:

Created a new alexisa/rebase branch at the original parent commit for this branch bd1cf363e2.
Returned to Godot 4.3 and opened the project to force it to reserialize all the assets.
Committed all the automatic changes from reverting to Godot 4.3 in 90706844784a1082c6c56a0b2fe570abc5e24f9e.
Opened test_map.tscn and saved it to force reserializing with Godot 4.3.
Committed the reserialized version of test_map.tscn in b6781a9a6a27fef3428e84ae32e51728df97ce64.
Cherry picked this branch's original first commit Adding Prop Mesh Container form Tanuki Transform Into Prop Ability / 64fd8134ed7a62611c1e792aade422d78ce75d00.
Resolved conflicts by discarding unrelated changes to project.godot and using this commit's version of dev/nate/test_map.tscn.
At this point the diff for the new version c395779e27b5bdc73e10c7f8e4e004391dd90ea1 of the cherry picked commit only contained the actual changes without unrelated noise.
Effectively the changes are just adding a PropContainer node with two children PropOne and PropTwo with box meshes.
Cherry picked this branch's original second commit Tanuki Prop Transformation: input button mapped, prop toggle functions added / 18e5372d89fd76d9af1845ef5325992250325b0e.
Edited the cherry picked commit to remove the unrelated and unwanted .tmp files leaving just the actual changes in the resulting commit 477b7f35a1412670eac96182e13a6dfeff4beb9a.

Once I made it to this point I noticed that the changes to dev/nate/test_map.tscn were not in the later version pushed in commit Fixed previous commit errors / c834fec114940739fc9896ba9e361f9997a8bc5a.
I looked deeper at what went wrong in this branch and discovered that at this point commits between c37271dcc2 and 5bb7666603 were pulled from the dev branch.
These commits should not have been pulled from the dev brand into this branch. Instead this branch should have been rebased on the dev branch.
When the commits were pulled into this branch there were merge conflicts that were resolved incorrectly and ended up overwriting some of the changes and hid that fact inside large diffs with other people's changes.
Specifically, the commit Laser paths / 7dd1e62b8a was pulled in as commit 229d3109e4e120633d64bb841bc48e2d6ac3ae34 and overwrote this branch's earlier changes to dev/nate/test_map.tscn.
Similarly, the commit Free-moving overhead camera / a48dcc97c6 was pulled in as commit dca83fe1e451aac5d3dc85029faf82039a372230 and overwrote this branch's earlier change to add code for handling the transformation in entities/characters/player/player.gd.
Lastly, the commit Zoom camera in/out with mouse wheel / 5b33d7d410 was pulled in as commit aaa8c096fdbe33923df38cafae9de0a939de320b and overwrote this branch's earlier change to add a new input mapping in project.godot.

After these incorrectly rebased commits, a new commit Fixed previous commit errors / c834fec114940739fc9896ba9e361f9997a8bc5a was added that reintroduced similar changes to dev/nate/test_map.tscn in entities/characters/player/player.tscn instead.

My next steps on the rebased branch were:

Drop the commits reserializing test_map.tscn with Godot 4.3 and returning to Godot 4.3 and resolved trivial merge conflicts.
Resolve merge conflicts and reserialize dev/nate/test_map.tscn with Godot 4.6.1.
Reset local dev branch to feat(export): Add default export templates for Windows and Linux / 5bb7666603 which coresponds to the commit that was last pulled into the branch before Fixed previous commit errors / c834fec114940739fc9896ba9e361f9997a8bc5a.
Rebase alexisa/rebase on local dev branch at that commit.
Resolve trivial merge conflicts using VS Code's merge editor by applying current (dev) then incoming (alexisa/rebase) occasionally having to manually resolve conflicts.
Then resolved code parse errors in the editor.
Cherry pick Fixed previous commit errors / c834fec114940739fc9896ba9e361f9997a8bc5a.
Resolved merge conflicts and duplicate changes from previous conflict resolutions and removed all unrelated changes to .import files.

Later in this PR's history the branch was force pushed from c834fec114940739fc9896ba9e361f9997a8bc5a to 72f50fe131ccb8164818b942c6e6c2cd05d10d92.
This seems to have been another attempt to rebase the changes, but it was still done incorrectly.
It also added a new commit Basic working prop transform function (use P to switch between tanuki mesh and props) / 72f50fe131ccb8164818b942c6e6c2cd05d10d92.
That commit appears to make the final changes necessary to make this feature work.
The parent commit of the branch at this stage was TOOL: New GAME_ENTRY.tscn entry point, to allow for easy level debugging from F5 / 3748760af0.

My final steps on the rebased branch were:

Reset local dev branch to the parent commit mentioned above.
Rebase the alexisa/rebase branch onto local dev branch.
There were no merge conflicts this time.
Cherry pick Basic working prop transform function (use P to switch between tanuki mesh and props) / 72f50fe131ccb8164818b942c6e6c2cd05d10d92.
Resolved merge conflicts and removed duplicate changes from previous conflict resolutions.
Then resolved code parse errors in the editor.
Reset local dev branch to origin/dev.
Rebase the alexisa/rebase branch onto local dev branch at the latest commit on origin.
Resolve trivial merge conflicts using VS Code's merge editor by applying current (dev) then incoming (alexisa/rebase) occasionally having to manually resolve conflicts.

The branch was then caught up with the latest changes from the dev branch and only contained its related changes.
I did one final rebase to edit the commits and move conceptually related changes together and eliminated intermediate revisions that distract from understanding the outcome of this branch.

Conclusion

Now this feature branch is finally in a proper state to actually be reviewed for correctness.

After I determined the cause of the unnecessary changes to `.import` files I realized that there were additional unwanted changes in `.tscn`, `.tres` files and in `project.godot`. Through a long series of forensic steps I was eventually able to differentiate the committed changes caused by mistakenly opening the project in Godot 4.3 and extracted the actual net change. ### For posterity, here are my steps: Created a new `alexisa/rebase` branch at the original parent commit for this branch bd1cf363e281854fedb5aa6f7109900eb620f597. Returned to Godot 4.3 and opened the project to force it to reserialize all the assets. Committed all the automatic changes from reverting to Godot 4.3 in 90706844784a1082c6c56a0b2fe570abc5e24f9e. Opened `test_map.tscn` and saved it to force reserializing with Godot 4.3. Committed the reserialized version of `test_map.tscn` in b6781a9a6a27fef3428e84ae32e51728df97ce64. Cherry picked this branch's original first commit `Adding Prop Mesh Container form Tanuki Transform Into Prop Ability` / 64fd8134ed7a62611c1e792aade422d78ce75d00. Resolved conflicts by discarding unrelated changes to `project.godot` and using this commit's version of `dev/nate/test_map.tscn`. At this point the diff for the new version c395779e27b5bdc73e10c7f8e4e004391dd90ea1 of the cherry picked commit only contained the actual changes without unrelated noise. Effectively the changes are just adding a `PropContainer` node with two children `PropOne` and `PropTwo` with box meshes. Cherry picked this branch's original second commit `Tanuki Prop Transformation: input button mapped, prop toggle functions added` / 18e5372d89fd76d9af1845ef5325992250325b0e. Edited the cherry picked commit to remove the unrelated and unwanted `.tmp` files leaving just the actual changes in the resulting commit 477b7f35a1412670eac96182e13a6dfeff4beb9a. Once I made it to this point I noticed that the changes to `dev/nate/test_map.tscn` were not in the later version pushed in commit `Fixed previous commit errors` / c834fec114940739fc9896ba9e361f9997a8bc5a. I looked deeper at what went wrong in this branch and discovered that at this point commits between c37271dcc253660158ced9758e4ae4c7419d62c3 and 5bb76666035386d938416e8cc25e37fd90383ded were pulled from the `dev` branch. These commits should not have been pulled from the `dev` brand into this branch. Instead this branch should have been rebased on the `dev` branch. When the commits were pulled into this branch there were merge conflicts that were resolved incorrectly and ended up overwriting some of the changes and hid that fact inside large diffs with other people's changes. Specifically, the commit `Laser paths` / 7dd1e62b8a2f0466417fbb744ed4b1f46aa0bf08 was pulled in as commit 229d3109e4e120633d64bb841bc48e2d6ac3ae34 and overwrote this branch's earlier changes to `dev/nate/test_map.tscn`. Similarly, the commit `Free-moving overhead camera` / a48dcc97c683d8eeb19fcec720b4ff2ea66c8113 was pulled in as commit dca83fe1e451aac5d3dc85029faf82039a372230 and overwrote this branch's earlier change to add code for handling the transformation in `entities/characters/player/player.gd`. Lastly, the commit `Zoom camera in/out with mouse wheel` / 5b33d7d4108820db0457a72e2f60049cf3256d10 was pulled in as commit aaa8c096fdbe33923df38cafae9de0a939de320b and overwrote this branch's earlier change to add a new input mapping in `project.godot`. After these incorrectly rebased commits, a new commit `Fixed previous commit errors` / c834fec114940739fc9896ba9e361f9997a8bc5a was added that reintroduced similar changes to `dev/nate/test_map.tscn` in `entities/characters/player/player.tscn` instead. ### My next steps on the rebased branch were: Drop the commits reserializing `test_map.tscn` with Godot 4.3 and returning to Godot 4.3 and resolved trivial merge conflicts. Resolve merge conflicts and reserialize `dev/nate/test_map.tscn` with Godot 4.6.1. Reset local `dev` branch to `feat(export): Add default export templates for Windows and Linux` / 5bb76666035386d938416e8cc25e37fd90383ded which coresponds to the commit that was last pulled into the branch before `Fixed previous commit errors` / c834fec114940739fc9896ba9e361f9997a8bc5a. Rebase `alexisa/rebase` on local `dev` branch at that commit. Resolve trivial merge conflicts using VS Code's merge editor by applying current (`dev`) then incoming (`alexisa/rebase`) occasionally having to manually resolve conflicts. Then resolved code parse errors in the editor. Cherry pick `Fixed previous commit errors` / c834fec114940739fc9896ba9e361f9997a8bc5a. Resolved merge conflicts and duplicate changes from previous conflict resolutions and removed all unrelated changes to `.import` files. Later in this PR's history the branch was force pushed from c834fec114940739fc9896ba9e361f9997a8bc5a to 72f50fe131ccb8164818b942c6e6c2cd05d10d92. This seems to have been another attempt to rebase the changes, but it was still done incorrectly. It also added a new commit `Basic working prop transform function (use P to switch between tanuki mesh and props)` / 72f50fe131ccb8164818b942c6e6c2cd05d10d92. That commit appears to make the final changes necessary to make this feature work. The parent commit of the branch at this stage was `TOOL: New GAME_ENTRY.tscn entry point, to allow for easy level debugging from F5` / 3748760af06dd59103d207573319a978247935a2. ### My final steps on the rebased branch were: Reset local `dev` branch to the parent commit mentioned above. Rebase the `alexisa/rebase` branch onto local `dev` branch. There were no merge conflicts this time. Cherry pick `Basic working prop transform function (use P to switch between tanuki mesh and props)` / 72f50fe131ccb8164818b942c6e6c2cd05d10d92. Resolved merge conflicts and removed duplicate changes from previous conflict resolutions. Then resolved code parse errors in the editor. Reset local `dev` branch to `origin/dev`. Rebase the `alexisa/rebase` branch onto local `dev` branch at the latest commit on origin. Resolve trivial merge conflicts using VS Code's merge editor by applying current (`dev`) then incoming (`alexisa/rebase`) occasionally having to manually resolve conflicts. The branch was then caught up with the latest changes from the `dev` branch and only contained its related changes. I did one final rebase to edit the commits and move conceptually related changes together and eliminated intermediate revisions that distract from understanding the outcome of this branch. ### Conclusion Now this feature branch is finally in a proper state to actually be reviewed for correctness.
@ -44,2 +44,4 @@
const JUMP_FORCE := 5.0
## Add props to children of prop container
const PROPS: Array[PackedScene] = [preload("uid://dvji7pdnf56c5"), preload("uid://cvnm45xvnr3ol")]
Member

I think this would work better as

@export var props: Array[PackedScene]

Then we can set them in the editor

I think this would work better as ```gdscript @export var props: Array[PackedScene] ``` Then we can set them in the editor
Member

I agree. I went ahead and made this change in the additional commits I just pushed.

I agree. I went ahead and made this change in the additional commits I just pushed.
noahg marked this conversation as resolved
@ -134,1 +144,4 @@
func _add_props() -> void:
for prop in PROPS:
prop_container.add_child(prop.instantiate())
Member

Currently, the props that are being used here (crate_wood.tscn, vase.tscn) are static bodies which means that when they get added to this container the character starts to collide with them and gets pushed into the air.

It seems like we'd just want to take the visuals of those scenes to transform into, and not the static bodies themselves.

Currently, the props that are being used here (`crate_wood.tscn`, `vase.tscn`) are static bodies which means that when they get added to this container the character starts to collide with them and gets pushed into the air. It seems like we'd just want to take the _visuals_ of those scenes to transform into, and not the static bodies themselves.
Member

Good catch. I went ahead and made this change in the additional commits I just pushed.

Good catch. I went ahead and made this change in the additional commits I just pushed.
noahg marked this conversation as resolved
Member

Rebased on dev

Rebased on `dev`
Member

@Alexis_Aurora after getting this into a state to be reviewed and addressing @TranquilMarmot's points above, I found some other things we need to consider with this feature.

Currently this is only a visual transformation and a movement control lock. There is currently no change to the guard robot detection behavior. My understanding of this feature is that by transforming the player would become undetectable by the guards.

There are also some issues with managing controls.
After transforming, the player cannot move and they cannot look around, but they can still jump.
Also, they can still zoom with the right mouse button which also reorients the player's position to face in the direction of the camera.

The control lock should only prevent the player from moving and jumping, but they should still be able to look around so they can see where the guards are around them.
Also, while transformed into a prop, the right click to zoom function probably should not reorient the player's position.

Both considerations will likely require a move to a state machine to manage player movement and whether they are detectable by the guards.

@Alexis_Aurora after getting this into a state to be reviewed and addressing @TranquilMarmot's points above, I found some other things we need to consider with this feature. Currently this is only a visual transformation and a movement control lock. There is currently no change to the guard robot detection behavior. My understanding of this feature is that by transforming the player would become undetectable by the guards. There are also some issues with managing controls. After transforming, the player cannot move and they cannot look around, but they can still jump. Also, they can still zoom with the right mouse button which also reorients the player's position to face in the direction of the camera. The control lock should only prevent the player from moving and jumping, but they should still be able to look around so they can see where the guards are around them. Also, while transformed into a prop, the right click to zoom function probably should not reorient the player's position. Both considerations will likely require a move to a state machine to manage player movement and whether they are detectable by the guards.
Member

I also realized there is now a conflict with the pause menu key mapping in the dev branch. The 'P' key is pretty far to reach from the WASD hand position. The 'T' key for transforming seems more appropriate, so I went ahead and made that change to eliminate the conflict and rebased on dev again. There is also a new issue where even though the tanuki visual node's visible property is being set to false it is still visible. I'm guessing it has to do with the animation player forcing it back to being visible. Still investigating.

I also realized there is now a conflict with the pause menu key mapping in the `dev` branch. The 'P' key is pretty far to reach from the WASD hand position. The 'T' key for transforming seems more appropriate, so I went ahead and made that change to eliminate the conflict and rebased on `dev` again. There is also a new issue where even though the tanuki visual node's `visible` property is being set to `false` it is still visible. I'm guessing it has to do with the animation player forcing it back to being visible. Still investigating.
Member

I found and fixed the tanuki mesh visibility toggling issue.
The original tanuki mesh node had a misspelled name tankui_sm with the k and the u transposed.
In #20 it was replaced by a correctly spelled name tanuki_sk.
When I rebased on dev I didn't notice the additional spelling fix and I only changed the last character from m to k.
I fixed my mistake and rebased on dev again.

I found and fixed the tanuki mesh visibility toggling issue. The original tanuki mesh node had a misspelled name `tankui_sm` with the `k` and the `u` transposed. In https://git.bugjam.dev/BUGJam/pounce-game/pulls/20 it was replaced by a correctly spelled name `tanuki_sk`. When I rebased on `dev` I didn't notice the additional spelling fix and I only changed the last character from `m` to `k`. I fixed my mistake and rebased on `dev` again.
Member

Rebased on dev

Rebased on `dev`
Member

Superseded by #35

Superseded by https://git.bugjam.dev/BUGJam/pounce-game/pulls/35
noahg closed this pull request 2026-03-13 23:58:39 +00:00
noahg deleted branch alexisa 2026-03-13 23:59:14 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
4 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
BUGJam/pounce-game!10
No description provided.