Skip to content

Conversation

@felixwalberg
Copy link
Contributor

@felixwalberg felixwalberg commented Jan 6, 2026

This modifies the outro to change the champ sprite to an AnimatedSprite2D; and to add basic movement with CharacterBody2D, along with hints on other ways the movement could be changed.

@felixwalberg felixwalberg requested review from a team as code owners January 6, 2026 20:01
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

Play this branch at https://play.threadbare.game/branches/endlessm/champ-outro-animation.

(This launches the game from the start, not directly at the change(s) in this pull request.)

@wjt wjt added this to the Vermont Cup StoryQuest milestone Jan 8, 2026
Comment on lines +15 to +21
"frames": [{
"duration": 1.0,
"texture": ExtResource("7_276wt")
}, {
"duration": 1.0,
"texture": ExtResource("7_276wt")
}, {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For future reference you could have one frame at 2× length rather than duplicating the frame:

Image

func _physics_process(_delta: float) -> void:
# Make sure Champ doesn't swim out of the water!
# If he gets too close, turn him around and start swimming the other direction
if position.x > 400 or position.x < 0:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this is a CharacterBody2D, you could also do this by having invisible walls that it collides with, and handling move_and_slide() returning true (i.e. a collision occurred) by flipping the velocity.

(Not saying you have to change this, just an idea.)

Comment on lines +17 to +18
champ_animation.scale.x *= -1
velocity.x *= -1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another way you might spell this is:

Suggested change
champ_animation.scale.x *= -1
velocity.x *= -1
velocity.x *= -1
champ_animation.flip_h = velocity.x < 0

I think the difference is that flip_h only applies to the texture itself, whereas setting scale.x = -1 would also flip any child nodes. In this particular case they are equivalent. Just leaving a note about what we do elsewhere in the project, e.g

if not is_zero_approx(player.velocity.x):
flip_h = player.velocity.x < 0


@onready var champ_animation: AnimatedSprite2D = $AnimatedSprite2D

var swim_speed: int = 100
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
var swim_speed: int = 100
@export var swim_speed: int = 100

Perhaps?

@wjt wjt merged commit 90750c5 into main Jan 8, 2026
6 checks passed
@wjt wjt deleted the champ-outro-animation branch January 8, 2026 15:52
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.

3 participants