Add tree affected by Void#2184
Conversation
|
Ouch I made this branch on top of the tiles one, but it doesn't have to! I'll fix it tomorrow. |
97581cf to
a88361b
Compare
|
Play this branch at https://play.threadbare.game/branches/endlessm/integrate-void-trees/. (This launches the game from the start, not directly at the change(s) in this pull request.) |
There was a problem hiding this comment.
Wrong folder, the others are in components/
There was a problem hiding this comment.
Ouch sorry! I just pushed a fixup commit.
| set = _set_treetop_sprite_frames | ||
|
|
||
| @export var trunk_sprite_frames: SpriteFrames = preload("uid://euk5lvoroc5"): | ||
| set = _set_trunk_sprite_frames |
There was a problem hiding this comment.
No need to change this, just an idea: maybe in this case we could instead have
@export_enum("Blue", "Green", "Purple", "Red", "Yellow") var treetop_color: int
@export_range(0, 1) var trunk_variant: int
and then code to map these to SpriteFrames. It might be more level-designer-friendly than finding the SpriteFrames by hand. OTOH what you have here matches the rest of our components!
There was a problem hiding this comment.
We could even combine this and the regular tree, with a var void_level: int where 0 means "plain trunk" and 1 and 2 mean "some amount of void". Then we could change it on the fly in code as the void gets closer to or further from the tree. (Again, just an idea for the future.)
There was a problem hiding this comment.
Oh yes more specific and friendly exports is a great idea!
As per combining it with the regular tree, that was my initial idea. It makes sense for the main game. But then I though, this may be used in StoryQuests and a simple texture change could be easier than changing 2 textures.
Now, looking at existing StoryQuests, none of them are customizing the tree sprite. they all are using the existing spriteframe resources:
| Scene | Override |
|---|---|
stella/3_stella_sequence_puzzle/stella_sequence_puzzle.tscn |
tree_spriteframes_yellow.tres (one tree only) |
renya_beyond_sorrow/1_combat/renya_combat_round_1.tscn |
tree_spriteframes_purple.tres (4 trees) |
el_abrigo/3_el_abrigo_runner/el_abrigo_runner.tscn |
tree_spriteframes_red.tres (29 trees) |
el_abrigo/4_el_abrigo_outro/el_abrigo_outro.tscn |
tree_spriteframes_red.tres (9 trees) |
el_abrigo/0_el_abrigo_intro/el_abrigo_intro.tscn |
tree_spriteframes_red.tres (12 trees) |
|
@jgbourque what do you think a learner would like to do, for adding their own tree with a single texture?
Back to draft to do the friendlier exports. I'll probably leave it as a separate scene for now until I get some info from Learning. |
Add an Aseprite file for the trees, using the existing PNG files. Crop the treetop from the trunk in separate layers, leaving a single trunk. Then add layers for void-affected trunks, as delivered by PixelFrog. Also split the shadow in it's own layer, since the 2 trunks delivered didn't have one. Create a new scene, duplicating the existing tree scene. This one has 2 AnimatedSprite2D nodes: one for the tree trunk and one for the treetop. They also share the same material with the wind shader. Note that the treetop spritesheets have empty frames, because the trunk animation is larger (14 frames) than the treetop one (6 frames). Pick only the first 6 frames in the SpriteFrames resources for the treetop. Resolve #2165
Replace all yellow trees with affected-by-void trees, also yellow for the treetop, and vary the trunk with the two existing variations.
d37e2a0 to
3febbd0
Compare

Add an Aseprite file for the trees, using the existing PNG files. Crop the
treetop from the trunk in separate layers, leaving a single trunk. Then add
layers for void-affected trunks, as delivered by PixelFrog. Also split the
shadow in it's own layer, since the 2 trunks delivered didn't have one.
Create a new scene, duplicating the existing tree scene. This one has 2
AnimatedSprite2D nodes: one for the tree trunk and one for the treetop. They
also share the same material with the wind shader.
Note that the treetop spritesheets have empty frames, because the trunk
animation is larger (14 frames) than the treetop one (6 frames). Pick only the
first 6 frames in the SpriteFrames resources for the treetop.
grappling_hook_needles.tscn: Use trees with void
Replace all yellow trees with affected-by-void trees, also yellow for the
treetop, and vary the trunk with the two existing variations.
Resolve #2165