# march 2020: AI

april 1, 2021

## week 1, february 28 - march 6

#ai #webdev

### monday, march 1

- I went on a walk for 3 hours. Before social distancing, I used to walk everywhere every day. It's so unhealthy to be inside all the time.

### tuesday, march 2

- wrote articles for blessfrey.me
- I don't think I moved the new files to the server, so March 1's article might not have been up yesterday. Oops sorry.

### wednesday, march 3

- The server's timezone is so different from mine. It's 5 A.M. there and 11 P.M. here. I guess it's not a big deal, but it's confusing to see my March 4 article already up.
- editted articles
- Currently, the slime's state machine loop is to target, choose to attack, swing once, and decide whether to swing again. This means the attack speed is dependent on the AI's thinking speed. The physical act of attacking should be dependent on the character's body, not its mind. Instead, I want a pulse timer to determine the rate of swings. The body should be told to begin attacking, and the mind can tell it to stop.
- Instead of swinging, the character's attack method sets up a pulse timer with a wait time equal to the character's attack rate. (Later, it will be modified by the sum of attack-rate-modifying effects.) The swing method sends information back to the body + mind but will swinging on every timeout until told to stop. The stop method halts the timer.

### thursday, march 4

- Worked on the website.
- Webpages that used my minimal CSS file were broken for a few days. I finally fixed it. It was so simple - the global margins were set too high. I also made the news box on the homepage a little taller.
- Made the credits more compliant with Godot Engine's Complying with Licenses page.

### friday, march 5

- Developed an RSS feed for blessfrey.me's dev diary. It's served as a static file through Bottle right now. I wonder if that's okay. I'll need to test it later.

### saturday, march 6

- Going through lots of accounts and deciding which ones to begin using again + which ones to delete. I should use my Fediverse and GameDev.net more, update my Ko-Fi, and pretty up my itch.io. And of course I need to post on Twitter more... Everything else should probably be deleted.
- I had an Old School RuneScape account under the official blessfrey email? lol why
- When I get a working version of Blessfrey that has all the current features together again, I'll upload it to blessfrey.me and itch.io. It'd be nice to just have something up at all, even if it's not so great.
- I also should start seriously thinking about making videos, streams, podcasts, etc. I have lots of gamedev experience to draw from now that could make okay video essays + tutorials. I just...need to learn how to make videos. I wonder how much effort it would take to make one video a month? That wouldn't be a great gamedev channel, but just the idea of having videos sounds nice. Streaming would be easier once all the pretty scenes and channel art is set up. The format's better suited towards "watch me code"-style content, so I could probably stream more often than release videos. It's just awkward to explain what you're doing and make mistakes and read documentation live.
- Too bad the little-bitty streaming sites never stay around for long - I prefer streaming on the smaller, more engaged communities than on Twitch or Youtube any day. Rest in peace, my favorite stream sites.
- At the end of the day, I'm mostly looking to have fun. I don't really have anything I want to promote or sell right now, but I like talking to people about gamedev.

### monday, march 8

- Working on the attack loop. (In Blessfrey, you begin weapon attacking and stop attacking, instead of having to spam attack input. Attack tick is determined by the equipped weapon + keyword modifiers applied to the attacker.)

### friday, march 12

- Added a taskbox page to blessfrey.me. The HTML isn't working within the grid, and I probably want a grid per priority/completion level anyways, but it's fun to look at.
- Updated some other pages.

### saturday, march 13

- Attack loop is fixed. It yields in the proper places for the proper amount of time. The attacks communicate their results to the AI via signals.

### sunday, march 14 - Pi Day

- I mostly goofed off. I need to work on movement AI, patrol AI, equipment, barriers, teams, stats, and status effects before I can start working on the demo content. After movement + patrol AI are done, I'll release a playable snapshot on blessfrey.me.
- For the movement AI, it would be easier to test with a static NPC. (My slime keeps running around + attacking.) So...I added a target dummy NPC.
- He can take damage without dying and doesn't have an AI. He'll be more useful later if I can get him to calculate DPS, simulate different resistances, etc. For now, a boring old dummy is fine.

### friday, march 19

- worked on RSS feed again
- Looks like movement AI is good. Time for implementing a basic patrol for the slime.
- I don't really know where to start with patrols. It's difficult.
- I did something similar to patrol routes in the past. Time to look at Dodge the Creeps again. (I did this tutorial the first day I installed Godot years ago.)
- In DtC, monsters spawn from the edges of the screen. To do this, the tutorial uses a Path2D and a PathFollow2D.

### saturday, march 20

- Why am I worrying about making a pathfinding system so much when I already have one? The Knowledge Base (Blessfrey's achievement system) was designed for precisely these kind of problems: being able to identify granular tidbits of gameplay (breaking patrol routes into waypoints), track their completion (reaching a waypoint), and respond to progression (identify next point and travel to it). Since anything can subscribe to patrol-related events, I could even do things like have a guy notice his buddy never reached Point B and go searching for him.

### friday, march 26

- Added a "Forgot" feature to the KnowledgeBase to support cyclical events (like slime patrols)

### saturday, march 27

- Added patrols to slime, but it doesn't work yet

### sunday, march 28

- Game runs again. Maybe I need to refactor movement.

### monday, march 29

- Refactored character movement.

### tuesday, march 30

- Completed the main story in Arcanum. I played as Mis'ror, the Elf débutante with summoning magic.

Last Updated: April 26, 2021