small-nav
chimchooree 3 years ago
parent 46c50c1a27
commit 130a564035

@ -0,0 +1,41 @@
<!--210610,200429-->
<h1>how to attack a moving target </h1>
july 8, 2021<br>
#ai #character #combat #design #movement <br>
<br>
Househunting has been unexpectedly time-consuming, but I'll share the tentative design for the attack-movement loop. Hopefully now that an offer was accepted, I'll find some time to iron out the design before packing and moving begins. <br>
<br>
The attack-movement loop needs to allow the character maintain attack range while attacking. The flow is complicated to follow, but this is how it works for now: <br>
<center><a target="_blank" href="/static/img/ent/attack-movement-loop-diagram.png">
<img src="/static/img/ent/attack-movement-loop-diagram.png" alt="(image: diagram of the attack movement loop)" width="500" height="233">
</a><br></center>
The code is color-coded by object. Warm gray is input, orange is the character's action module, yellow is the character, yellow-green is the character's equipment module, blue-green is the attack handler, blue is the AI's attack module, purple is the AI's movement module, pink is the AI, brown is the KnowledgeBase's MessageBus, and cool gray is the character's kinematic body. <br>
<br>
<h2>the loop explained </h2><br>
Upon attack input, the character sets up for attacking and creates an attack timer. On timeout, the character's weapon swings. If the character is out of range, the "out_of_range" signal is emitted. Otherwise, the weapon successfully swings, either emitting "target_dead" or "hit." <br>
<br>
The AI receives these signals. If the target was out of range, it sets up to follow attack target. <br>
<br>
Every AI tick, it prompts the character to pathfind to the target then sets the character's velocity to the current_dot (the first node the character is trying to reach in path) minus the character's global_position. <br>
<br>
Every frame, the character's _process(delta) method calls move_and_collide with velocity * speed * delta. If the character's velocity isn't 0,0, the "moved" event is published to the Knowledge Base's MessageBus. <br>
<br>
The movement handlers are subscribed to "moved," and will emit signals if the character reached either the next waypoint (the target or the chosen goal point at the end of the path) or the current dot (the first point along the pathfinding between the character and the goal point). <br>
<br>
The AI receives these signals. If the next waypoint is reached, it's removed from the list of waypoints, the "arrived_at_attack_target" signal is emitted, and movement is cleared. <br>
<br>
Then the AI receives the "arrived_at_attack_target" signal and prompts the character to begin the attack all over again. <br>
<br>
<h2>in-game </h2><br>
It works in-game, too, but it's pretty janky, especially without animations. If the slime is slow enough, the player character attacks until it gets too far away, moves back in range, and continues attacking. If it's too fast, though, she never gets to attack and jitters constantly after the slime. <br>
<br>
Too fast: <br>
<center><img src="/static/img/ent/attack-follow.gif" alt="(image: Angel follows slime)"></center>
<br>
I'll work it out sooner or later, dependent on how hectic moving turns out to be. <br>
<br>
(By the way, that's my first gif recorded and edited entirely in ffmpeg. It's not pretty, but at least I could write my bash script without relying on copypasta code from forums this time. I was trying to follow the documentation website before, but it's unreadable. The man page is so much easier to understand and search through.) <br>
<br>
<br>
Last Updated July 10, 2021
<br>

@ -10,12 +10,26 @@ august 1, 2021<br>
<h3>friday, july 8 </h3> <h3>friday, july 8 </h3>
<ul> <ul>
<li>I ordered some rayon rib knit for a mock turtleneck, but customer service emailed me yet again saying that it's out of stock. There were over 100 yards in stock when I placed my order...all I want is 2 yards. I thought the housing market was unreasonable, but the basic black fabric market is brutal. </li> <li>I ordered some rayon rib knit for a mock turtleneck, but customer service emailed me yet again saying that it's out of stock. There were over 100 yards in stock when I placed my order...all I want is 2 yards. I thought the housing market was unreasonable, but the basic black fabric market is brutal. </li>
<li>Urban Decay announced their new <a href="https://www.temptalia.com/urban-decay-vice-hydrating-lipstick-for-summer-2021/">Vice Hydrating Lipstick</a> for Summer 2021. It's official. My all-time favorite lipstick line is discontinued, and they're replacing it with a bland color range with (going off their recent releases) inconsistent quality. "35 Los Angeles-inspired shades from sheer pink and everyday nude to bold." Good-bye gunmetals, blacks, and purples. They don't even have my MLBB mauve anymore. I can't believe the "Does Pink Make You Puke?" brand that designed their lipsticks after bullets is trying to act like a cookie-cutter LA influencer now. </li> <li>Urban Decay announced their new <a href="https://www.temptalia.com/urban-decay-vice-hydrating-lipstick-for-summer-2021/">Vice Hydrating Lipstick</a> for Summer 2021. It's official. My all-time favorite lipstick line is discontinued, and they're replacing it with a bland color range with (going off their recent releases) inconsistent quality. "35 Los Angeles-inspired shades from sheer pink and everyday nude to bold." Good-bye gunmetals, blacks, and purples. They don't even have my MLBB mauve anymore. I can't believe the "Does Pink Make You Puke?" brand that designed their lipsticks after bullets is trying to act like a cookie-cutter LA influencer now...It's the way of the world. </li>
<br> <br>
<h3>friday, july 9 </h3> <h3>friday, july 9 </h3>
<ul> <ul>
<li>Learned how to add WebMs to my website. </li> <li>Learned how to add WebMs to my website. </li>
<li>Learning how to record in ffmpeg. </li> <li>Learning how to record in ffmpeg. </li>
<br> <br>
Last Updated July 9, 2021 <br> <h3>saturday, july 10 </h3>
<ul>
<li>Finished documenting the attack-movement loop </li>
<li>Improved the 8th's article. It was pretty empty before. </li>
<br>
<h3>sunday, july 11 </h3>
<img src="/static/img/ext/yaoihands.jpg" alt="(image: meme where the manga guys are drawn with tiny heads and giant hands)">
<ul>
<li>A while back, I found a used bookstore run by an old lady that almost exclusively sells Harlequin novels (we're talking 3 or 4 solid aisles). Did you know that's a publishing house, not a genre? And it's not just something old ladies talk about - it's this entire world with ridiculously distinctive branding. That crazy red branding unlocked a memory of when I found a free manga on Google Books, but it was co-authored by some Western woman. The artstyle was kinda like that meme where the guys have tiny heads, and it was about an architect lady in an office or something. The characters felt really Western (read as "boring" lol). I looked it up and, turns out, that was a Harlequin <i>manga</i>. Apparently Harlequin's a Canadian company, but they have a Japanese branch that converts the stories into manga for the Japanese audience. Who knew the influence of those books reached across cultural divides? </li>
<li>Romance novels in general are items of pure marketing, so they're fun to observe in the wild like that. If you haven't watched <a href="https://www.youtube.com/watch?v=UJiv14uPOac">Chris Zukowski's GDC talk about genre marketing tropes</a>, I recommend it. Starting at 28:15, he compares effective romance novel covers to effective game covers of various genres, and the sophistication of the visual language was pretty eye-opening. </li>
<li>Anyway, I bought something while I was there to be polite: Marion Zimmer Bradley's The Heirs of Hammerfell (not the one from The Elder Scrolls). I started reading it today. Cool 80s-90s fantasy book. It's book 8, so I may have to hunt down earlier entries. </li>
<li>Made tags into links that show all diary entries that share that tag </li>
<li>Added a word cloud, ordered by frequency. I love blogs with word clouds so much and finally have one of my own. </li>
<br>
Last Updated July 11, 2021 <br>
<br> <br>

@ -0,0 +1,41 @@
<!--210610,200429-->
<h1>how to attack a moving target </h1>
july 8, 2021<br>
#ai #character #combat #design #movement <br>
<br>
Househunting has been unexpectedly time-consuming, but I'll share the tentative design for the attack-movement loop. Hopefully now that an offer was accepted, I'll find some time to iron out the design before packing and moving begins. <br>
<br>
The attack-movement loop needs to allow the character maintain attack range while attacking. The flow is complicated to follow, but this is how it works for now: <br>
<center><a target="_blank" href="/static/img/ent/attack-movement-loop-diagram.png">
<img src="/static/img/ent/attack-movement-loop-diagram.png" alt="(image: diagram of the attack movement loop)" width="500" height="233">
</a><br></center>
The code is color-coded by object. Warm gray is input, orange is the character's action module, yellow is the character, yellow-green is the character's equipment module, blue-green is the attack handler, blue is the AI's attack module, purple is the AI's movement module, pink is the AI, brown is the KnowledgeBase's MessageBus, and cool gray is the character's kinematic body. <br>
<br>
<h2>the loop explained </h2><br>
Upon attack input, the character sets up for attacking and creates an attack timer. On timeout, the character's weapon swings. If the character is out of range, the "out_of_range" signal is emitted. Otherwise, the weapon successfully swings, either emitting "target_dead" or "hit." <br>
<br>
The AI receives these signals. If the target was out of range, it sets up to follow attack target. <br>
<br>
Every AI tick, it prompts the character to pathfind to the target then sets the character's velocity to the current_dot (the first node the character is trying to reach in path) minus the character's global_position. <br>
<br>
Every frame, the character's _process(delta) method calls move_and_collide with velocity * speed * delta. If the character's velocity isn't 0,0, the "moved" event is published to the Knowledge Base's MessageBus. <br>
<br>
The movement handlers are subscribed to "moved," and will emit signals if the character reached either the next waypoint (the target or the chosen goal point at the end of the path) or the current dot (the first point along the pathfinding between the character and the goal point). <br>
<br>
The AI receives these signals. If the next waypoint is reached, it's removed from the list of waypoints, the "arrived_at_attack_target" signal is emitted, and movement is cleared. <br>
<br>
Then the AI receives the "arrived_at_attack_target" signal and prompts the character to begin the attack all over again. <br>
<br>
<h2>in-game </h2><br>
It works in-game, too, but it's pretty janky, especially without animations. If the slime is slow enough, the player character attacks until it gets too far away, moves back in range, and continues attacking. If it's too fast, though, she never gets to attack and jitters constantly after the slime. <br>
<br>
Too fast: <br>
<center><img src="/static/img/ent/attack-follow.gif" alt="(image: Angel follows slime)"></center>
<br>
I'll work it out sooner or later, dependent on how hectic moving turns out to be. <br>
<br>
(By the way, that's my first gif recorded and edited entirely in ffmpeg. It's not pretty, but at least I could write my bash script without relying on copypasta code from forums this time. I was trying to follow the documentation website before, but it's unreadable. The man page is so much easier to understand and search through.) <br>
<br>
<br>
Last Updated July 10, 2021
<br>

@ -0,0 +1,41 @@
<!--210610,200429-->
<h1>how to attack a moving target </h1>
july 8, 2021<br>
#ai #character #combat #design #movement <br>
<br>
Househunting has been unexpectedly time-consuming, but I'll share the tentative design for the attack-movement loop. Hopefully now that an offer was accepted, I'll find some time to iron out the design before packing and moving begins. <br>
<br>
The attack-movement loop needs to allow the character maintain attack range while attacking. The flow is complicated to follow, but this is how it works for now: <br>
<center><a target="_blank" href="/static/img/ent/attack-movement-loop-diagram.png">
<img src="/static/img/ent/attack-movement-loop-diagram.png" alt="(image: diagram of the attack movement loop)" width="500" height="233">
</a><br></center>
The code is color-coded by object. Warm gray is input, orange is the character's action module, yellow is the character, yellow-green is the character's equipment module, blue-green is the attack handler, blue is the AI's attack module, purple is the AI's movement module, pink is the AI, brown is the KnowledgeBase's MessageBus, and cool gray is the character's kinematic body. <br>
<br>
<h2>the loop explained </h2><br>
Upon attack input, the character sets up for attacking and creates an attack timer. On timeout, the character's weapon swings. If the character is out of range, the "out_of_range" signal is emitted. Otherwise, the weapon successfully swings, either emitting "target_dead" or "hit." <br>
<br>
The AI receives these signals. If the target was out of range, it sets up to follow attack target. <br>
<br>
Every AI tick, it prompts the character to pathfind to the target then sets the character's velocity to the current_dot (the first node the character is trying to reach in path) minus the character's global_position. <br>
<br>
Every frame, the character's _process(delta) method calls move_and_collide with velocity * speed * delta. If the character's velocity isn't 0,0, the "moved" event is published to the Knowledge Base's MessageBus. <br>
<br>
The movement handlers are subscribed to "moved," and will emit signals if the character reached either the next waypoint (the target or the chosen goal point at the end of the path) or the current dot (the first point along the pathfinding between the character and the goal point). <br>
<br>
The AI receives these signals. If the next waypoint is reached, it's removed from the list of waypoints, the "arrived_at_attack_target" signal is emitted, and movement is cleared. <br>
<br>
Then the AI receives the "arrived_at_attack_target" signal and prompts the character to begin the attack all over again. <br>
<br>
<h2>in-game </h2><br>
It works in-game, too, but it's pretty janky, especially without animations. If the slime is slow enough, the player character attacks until it gets too far away, moves back in range, and continues attacking. If it's too fast, though, she never gets to attack and jitters constantly after the slime. <br>
<br>
Too fast: <br>
<center><img src="/static/img/ent/attack-follow.gif" alt="(image: Angel follows slime)"></center>
<br>
I'll work it out sooner or later, dependent on how hectic moving turns out to be. <br>
<br>
(By the way, that's my first gif recorded and edited entirely in ffmpeg. It's not pretty, but at least I could write my bash script without relying on copypasta code from forums this time. I was trying to follow the documentation website before, but it's unreadable. The man page is so much easier to understand and search through.) <br>
<br>
<br>
Last Updated July 10, 2021
<br>

@ -0,0 +1,41 @@
<!--210610,200429-->
<h1>how to attack a moving target </h1>
july 8, 2021<br>
#ai #character #combat #design #movement <br>
<br>
Househunting has been unexpectedly time-consuming, but I'll share the tentative design for the attack-movement loop. Hopefully now that an offer was accepted, I'll find some time to iron out the design before packing and moving begins. <br>
<br>
The attack-movement loop needs to allow the character maintain attack range while attacking. The flow is complicated to follow, but this is how it works for now: <br>
<center><a target="_blank" href="/static/img/ent/attack-movement-loop-diagram.png">
<img src="/static/img/ent/attack-movement-loop-diagram.png" alt="(image: diagram of the attack movement loop)" width="500" height="233">
</a><br></center>
The code is color-coded by object. Warm gray is input, orange is the character's action module, yellow is the character, yellow-green is the character's equipment module, blue-green is the attack handler, blue is the AI's attack module, purple is the AI's movement module, pink is the AI, brown is the KnowledgeBase's MessageBus, and cool gray is the character's kinematic body. <br>
<br>
<h2>the loop explained </h2><br>
Upon attack input, the character sets up for attacking and creates an attack timer. On timeout, the character's weapon swings. If the character is out of range, the "out_of_range" signal is emitted. Otherwise, the weapon successfully swings, either emitting "target_dead" or "hit." <br>
<br>
The AI receives these signals. If the target was out of range, it sets up to follow attack target. <br>
<br>
Every AI tick, it prompts the character to pathfind to the target then sets the character's velocity to the current_dot (the first node the character is trying to reach in path) minus the character's global_position. <br>
<br>
Every frame, the character's _process(delta) method calls move_and_collide with velocity * speed * delta. If the character's velocity isn't 0,0, the "moved" event is published to the Knowledge Base's MessageBus. <br>
<br>
The movement handlers are subscribed to "moved," and will emit signals if the character reached either the next waypoint (the target or the chosen goal point at the end of the path) or the current dot (the first point along the pathfinding between the character and the goal point). <br>
<br>
The AI receives these signals. If the next waypoint is reached, it's removed from the list of waypoints, the "arrived_at_attack_target" signal is emitted, and movement is cleared. <br>
<br>
Then the AI receives the "arrived_at_attack_target" signal and prompts the character to begin the attack all over again. <br>
<br>
<h2>in-game </h2><br>
It works in-game, too, but it's pretty janky, especially without animations. If the slime is slow enough, the player character attacks until it gets too far away, moves back in range, and continues attacking. If it's too fast, though, she never gets to attack and jitters constantly after the slime. <br>
<br>
Too fast: <br>
<center><img src="/static/img/ent/attack-follow.gif" alt="(image: Angel follows slime)"></center>
<br>
I'll work it out sooner or later, dependent on how hectic moving turns out to be. <br>
<br>
(By the way, that's my first gif recorded and edited entirely in ffmpeg. It's not pretty, but at least I could write my bash script without relying on copypasta code from forums this time. I was trying to follow the documentation website before, but it's unreadable. The man page is so much easier to understand and search through.) <br>
<br>
<br>
Last Updated July 10, 2021
<br>

@ -0,0 +1,41 @@
<!--210610,200429-->
<h1>how to attack a moving target </h1>
july 8, 2021<br>
#ai #character #combat #design #movement <br>
<br>
Househunting has been unexpectedly time-consuming, but I'll share the tentative design for the attack-movement loop. Hopefully now that an offer was accepted, I'll find some time to iron out the design before packing and moving begins. <br>
<br>
The attack-movement loop needs to allow the character maintain attack range while attacking. The flow is complicated to follow, but this is how it works for now: <br>
<center><a target="_blank" href="/static/img/ent/attack-movement-loop-diagram.png">
<img src="/static/img/ent/attack-movement-loop-diagram.png" alt="(image: diagram of the attack movement loop)" width="500" height="233">
</a><br></center>
The code is color-coded by object. Warm gray is input, orange is the character's action module, yellow is the character, yellow-green is the character's equipment module, blue-green is the attack handler, blue is the AI's attack module, purple is the AI's movement module, pink is the AI, brown is the KnowledgeBase's MessageBus, and cool gray is the character's kinematic body. <br>
<br>
<h2>the loop explained </h2><br>
Upon attack input, the character sets up for attacking and creates an attack timer. On timeout, the character's weapon swings. If the character is out of range, the "out_of_range" signal is emitted. Otherwise, the weapon successfully swings, either emitting "target_dead" or "hit." <br>
<br>
The AI receives these signals. If the target was out of range, it sets up to follow attack target. <br>
<br>
Every AI tick, it prompts the character to pathfind to the target then sets the character's velocity to the current_dot (the first node the character is trying to reach in path) minus the character's global_position. <br>
<br>
Every frame, the character's _process(delta) method calls move_and_collide with velocity * speed * delta. If the character's velocity isn't 0,0, the "moved" event is published to the Knowledge Base's MessageBus. <br>
<br>
The movement handlers are subscribed to "moved," and will emit signals if the character reached either the next waypoint (the target or the chosen goal point at the end of the path) or the current dot (the first point along the pathfinding between the character and the goal point). <br>
<br>
The AI receives these signals. If the next waypoint is reached, it's removed from the list of waypoints, the "arrived_at_attack_target" signal is emitted, and movement is cleared. <br>
<br>
Then the AI receives the "arrived_at_attack_target" signal and prompts the character to begin the attack all over again. <br>
<br>
<h2>in-game </h2><br>
It works in-game, too, but it's pretty janky, especially without animations. If the slime is slow enough, the player character attacks until it gets too far away, moves back in range, and continues attacking. If it's too fast, though, she never gets to attack and jitters constantly after the slime. <br>
<br>
Too fast: <br>
<center><img src="/static/img/ent/attack-follow.gif" alt="(image: Angel follows slime)"></center>
<br>
I'll work it out sooner or later, dependent on how hectic moving turns out to be. <br>
<br>
(By the way, that's my first gif recorded and edited entirely in ffmpeg. It's not pretty, but at least I could write my bash script without relying on copypasta code from forums this time. I was trying to follow the documentation website before, but it's unreadable. The man page is so much easier to understand and search through.) <br>
<br>
<br>
Last Updated July 10, 2021
<br>

@ -333,10 +333,11 @@ def fill_word_cloud(files):
tags.sort() tags.sort()
cloud = [] cloud = []
i = 0 i = 0
while i < 9: while i < 24:
top = max(set(tags), key = tags.count) if len(tags) > 0:
cloud.append(top) top = max(set(tags), key = tags.count)
tags[:] = [x for x in tags if x != top] cloud.append(top)
tags[:] = [x for x in tags if x != top]
i += 1 i += 1
return cloud return cloud
@ -425,7 +426,7 @@ def entry(page):
if not is_it_time(page): if not is_it_time(page):
return error404(404) return error404(404)
loc = 'diary/entries/' loc = 'diary/entries/'
info = {'css': 'feature', 'title': 'blessfrey - developer diary', 'year': find_year(), 'entry': prepare_diary_entry(page, loc), 'recommends': list_rec(page), 'articles': "Articles", 'latest': list_headlines(gather_and_sort(loc)[0:5]), 'page': page} info = {'css': 'feature', 'title': 'blessfrey - developer diary', 'year': find_year(), 'entry': prepare_diary_entry(page, loc), 'recommends': list_rec(page), 'articles': "Articles", 'latest': list_headlines(gather_and_sort(loc)[0:5]), 'tags': fill_word_cloud(curate_files(gather_files(loc))), 'page': page}
abs_app_dir_path = os.path.dirname(os.path.realpath(__file__)) abs_app_dir_path = os.path.dirname(os.path.realpath(__file__))
abs_views_path = os.path.join(abs_app_dir_path, 'views') abs_views_path = os.path.join(abs_app_dir_path, 'views')
TEMPLATE_PATH.insert(0, abs_views_path ) TEMPLATE_PATH.insert(0, abs_views_path )
@ -436,7 +437,7 @@ def entry(page):
def extra(page): def extra(page):
"""diary extra""" """diary extra"""
loc = 'diary/entries/extra/' loc = 'diary/entries/extra/'
info = {'css': 'feature', 'title': 'blessfrey - developer diary', 'year': find_year(), 'entry': retrieve_article(page, loc), 'recommends': list_rec(page), 'articles': "Articles", 'latest': list_headlines(gather_and_sort('diary/entries/')[0:5]), 'page': page} info = {'css': 'feature', 'title': 'blessfrey - developer diary', 'year': find_year(), 'entry': retrieve_article(page, loc), 'recommends': list_rec(page), 'articles': "Articles", 'latest': list_headlines(gather_and_sort('diary/entries/')[0:5]), 'tags': fill_word_cloud(curate_files(gather_files(loc))), 'page': page}
abs_app_dir_path = os.path.dirname(os.path.realpath(__file__)) abs_app_dir_path = os.path.dirname(os.path.realpath(__file__))
abs_views_path = os.path.join(abs_app_dir_path, 'views') abs_views_path = os.path.join(abs_app_dir_path, 'views')
TEMPLATE_PATH.insert(0, abs_views_path ) TEMPLATE_PATH.insert(0, abs_views_path )
@ -454,7 +455,7 @@ def tag(tagin, page):
loc = 'diary/entries/' loc = 'diary/entries/'
assert isinstance(tagin, str) assert isinstance(tagin, str)
assert isinstance(page, int) assert isinstance(page, int)
info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': find_year(), 'snippets': list_snippets(pull_tag(gather_and_sort(loc), tagin)), 'latest': list_headlines(gather_and_sort(loc)[0:5]), 'total': len(curate_files(gather_files(loc))), 'limit': 8, 'cluster': 3, 'page': page} info = {'css': 'diary', 'title': 'blessfrey - developer diary', 'year': find_year(), 'snippets': list_snippets(pull_tag(gather_and_sort(loc), tagin)), 'latest': list_headlines(gather_and_sort(loc)[0:5]), 'tags': fill_word_cloud(curate_files(gather_files(loc))), 'total': len(curate_files(gather_files(loc))), 'limit': 8, 'cluster': 3, 'page': page}
return template('diary.tpl', info) return template('diary.tpl', info)
# Personal Page - Box Template # Personal Page - Box Template

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

@ -32,7 +32,7 @@
</div> </div>
<div class="wordcloud"> <div class="wordcloud">
<h1>tags</h1> <h1>cloud</h1>
% for t in tags: % for t in tags:
% tagless = t.replace('#','') % tagless = t.replace('#','')
<a href=/diary/tag/{{tagless}}>{{t}}</a> <a href=/diary/tag/{{tagless}}>{{t}}</a>

Loading…
Cancel
Save