From 8903ccb3119670d51c1baff71522503d013f4053 Mon Sep 17 00:00:00 2001 From: chimchooree Date: Sun, 31 Jul 2022 21:57:04 -0500 Subject: [PATCH] more diary --- src/diary/entries/220728 | 18 +- src/diary/entries/220811 | 123 +++++++---- src/diary/entries/220825 | 202 +++++++++--------- src/diary/entries/220922 | 40 ---- src/diary/entries/221006 | 33 --- src/diary/entries/221020 | 52 ----- src/diary/{entries => hold}/220908 | 17 +- src/diary/hold/230112 | 192 +++++++++-------- src/index.py | 2 +- src/static/css/all.css | 5 +- src/static/img/ent/oblivion_broken.png | Bin 0 -> 2059440 bytes .../img/ent/stoplight_animationframes.png | Bin 0 -> 9731 bytes .../img/ent/stoplight_demonstration.gif | Bin 0 -> 287928 bytes src/static/img/ent/stoplight_label.png | Bin 0 -> 37260 bytes src/static/img/ent/stoplight_main.png | Bin 0 -> 152979 bytes .../img/ent/stoplight_nodehierarchy.png | Bin 0 -> 9134 bytes src/static/img/ent/stoplight_screenshot.png | Bin 0 -> 124998 bytes .../Gator/tieredpanels.png | Bin 28142 -> 28877 bytes src/static/img/prom/rune+bless_mastodon.png | Bin 0 -> 206408 bytes src/views/demo.tpl | 4 +- 20 files changed, 311 insertions(+), 377 deletions(-) delete mode 100644 src/diary/entries/220922 delete mode 100644 src/diary/entries/221006 delete mode 100644 src/diary/entries/221020 rename src/diary/{entries => hold}/220908 (50%) create mode 100644 src/static/img/ent/oblivion_broken.png create mode 100644 src/static/img/ent/stoplight_animationframes.png create mode 100644 src/static/img/ent/stoplight_demonstration.gif create mode 100644 src/static/img/ent/stoplight_label.png create mode 100644 src/static/img/ent/stoplight_main.png create mode 100644 src/static/img/ent/stoplight_nodehierarchy.png create mode 100644 src/static/img/ent/stoplight_screenshot.png create mode 100644 src/static/img/prom/rune+bless_mastodon.png diff --git a/src/diary/entries/220728 b/src/diary/entries/220728 index 689ffd3..a6526b1 100644 --- a/src/diary/entries/220728 +++ b/src/diary/entries/220728 @@ -1,7 +1,7 @@ - +

everything's coming together: a new website

july 28, 2022
-#webdev
+#webdev

Everything's coming together. I've been learning a lot, and I'm finally ready to share my work.

(screenshot: Blessfrey homepage)
@@ -13,9 +13,9 @@ july 28, 2022

Of course, I'm not saying Blessfrey.me is great, I'm saying I'm not ashamed anymore. People with a harsh inner critic understand what a hurdle that is.


-

I'm going to take this somewhat professionally (I mean, I'm no business suit avatar "no offers under 100k" person), so I have a release schedule and content mix and everything. I'll get back on social media, too. All that pandemic news was hard to look at, but I miss seeing other people's projects and meeting fellow devs. My Twitter is @lilchimchooree, and I'll get on Mastodon, too, because we all know Twitter has so many issues.

+

I'm going to take this somewhat professionally (I mean, I'm no business suit avatar "no offers under 100k" person), so I have a release schedule and content mix and everything. I'll return to social media, too. All that pandemic news was hard to look at, but I miss seeing other people's projects and meeting fellow devs. My Twitter is @lilchimchooree, and my Mastodon is also lilchimchooree.


-

So please bookmark and visit every other Thursday (US time) for new articles! Also, message me on social media. I don't mind chatting.

+

So please bookmark and visit every other Thursday (US time) for new articles! Also, message me wherever. I don't mind chatting.


reassessing things

I never really had a plan for how to use this site and was generally copying other portfolios and blogs. Having your own website is really cool, though. Unless I'm somewhere else for a community, there's no reason for me to still be fussing with image hosting services or any kind of content management tool. My server, domain, and custom code should cover everything. It should be the easiest thing in the world to show people what I've been working on, too - just show them my website, duh.

@@ -24,19 +24,17 @@ july 28, 2022

First, I'm going to have embedded HTML5 applications. I'm not waiting for Blessfrey's first demo to do that, either. I'm making gamejam projects, prototypes, anything interesting, and slapping them right on the website. After all, a gamedev website should have games!


-

Second, I'm going to share programming and fashion projects. I used to have a separate fashion portfolio and a few blogs, but I was always struggling to match the guidelines for online content. It's more freeing to give myself a blank section of my general portfolio and a tenth of the blog to fill however I want. Some fashion designers like Kenneth D. King don't even organize their ideas into seasonal collections. The industry as a whole is reconsidering rigid expectations, replacing in-person runway shows with alternatives like direct meetings with the press, lookbooks of fashion photography, and short art films. Why shouldn't a fashion blogger re-evaluate her portfolio?

+

Second, I'm going to share programming and fashion projects. I used to have a separate fashion portfolio and a few blogs, but I was always struggling to match the guidelines for online content. It's more freeing to give myself a blank section of my general portfolio and a tenth of the blog to fill however I want. Some fashion designers like Kenneth D. King don't even organize their ideas into seasonal collections. The industry as a whole is reconsidering rigid expectations, replacing in-person runway shows with alternatives like direct press meetings, fashion photography lookbooks, and short art films. Why shouldn't a fashion blogger re-evaluate her portfolio?


-

Best practice says to be an SEO zombie laser-focused on a niche, but that conflicts with my own needs. I develop websites, games, programming projects, fashion projects, interior design projects, pixelart, writing, and more, and people in my life ask to see them. I want to work for actual people, not an algorithm.

+

Best practice says to be an SEO zombie laser-focused on a niche, but that doesn't make sense for me. I develop websites, games, programming projects, fashion projects, interior design projects, pixelart, writing, and more, and people in my life ask to see them. I want to work for actual people, not an algorithm.


technical journey

-

Blessfrey.me's needs are fairly simple - some static pages and a blog page. Blogging platforms are overkill for my purposes, and all those unused features would bog down the website at best and contribute to security vulnerabilities at worst. Also, they tend to collect private user information, and I don't want to be responsible for that right now. So I write and maintain this site from scratch.

-
-

It's plain fun to write my own platform. Besides, it just makes sense for my programming portfolio to be something I programmed.

+

Blessfrey.me's needs are fairly simple - some static pages and a blog page. Blogging platforms are overkill for my purposes, and all those unused features would bog down the website at best and contribute to security vulnerabilities at worst. Also, they tend to collect private user information, and I'd rather not be responsible for that right now. So I write and maintain this site from scratch. It's plain fun to write my own platform. Besides, it just makes sense for my programming portfolio to be something I programmed.


I always thought PHP developers were so cool as a kid, so Blessfrey.me was originally written in PHP. That didn't last long. I could compare pros and cons, but PHP was too unenjoyable to maintain. Its documentation is crazy, though. Each page has a comment section with 19-year-old posts criticising the language. So bizarrely negative and old!


-

Now I use Bottle, a Python micro web-framework, its built-in template engine SimpleTemplate, and raw HTML and CSS. It's deployed using Docker. Anything's more fun if I get to use Python.

+

Now I use Bottle, a Python micro web-framework, its built-in template engine SimpleTemplate, and HTML and CSS. It's deployed using Docker. Any embedded applications are probably HTML5 written in Godot Engine.


plans for the future

The website has plenty of room for improvement. It looks pretty wonky on mobile and tablets, and I've only been testing in Firefox and Chrome-based browsers. It's functional and has a decent amount of content, though, so I'd say it's a-okay to take out of maintenance mode for now.

diff --git a/src/diary/entries/220811 b/src/diary/entries/220811 index f6be89e..3d059c4 100644 --- a/src/diary/entries/220811 +++ b/src/diary/entries/220811 @@ -1,73 +1,112 @@ - +

coroutines in godot engine

-september 17, 2020
-#coroutines #godot #programming
+august 11, 2022
+#gamedev #coroutines #godotengine #programming #demo

-Coroutines are functions that, instead of running to completion, can yield until certain criteria are met. Godot Engine supports coroutines through yield ( Object object=null, String signal=""), resume, and the GDScriptFunctionState object.
+

Demonstrating coroutines in Godot Engine with a simple application.

+(screenshot: a simple tech demo with a stoplight and a walk button.)

-

why use a coroutine?

+

defining coroutines

+

Coroutines are functions that, instead of running to completion, yield until certain criteria are met. Godot Engine supports coroutines through yield(), resume(), and the GDScriptFunctionState object.


-Coroutines allow for scripted game scenarios that respond dynamically to the player and the changing game world. They let you bounce between functions, step-by-step, and respond to interruptions. This means functions can be automatically called at the completion of other functions, animations, player actions, in-game events, or timers. Add in interruptions and conditionals, and you have a tool for building a responsive game world.
+

why use a coroutine?

+

Coroutines allow for scripted game scenarios that respond dynamically to the player and the changing game world. They let you bounce between functions, step-by-step, and respond to interruptions. This means functions can be automatically called at the completion of other functions, animations, player actions, in-game events, or timers. Add in interruptions and conditionals, and you have a tool for building a responsive game world.


stoplight example

+

As a simple demonstration, I made a stoplight. Follow along with my code on GitLab.


-As a basic example of coroutines in Godot Engine, I made a stoplight. Follow along with my code on GitLab.
-
-In my example, the light changes every few seconds, going from green, yellow, then finally red. The light changes immediately if the Walk Button is pressed. This project demonstrates methods that can wait, resume, and be affected through player action.
+

The light changes every few seconds, going from green, yellow, then red. The light changes immediately if the walk button is pressed. This demonstrates that methods can wait for criteria (a timed duration in this case) to be met before resuming, and they can be influenced by player action.


-
(gif: demonstration)
-
-
-

how does it work?


+

how is it written?

node hierarchy

-
-(image: node hierarchy - Root is a node named Main. It's children are TextureRect BG, AnimatedSprite Stoplight, Sprite WalkButton, and a Label. Stoplight's child is a Sprite. WalkButton's child is a TextureButton.)
-
-
-I have a TextureRect background, an AnimatedSprite stoplight, a Sprite walk button with a TextureButton, and a label for displaying a timer. Since this is a simple example, most of the code is attached to the root. It's better to have code closer to where it's being used and to watch your separation of concerns in real projects, though.
+(screenshot: node hierarchy in the editor. Root is a node named Main. It's children are TextureRect BG, AnimatedSprite Stoplight, Sprite WalkButton, and a Label. Stoplight's child is a Sprite. WalkButton's child is a TextureButton.)
+

I have a TextureRect background, an AnimatedSprite stoplight, a Sprite walk button with a TextureButton, and a label for displaying a timer. Most of the code is attached to the root. It's better to have code closer to where it's being used and to mind your separation of concerns in real projects, though.


animation

-
-
(image: the AnimatedSprite Stoplight has 4 animations - default (which is no light), green, red, and yellow.)
-

-The light is changed by setting its animation to one of these options. Each is one-frame - just the stoplight with the one or none of the lights colored in.
+

The light is changed by setting its animation to one of these options. Each is one-frame - just the stoplight with the one or none of the lights colored in.

the code

-
This project has two scripts: Main.gd, which is attached to the root node, and Label.gd, which is attached to the Label.

-Main.gd - code available on GitLab
-
-(image: Main script.)
-
-
-Label.gd - code available on GitLab
-
-(image: Label script.)
-
+

Main.gd - available on GitLab

+
extends Node
+
+onready var stoplight = $Stoplight
+
+func _ready():
+	stoplight.play()
+
+	var result = wait(5, 'green')
+	$WalkButton/TextureButton.connect('pressed', result, 'resume', 
+		['interrupted on green'], CONNECT_ONESHOT)
+	yield(result, 'completed')
+
+	result = wait(5, 'yellow')
+	$WalkButton/TextureButton.connect('pressed', result, 'resume', 
+		['interrupted on yellow'], CONNECT_ONESHOT)
+	yield(result, 'completed')
+	
+	result = wait(5, 'red')
+	$WalkButton/TextureButton.connect('pressed', result, 'resume', 
+		['interrupted on red'], CONNECT_ONESHOT)
+	yield(result, 'completed')
+
+func wait(time, color):
+	print('waiting for: ' + color)
+	var result = yield(get_tree().create_timer(time), 'timeout')
+	if result:
+		print(result)
+	stoplight.animation = color
+	print('done: ' + color)
+
+func _on_completed():
+	print('completed')
+
+func _on_WalkButton_gui_input(event):
+	if event is InputEventMouseButton and event.pressed:
+		print ("Walk Button not functioning.")

+
+

Label.gd - available on GitLab

+
extends Label
+var time_start = 0
+var time_now = 0
+
+func _ready():
+	time_start = OS.get_unix_time()
+	set_process(true)
+
+func _process(delta):
+	time_now = OS.get_unix_time()
+	var elapsed = time_now - time_start
+	var minutes = elapsed / 60
+	var seconds = elapsed % 60
+	var str_elapsed = "%02d" % [seconds]
+	text = str(str_elapsed)


-

how the code works

-
-At _ready(), wait() is assigned to the GDScriptFunctionState result and is called for the first color, green. _ready() yields until the given function wait() is completed.
+

how does it work?

+

At _ready(), wait() is assigned to the GDScriptFunctionState result and is called for the first color, green. _ready() yields until wait() is completed.


-The wait method yields for the given amount of seconds then sets the stoplight to the given color.
+

The wait method yields for the given amount of seconds then sets the stoplight to the given color.


-At wait()'s completion, _ready() calls wait() for yellow, then red. Each is called one at a time, waiting for the color to complete before moving on.
+

At wait()'s completion, _ready() calls wait() for yellow, then red. Each is called one at a time, waiting for the color to complete before moving on.


interrupting the stoplight

+

The Wait Button interrupts the wait times between colors. Before _ready() yields, it connects the 'pressed' signal on the Wait Button.

+
+

If the Wait Button is clicked during wait()'s yield, the GDScriptFunctionState result resumes immediately, ignoring wait()'s yield timer. This time, result has a string arg "interrupted on green," so it will print the result, change the stoplight's color, then print "done: green." The wait method is complete, so _ready() resumes and calls wait() for the next color.


-The Wait Button interrupts the wait times between colors. Before _ready() yields, it connects the 'pressed' signal on the Wait Button.
-If the Wait Button is clicked during wait()'s yield, the GDScriptFunctionState result resumes immediately, ignoring wait()'s yield timer. This time, result has a string arg 'interrupted on green', so it will print the result, change the stoplight's color, then print 'done: green'. The wait method is complete, so _ready() resumes and calls wait() for the next color.
+

play it yourself

+

applications

+

The outcomes in this example can be swapped out with anything. I use coroutines in Blessfrey's skills to manage the flow of phases from activation, different phases of effects, cooldown, and interactions with any counters. I also use it in the basic weapon attack so the character continuously swings at the rate of his attack speed until he cancels, uses a skill, or moves. It could also be used for something like cars that stop and honk when the player walks in front of them then drive off once the path is clear. Anything influenced by other entities is a good coroutine candidate.


-The outcomes in this example can be swapped out with anything. I use coroutines in Blessfrey's skills to manage the flow of phases from activation, different phases of effects, cooldown, and interactions with any counters. I also use it in the basic weapon attack so the character continuously swings at the rate of his attack speed until he cancels, uses a skill, or moves. It could also be used for something like cars that stop and honk when the player walks in front of them then drive off once the path is clear.
+

Coroutines enable practical ways to improve the flow and interactivity of games, so practice the concept a lot!


-Coroutines enable lots of practical ways to improve the flow and interactivity of your game, so just keep experimenting.

-Last updated June 8, 2021
+Last updated July 31, 2022

diff --git a/src/diary/entries/220825 b/src/diary/entries/220825 index cfdd4ff..13d7c4a 100644 --- a/src/diary/entries/220825 +++ b/src/diary/entries/220825 @@ -1,117 +1,115 @@ - -

church girls + animal parade: a collection in two parts

-july 28, 2022
-#fashion #capsule-wardrobe #collection
+ +

gator swimsuit

+august 25, 2022
+#fashion #swimwear #design-process #animalparade

-

The pandemic drags everything out, so these two collections run together.

-(screenshot: Blessfrey homepage)
+

A swimsuit designed just for me.

+ + (photo: quick photo of the finished garment, hanging against my door.) +

-

two in one

-

I need new clothes for myself. -he two themes belong together. Meditating over the introspective and the expressive, hiding away and being open, the old and the new. They come bundled with transformational passages of Scripture. -he two themes belong together. Meditating over the introspective and the expressive, hiding away and being open, the old and the new. They come bundled with transformational passages of Scripture. -The pandemic drags everything out, so these two run together.

+

concept

+

Gator is part of Animal Parade, a collection that emphasizes the individualism of clothing. Every garment deserves special consideration, even basic undershirts, sleep masks, etc.


-

church girls

-

Church girls comes from my personal apparel history. Growing up, most of my clothes were the older girls from church's castaways. I retained a majority hand-me-down wardrobe through my post-graduation internship. I never felt embarrassed about it. Actually, I enjoyed looking unique, wearing nothing you could buy in a store. One lady told me I looked like I was from a different era. (Insult maybe, but I loved that.) Other hand-me-downs became so old they were once again on the cusp of a trend.

+

All the designs are named after important animals in my life. The swimsuit is named Gator because of the gator who lives in my swampy subdivision. I've seen him during walks. Absolutely unnerving.
+
+

design process

+

I haven't had a swimsuit for years and never like any in the store anyway. I browsed online catalogs in English and 日本語 and window-shopped everywhere in town, searching for both style and technical inspiration. I've never worked with active wear garments, so I studied the inside of nearly everything at Dick's Sporting Goods to understand the style elements, seams, and findings typical of swimsuits and active wear in general.


-

Many of my hand-me-downs were banished to the back of the closet as I got to buy my own clothes and participate in street fashion for the first time on a college campus. My outfits got very dainty with sheer and uncomfortable fabrics, complex layering, and a general lack of practicality. The pandemic knocked that out of me quickly, and I retreated back into my old, floppy, cotton hand-me-downs and stolen t-shirts from my husband. This time with the clothes, I was older and more aware of things. They became a symbol of neglect and pity. None of them were chosen by me or my parents, and many were from people I barely knew. I was well-dressed for the depressive, disassociative state of the world.

+

one-and-a-half-piece

+

The swimsuits that stood out to me were blurring the line between one-piece and two-piece. I can't find my old collage, but here's a quick one. Sorry for not remembering the source of the images.

+ + (collage: variety of swimsuits from online stores) +
+

I iterated over the concept in sketches a little.

+ + (sketch: a series of rough pencil croquis with different variations of two-pieces.) +
+

Ideas:

+