2024-06-06-Thursday
created: 2024-06-06 06:58 tags: - daily-notes
Thursday, June 06, 2024
<< Timestamps/2024/06-June/2024-06-05-Wednesday|Yesterday | Timestamps/2024/06-June/2024-06-07-Friday|Tomorrow >>
🎯 Goal
- [x] Figure out why some animations in my animation spritesheet aren't loading in my Mini Martial Artists - Part 2 blog post
🌟 Results
- Accomplished goal to find out that there were missing pieces within my spritesheet (metadata is correct, but spritesheet needs work)
- Altered
export_spritesheets.sh
to copy required animations into my working folder for the blog post
🌱 Next Time
- Alter the
export_spritesheets.sh
bash script to export the working aesprite files into one composite spritesheet. - Maybe start fixing spritesheets so that they're easier to work with...?
📝 Notes
Today I wanted to work on the scripts needed for my Mini Martial Artists - Part 2 blog post. This includes animating Spritesheets for my different animations. Ideally, I want a D3 animation to show how two different fighters' data can be sampled, then render the outcome of that animation in the browser.
I found that some areas of the spritesheet PNG are completely missing. Specifically, the td_attack_distance_failure_defender
animation is trying to grab its slice at y=3024
, where there happens to be an empty image in the spritesheet file. This might be because I toggled the layers as invisible before rendering. This will take some time to re-work. Additionally I should definitely track all of this processing in one place. I know I have some kind of Bash script I use to generate these spritesheets from Aseprite files so it would be worth it to make sure my scripts have documentation pointing to where that is established. Thankfully I have already written up the text of the blog post which outlines exactly which animations I'll need. I'll list them below for reference (since some are missing from my file which is why I'm not seeing the animations I need!).
I'll want to render the following animations:
- Distance No Action (Before event starts)
- Fighter 1
distance_no_action
- Fighter 2
distance_no_action
(Reversed and placed in correct position)
- Fighter 1
- Fighter 1 Distance Takedown Success
- Fighter 1
td_attack_distance_success_aggressor
- Fighter 2
td_attack_distance_failure_defender
- Fighter 1
- Ground Position (After TD Success)
- Fighter 1
dominant_ground_no_action
- Fighter 2
vulnerable_ground_no_action
- Fighter 1
- Fighter 1 Distance Takedown Failure
- Fighter 1
td_attack_distance_failure_aggressor
- Fighter 2
td_attack_distance_success_defender
- Fighter 1
- Clinch No Action (After TD Failure)
- Fighter 1
clinch_no_action
- Fighter 2
clinch_no_action
(Reversed and placed in correct position)
- Fighter 1
In total, I'll need 10 different animations.
It looks like I already have the export_spritesheets.sh
script in my C:\Users\Billy\Documents\HitHub\Avatars
path. I'll modify this script specifically for use within this blog post to make it easier to troubleshoot later on. It can still copy aesprite files so that I'm not working with the originals. It should copy the following files to the current working directory:
distance_no_action
td_attack_distance_success
dominant_ground_no_action
vulnerable_ground_no_action
td_attack_distance_failure
clinch_no_action
I was able to explicitly define these files in the bash script and copy them into a working folder via:
# Define the specific animations that we want to copy over
allowed_filenames=(
"distance_no_action"
"td_attack_distance_success"
"dominant_ground_no_action"
"vulnerable_ground_no_action"
"td_attack_distance_failure"
"clinch_no_action"
)
# Iterate over all .aseprite files in the source directory
for file in "$source_directory"/*.aseprite; do
# Check if file exists before copying
if [ -f "$file" ]; then
filename=$(basename "$file" .aseprite)
if [ " ${allowed_filenames[*]} " == *" $filename "* ](/blog/vault/dimmin-notes/allowed_filenames-filename/); then
echo "Copying $file to $directory_to_export"
cp "$file" "$directory_to_export"
fi
fi
done
echo "Copy complete."
Next time, I'll have to work on updating the export_spritesheets.sh
script to re-generate
Notes created today
List FROM "" WHERE file.cday = date("2024-06-06") SORT file.ctime asc
Notes last touched today
List FROM "" WHERE file.mday = date("2024-06-06") SORT file.mtime asc