Katas in Technology

Table of Contents

1. Intro

I create katas for different technology to improve my memory and execution speed. I log my results and make adjustments based on my performance and goals. I research different approaches to problems to see if I want to create new katas.

2. Research

2.1. [2021-08-16 Mon] FastAPI + SQLAlchemy

I spent time this last weekend researching SQLAlchemy. I had some learning blocks, it was notably more difficult for me to pick up than the previous topics (FastAPI and Pydantic). After reviewing a different doc, I've been able to create a new kata.

from typing import List

import databases
import sqlalchemy
from fastapi import FastAPI
from pydantic import BaseModel

DATABASE_URL = "sqlite:///test.db"

database = databases.Database(DATABASE_URL)

metadata = sqlalchemy.MetaData()

people = sqlalchemy.Table(
    "people",
    metadata,
    sqlalchemy.Column("id", sqlalchemy.Integer, primary_key=True),
    sqlalchemy.Column("name", sqlalchemy.String),
    sqlalchemy.Column("age", sqlalchemy.Integer)
)

engine = sqlalchemy.create_engine(
    DATABASE_URL, connect_args={"check_same_thread": False}
)
metadata.create_all(engine)


class PersonIn(BaseModel):
    name: str
    age: int

class Person(BaseModel):
    id: int
    name: str
    age: int

app = FastAPI()

@app.on_event("startup")
async def startup():
    await database.connect()

@app.on_event("shutdown")
async def shutdown():
    await database.disconnect()

@app.get("/people/", response_model=List[Person])
async def read_people():
    query = people.select()
    return await database.fetch_all(query)

@app.post("/people/", response_model=Person)
async def create_person(person: PersonIn):
    query = people.insert().values(name=person.name, age=person.age)
    last_record_id = await database.execute(query)
    return {**person.dict(), "id": last_record_id}


FROM python:3.9
RUN pip install uvicorn fastapi SQLAlchemy databases[sqlite] 
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--reload"]

2.2. [2021-08-07 Sat] Godot Sprite Sheets

I tested working with sprite sheets. The case I tested had the sprite sheets separated by animation type (idle, walking, etc). It posed a challenge for both how to organize the graphics for reversing direction and how to manage animating the character as a whole.

I decided to create a Node2D to host the Sprite nodes. Each sprite represents a different animation. The animation player will trigger visibility to true for the sprite when initializing the animation. In the script, I hide the remainder of the sprites before starting the new animation.

Here is the code I used for organizing these features:

var facing_right := false
# $Sprites is a Node2D with Sprites as children
onready var sprites := $Sprites

# ...

# Flip the graphics
func _facing() -> void:
  if facing_right:
    sprites.scale.x = 1
  else:
    sprites.scale.x = -1

func hide_sprites() -> void:
  for x in sprites.get_children():
    x.visible = false

func play_animation(_ap: AnimationPlayer, anim: String) -> void:
  if not ap.current_animation == anim:
    hide_sprites()
    _ap.play(anim)

# Examples of switching animations
func _animations() -> void:
  if is_on_floor():
    if abs(motion.x) <  speedmod:
      play_animation(ap, "idle")
    else:
      play_animation(ap, "walking")

3. Katas

3.1. Godot

3.1.1. TileMap

  • Node2D
    • Sprite
      • StaticBody2D
        • CollisionShape2D
  • Drag art to sprite
  • Rect shape on Col2d 32x32
  • Sprite region
    • Enabled true
    • Modify rect
  • Scene
  • Convert To: TileSet

3.1.2. Sprite Sheet

  • Create a 2D Platformer Controller
    • Account for direction
    • Account for animation
  • Attach Sprite
  • Animate
    • Idle
    • Run
    • Jump
    • Fall
  1. v3.1

    Use git subtree instead of just cloning the repo.

  2. v3.0

    Create a TileSet instead of a Polygon2D for the platforms.

  3. v2.0
  4. v1.0

    Manually write the physics for the player controller from Platformer

3.1.3. Platformer

  1. v2.0
  2. v1.4

    Includes everything in v1.3.1 and Stretch Fader

  3. v1.3.1

    Update to shader, no longer need flash modifier.

  4. v1.3

    Includes everything in v1.2 and Blood Particle

  5. v1.2

    Includes everything in v1.1 and Flash Shader.

  6. v1.1

    Includes everything in v1.0 and HTTPRequest, Top Right Button, Bounce Jump and Bounce Land.

  7. v1.0

    In this kata I create a player and a platform. KinematicBody2D is used for the body and Polygon2D for the graphics. The player is green and the platform is white.

    The player gets a script handling movement, jumping, friction, and gravity.

    The kata is complete when you can move and jump on platforms with the player.

3.1.4. HTTPRequest

This is a shorter kata. I create a HTTPRequest node, attach its signal to a script, then make a GET request in _ready(). The listener script takes the response body, converts it to JSON and prints the result.

My goal for this kata is to familiarize myself with how Godot makes HTTP requests.

3.1.5. Top Right Button

Another short kata, this is for practicing responsive layout. I implement it using Control -> CanvasLayer -> Button and use the layout tools at the top of the IDE. Originally I used anchors but had difficulty dealing with transform mutations.

3.1.6. Bounce Jump

This is my first game juice kata. It involves adding an AnimationPlayer node to the Player scene. The animation for jumping is a tween on the scaling of the Player, therefore effecting the collision shape and the polygon graphics.

3.1.7. Bounce Land

This is my second game juice kata. This uses the AnimationPlayer and also is a tween on scale. Originally, I triggered this through a raycast. On [2021-07-16 Fri] I discovered I could accomplish this by just appropriately handling is_on_floor().

if !is_on_floor():
  ground = false

if is_on_floor():
  if !ground:
    ground = true
    animationPlayer.play("Land")

This could be improved further with a state machine. State machines will need their own katas.

3.1.8. Flash Shader

  1. Original Method

    The flash shader kata uses the AnimationPlayer and a shader material. Go to material and click canvas_material. Then click material again and click Convert to shader material. This gives us access to the script for modifying the shader.

    We will use the following for the script:

    shader_type canvas_item;
    
    vec4 flash_color : hint_color = vec4(1.0, 0.0, 0.0, 1.0);
    float flash_mod : hint_range(0.0, 1.0) = 1.0;
    
    void fragment() {
        vec4 color = texture(TEXTURE, UV);
        color.rgba = mix(color.rgba, flash_color.rbga, flash_mod);
        COLOR = color;
    }
    
  2. New Method

    It looks like canvas_item gives access to some basic shader values without having to script. I will experiment with this, this can save time from having to write bootstrap code for a simple flash shader.

    This turned out to not work out as well as I hoped. I will stick with the script method.

  3. Important

    Always remember to inherit the parent's material on any graphics that should have the shader effect.

3.1.9. Blood Spill Particle

This kata will use the Particles2D node. I'm going to summarize some steps here to produce the Blood Spill.

  1. Creating the Material

    Do Particles2D -> Processing Material -> (New ParticlesMaterial). This will create a single stream of particles falling down from the center of the Particles2D node.

  2. Color

    Choose Color -> Color Ramp, create a ramp and a gradient. The gradient will represent the blood's color over time. Start with a bright red, middle is dark red, end with opacity 0 to fade the blood out.

  3. Velocity

    By default, the velocity is 0 and the particles are falling because of gravity. Add velocity to make the blood shoot out, gravity will make the particles fall.

  4. Key Properties
    1. Time
      • Lifetime
      • Preprocess
      • One Shot
      • Explosiveness
    2. Drawing
      • Local Coords
    3. Process Material
      • Direction
      • Gravity
      • Initial Velocity
  5. One Shot Demo
    func _physics_process(delta: float) -> void:
    if Input.is_action_just_pressed("ui_accept"):
      emitting = true
    

3.1.10. Stretch Fade

This will play an animation that will stretch the transform and fade the material. Once completed, it will removed the object from the scene.

3.2. Python

3.2.1. Kaggle

  1. CRW: Create, Read and Write
  2. ISA: Index, Select and Assign
  3. SFM: Summary Functions and Maps
  4. GS: Grouping and Sorting
  5. DMV: Dtype and Missing Values
  6. RC: Renaming and Combining

3.2.2. FastAPI + SQLAlchemy

  1. v1.1 - Splitting the files
    # db.py
    import databases
    import sqlalchemy
    DB_URL = 'sqlite:///test.db'
    
    db = databases.Database(DB_URL)
    
    metadata = databases.MetaData()
    
    engine = sqlalchemy.create_engine(DB_URL, connect_args={"check_same_thread": False})
    metadata.create_all(engine)
    
    # models.py
    from pydantic import BaseModel
    
    class PersonIn(BaseModel):
        name: str
        age: int
    
    class Person(BaseModel):
        id: int
        name: str
        age: int
    
    # models.py 
    from sqlalchemy import Table, Column, Integer, String
    from .db import metadata
    
    people = Table(
        "people",
        metadata,
        Column("id", Integer, primary_key=True),
        Column("name", String),
        Column("age", Integer)
    )
    
  2. v1.0
    FROM python:3.9
    RUN pip install uvicorn fastapi SQLAlchemy databases[sqlite] 
    CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--reload"]
    
    from typing import List
    
    import databases
    import sqlalchemy
    from fastapi import FastAPI
    from pydantic import BaseModel
    
    DATABASE_URL = "sqlite:///test.db"
    
    database = databases.Database(DATABASE_URL)
    
    metadata = sqlalchemy.MetaData()
    
    people = sqlalchemy.Table(
        "people",
        metadata,
        sqlalchemy.Column("id", sqlalchemy.Integer, primary_key=True),
        sqlalchemy.Column("name", sqlalchemy.String),
        sqlalchemy.Column("age", sqlalchemy.Integer)
    )
    
    engine = sqlalchemy.create_engine(
        DATABASE_URL, connect_args={"check_same_thread": False}
    )
    metadata.create_all(engine)
    
    
    class PersonIn(BaseModel):
        name: str
        age: int
    
    class Person(BaseModel):
        id: int
        name: str
        age: int
    
    app = FastAPI()
    
    @app.on_event("startup")
    async def startup():
        await database.connect()
    
    @app.on_event("shutdown")
    async def shutdown():
        await database.disconnect()
    
    @app.get("/people/", response_model=List[Person])
    async def read_people():
        query = people.select()
        return await database.fetch_all(query)
    
    @app.post("/people/", response_model=Person)
    async def create_person(person: PersonIn):
        query = people.insert().values(name=person.name, age=person.age)
        last_record_id = await database.execute(query)
        return {**person.dict(), "id": last_record_id}
    
    
    

3.2.3. pydantic

  • Create a class with id and name, preset name to 'Ric'

    from pydantic import BaseModel
    
    class User(BaseModel):
        id: int
        name = 'Ric'
    
  • Instantiate class with valid dictionary, omitting the name

    data = {'id': 7}
    user = User(**data)
    
  • Catch exception of invalid data and print JSON

    from pydantic import ValidationError
    
    bad_data = {'name': 'Error'}
    
    try:
        User(**bad_data)
    except ValidationError as e:
        print(e.json())
    

3.2.4. FastAPI + Requests

Create FastAPI through docker then make a GET and POST request to it through requests

3.2.5. FastAPI

This is a kata for creating a container in docker for FastAPI using a Dockerfile and docker-compose.yml for local development. There are three pieces to this kata:

  • Dockerfile
FROM python:3.9
RUN pip install fastapi uvicorn
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "80", "--reload"]
  • docker-compose.yml
version: '3.9'
services:
  inventory_api:
    build: .
    container_name: inventory_api
    ports: 
      - "9017:80"
    volumes:
      - ./app:/app
  • Python code
from fastapi import FastAPI

app = FastAPI()

@app.get("/")
def index():
    return {"message": "testing this out"}

3.2.6. Requests

  1. v1.1.0

    Combine both GET and POST katas.

  2. v1.0.0
    1. Make a GET request to a service. Read the status_code and json()
    2. Make a POST request with JSON

      {
          "jids": [
              "j-GEO-30916"
          ],
          "startDate": "2021-06-30 12:00:00",
          "endDate": "2021-07-03 11:59:00"
      }
      

4. Log

4.1. [2021-10-03 Sun]

4.1.1. Python

  • [X] Kaggle.CRW
    • 0:02:09
  • [X] Kaggle.ISA
    • 0:02:48
  • [X] Kaggle.SFM
    • 0:03:27
  • [X] Kaggle.GS
    • 0:02:47
  • [X] Kaggle.DMV
    • 0:01:29
  • [X] Kaggle.RC
    • 0:02:30
      • pd.concat([df1, df2]) –> remember that is accepts an array

4.2. [2021-09-30 Thu]

4.2.1. Godot

  • [X] State Machine (dev)
    • I updated my State Machine code, I am familiar with the process now.
    • I need to make a Platformer2DController
      • Extends KinematicBody2D
      • Requires AnimationPlayer
      • Requires Sprite
    • Then I can make a Platformer2DStateMachine
      • Has Platformer2DController as a parent.

4.2.2. Python

  • [X] Kaggle.CRW
    • 0:02:15 (capped)
  • [X] Kaggle.ISA
    • 0:03:24 (capped)
  • [X] Kaggle.SFM
    • 0:03:14 (capped)
  • [X] Kaggle.GS
    • 0:03:47
      • size().sort_values()
      • Still improveable
  • [X] Kaggle.DMV
    • 0:03:48
      • fillena(…).valuecounts()
      • Improveable
  • [X] Kaggle.RC
    • 0:03:10
      • Leaned heavily on notes
      • pd.concat([df1, df2])
      • df1.setindex("idx").join(df2.setindex("idx"))

4.3. [2021-09-28 Tue]

4.3.1. Godot

4.3.2. Python

  • [X] Kaggle.CRW
    • 0:02:30 (capped)
  • [X] Kaggle.ISA
    • 0:03:29 (capped)
  • [X] Kaggle.SFM
    • 0:03:36
  • [X] Kaggle.GS
    • 0:04:02
      • size().sortvalues
  • [X] Kaggle.DMV
    • 0:02:02
      • astype(…)
  • [X] Kaggle.RC (first time)
    • Book broke mid-run on CSV import, no score.

4.4. [2021-09-27 Mon]

4.4.1. Godot

4.4.2. Python

  • [X] Kaggle.CRW
    • 0:02:49
  • [X] Kaggle.ISA
    • 0:03:41
  • [X] Kaggle.SFM
    • 0:04:55
      • axis="columns" for apply
  • [X] Kaggle.GS
    • 0:05:27
      • groupby
      • sortvalues
  • [X] Kaggle.DMV
    • 0:03:29
  • [X] Kaggle.RC - Lesson
  • [X] Kaggle.RC - Exercise

4.5. [2021-09-24 Fri]

4.5.1. Godot

4.5.2. Python

  • [X] Kaggle.CRW
    • 0:03:37
  • [X] Kaggle.ISA
    • 0:04:45
  • [X] Kaggle.SFM
    • 0:06:21
  • [X] Kaggle.GS
    • 0:05:38
  • [X] Kaggle.DMV Study
  • [X] Kaggle.DMV Exercise

4.6. [2021-09-23 Thu]

4.6.1. Godot

  • [X] State Machine Study
    • Learned about _get_configuration_warning() -> String for creating custom UI warnings.

4.6.2. Python

  • [X] Kaggle.GS (first time)
    • 0:07:19
  • [X] Kaggle.GS
    • 0:05:20

4.7. [2021-09-22 Wed]

4.7.1. Godot

  • [ ] State Machine Study
    • I didn't make time for this today.

4.7.2. Python

  • [X] Kaggle.GS Study

4.8. [2021-09-21 Tue]

4.8.1. Godot

  • [X] State Machine Study

4.8.2. Python

  • [X] Kaggle.GS Study

4.9. [2021-09-20 Mon]

4.9.1. Godot

  • State Machine kata design.

4.9.2. Python

  • [X] Kaggle.ISA
    • 0:03:43
  • [X] Kaggle.SFM
    • 0:06:09

4.10. [2021-09-19 Sun]

4.10.1. Godot

  • Still designing the State Machine kata.

4.10.2. Python

  • [X] Kaggle.CRW
    • 0:04:05
  • [X] Kaggle.ISA
    • 0:03:53
  • [X] Kaggle.SFM (first time)
    • 0:08:02

4.11. [2021-09-17 Fri]

4.11.1. Python

  • [X] Kaggle.CRW (first time)
    • 0:03:18
  • [X] Kaggle.ISA (first time)
    • 0:07:56

4.12. [2021-09-14 Tue]

4.12.1. Notes

I will need to begin a new, scheduled regime for handling my katas.

4.13. [2021-09-13 Mon]

4.13.1. Notes

Today I need to design new katas. I have peaked in the following:

  • Godot > Sprite Sheet
  • Python > FastAPI + SQLAlchemy

For Godot I need to work on new practical skills. I think I can invest time in the following:

  • State Machine
  • Enemies + Behaviors
  • Attacks
    • Melee
    • Projectile

For Python I have a new resource for practicing Pandas. There is a course on Kaggle with practice questions and I can reset the books that contain the work. I can create a kata for each book:

  • Create Read Write (CRW)
  • Index Select Assign (ISA)
  • Summary Functions and Maps (SFM)
  • Group and Sort (GS)
  • Renaming and Combining (RC)

4.14. [2021-09-10 Fri]

4.14.1. Godot

  • [X] Sprite Sheet v3.1
    • 0:08:32

4.14.2. Python

  • [X] FastAPI + SQLAlchemy -0:09:40

4.15. [2021-09-03 Fri]

4.15.1. Godot

  • [X] Sprite Sheet v3.1
    • 0:07:12

4.15.2. Python

  • [X] FastAPI + SQLAlchemy
    • 0:08:46

4.16. [2021-09-02 Thu]

4.16.1. Godot

  • [X] Sprite Sheet v3.1
    • 0:07:51

4.16.2. Python

  • [X] FastAPI + SQLAlchemy
    • 0:10:07 error with await for ID.

4.17. [2021-08-30 Mon]

4.17.1. Godot

  • [X] Sprite Sheet v3.1
    • 0:08:07 PR'd, not sure what to improve. May be capped.

4.17.2. Python

  • [X] FastAPI + SQLAlchemy
    • 0:07:58 might be capping soon.

4.18. [2021-08-29 Sun]

4.18.1. Godot

  • [X] Sprite Sheet v3.1
    • 0:10:02

4.18.2. Python

  • [X] FastAPI + SQLAlchemy
    • 0:09:44

4.19. [2021-08-27 Fri]

4.19.1. Godot

  • [X] Sprite Sheet v3.1 (first time)
    • 0:11:46 Need git commit before adding subtree

4.19.2. Python

  • [ ] FastAPI + SQLAlchemy

4.20. [2021-08-26 Thu]

4.20.1. Godot

  • [X] Sprite Sheet v3.0
    • 0:08:17

4.20.2. Python

  • [X] FastAPI + SQLAlchemy
    • 0:09:10

4.21. [2021-08-24 Tue]

4.21.1. Godot

  • [X] Sprite Sheet v3.0 (First time)
    • 0:08:10 Felt smooth.
    • 0:10:11

4.21.2. Python

  • [X] FastAPI + SQLAlchemy
    • 0:09:21
    • 0:10:28

4.22. [2021-08-23 Mon]

4.22.1. Godot

  • [X] Sprite Sheet v1.2
    • 0:07:48

4.22.2. Python

  • [X] FastAPI + SQLAlchemy
    • 0:12:36 putting the metadata.create_all(engine) in the startup method make it recognize people.

4.23. [2021-08-22 Sun]

4.23.1. Godot

  • [X] Sprite Sheet v2.0
    • 0:09:15
  1. Notes

    I'm comfortable with this process, I'll need to branch out into new territory:

    • Tile Map
    • Enemies
    • Projectiles
    • Melee Attacks
    • UI
    • Level transitions
    • Touch Controls
    • Camera Settings

4.23.2. Python

  • [X] FastAPI + SQLAlchemy
    • 0:10:57
    • 0:08:27
  1. Notes

    There was an issue with the people table being created. I think this was due to a new DB file and my previous attempts at this kata actually preserved the DB file between attempts. metadata.create_all(engine) is supposed to take care of this. I'll work on why it's giving me issues.

    The good news is, this process is familiar now. I wouldn't call it comfortable yet, I can still improve my speed.

4.24. [2021-08-18 Wed]

4.24.1. Godot

  • [X] Sprite Sheet v2.0
    • 06:17

4.24.2. Python

  • [X] FastAPI + SQLAlchemy
    • 09:08
    • 08:24

4.25. [2021-08-17 Tue]

4.25.1. Godot

  • [X] Sprite Sheet v2.0
    • 07:06

4.25.2. Python

  • [X] FastAPI + SQLAlchemy
    • 18:44 many typos. I need to practice this many times.

4.26. [2021-08-14 Sat]

4.26.1. Notes

  • I'm retiring the Platformer kata in favor of the Sprite Sheet kata.
  • Today is the last day for FastAPI + Requests. It will be replaced with a kata including SQLAlchemy.

4.26.2. Godot

  • [X] Sprite Sheet v2.0
    • 09:11 distracted. Don't need to override _gravity(). Just need _anim(), _physics_process(delta: float), _facing().

4.26.3. Python

  • [X] FastAPI + Requests
    • 03:03

4.27. [2021-08-13 Fri]

4.27.1. Godot

  • [X] Platformer v2.0
    • 6:44
  • [X] Sprite Sheet v2.0
    • 6:32

4.27.2. Python

  • [X] FastAPI + Requests
    • 3:00

4.28. [2021-08-12 Thu]

4.28.1. Godot

  • [X] Platformer v2.0 (first time)
    • 09:46 felt awkward. Room to grow.
  • [X] Sprite Sheet v2.0 (first time)
    • 09:15 don't need to call ._physics_process(delta) twice.
  1. Notes

    Need to correct the comment error.

4.28.2. Python

  • [X] FastAPI + Requests
    • 05:00 funny error, I put 9017 in the Dockerfile port instead of 80. Hillarious.

4.29. [2021-08-11 Wed]

4.29.1. Godot

  • [X] Platformer v1.4
    • 11:08 many typos.
  • [X] Sprite Sheet
    • 10:26

4.29.2. Python

  • [X] FastAPI + Requests
    • 5:00 invalid binding

4.30. [2021-08-09 Mon]

4.30.1. Godot

  • [X] Platformer v1.4
    • 11:21 experimented with using $ap instead of onready var ap := $ap
  • [X] Sprite Sheet
    • 10:01

4.30.2. Python

  • [X] FastAPI + Requests
    • 2:59

4.31. [2021-08-08 Sun]

4.31.1. Godot

  • [X] Platformver v1.4
    • 11:00
  • [X] Sprite Sheet
    • 11:21

4.31.2. Python

  • [X] FastAPI + Requests
    • 3:06

4.32. [2021-08-07 Sat]

4.32.1. Godot

  • [X] Platformer v1.4
    • 10:55
  • [X] Sprite Sheet (new)
    • 15:09
      • Remember _facing() and _animations() in _physics... call
      • Remember to reimport the graphics correctly to remove filter

4.32.2. Python

  • [X] FastAPI + Requests (new)
    • 3:01
  1. Research
    • [ ] numpy
    • [ ] pandas

4.33. [2021-08-06 Fri]

4.33.1. Notes

I need to develop new katas for both Godot and Python and move out of my comfort zone. Here are some ideas:

  • Godot
    • Attacks
    • Importing Graphics from sprite sheets
    • Update platformer to incorporate direction
    • More UI
  • Python
    • numpy mod GML data
    • pandas mod GML data

4.33.2. Godot

  • [X] Platformer v1.4 (first time)
    • 10:46

4.33.3. Python

  • [X] FastAPI
    • 01:37 capped.
  • [X] Requests v1.1.0 (first time)
    • 01:20

4.34. [2021-08-05 Thu]

4.34.1. Godot

  • [X] Platformer v1.3.1
    • 10:33
  • [X] Stretch Fader
    • 01:09 incorporating into next Platformer version.

4.34.2. Python

  • [X] FastAPI
    • 01:38
  • [X] GET Request
    • 00:22
  • [X] POST Request
    • 01:11

4.35. [2021-08-04 Wed]

4.35.1. Godot

  • [X] Platformer v1.3.1
    • 09:49
  • [X] Stretch Fader
    • 01:18. This is fairly simple at this point.

4.35.2. Python

  • [X] FastAPI
    • 01:45
  • [X] GET Request
    • 00:22. Capped.
  • [X] POST Request
    • 01:06. Can improve the typing of JSON object.

      {"jids": ["j-GEO-30916"], "startDate": "2021-06-20", "endDate": "2021-06-21"}
      
  1. Notes

    GET Request and POST Request should incorporate other pieces since they are so fast. Some ideas:

    • A class definiton in python
    • Using numpy or pandas on the POST dat
    • Creating a v3api gml tool
      • Class definition
      • POST request
      • numpy or pandas for modifying the data

4.36. [2021-08-03 Tue]

4.36.1. Godot

  • [X] Platformer v1.3.1 (first time)
    • 11:42
  • [X] Stretch Fader
    • 01:45. Used ui_up to trigger the death animation instead of Area2D

4.36.2. Python

  • [X] FastAPI
    • 02:06. This is capped, really.
  • [X] GET Request (developing)
    • 00:29. This is trivial, will probably drop.
  • [X] POST Request (developing)
    • 01:06. Took several iterations ot make work.
      • I need to remember the JID: j-GEO-30916 to practice.
      • I need to use 2021-06-20
      • To pass data to requests.post I need to pass the parameter json, not data

4.37. [2021-08-02 Mon]

4.37.1. Godot

  • [X] Platforomer v1.3 (first time)
    • Didn't start timer
  • [X] Stretch Fader (developing)
    • 3:56
      • Created animation
      • Created Area2D for triggering
      • Learned that I don't need a Flash Modifier for creating the flash anim, can work straight from color.

        uniform vec4 fc : hint_color = vec4(1.0);
        

4.37.2. Python

  • [ ] FastAPI
  • [ ] Requests GET (developing)
  • [ ] Requests POST (developing)
  1. I didn't get to these.

4.38. [2021-08-01 Sun]

4.38.1. Notes

Had a nice vacation with Bups for her bday. Running through last weeks katas one more time before expanding them.

I will be developing new python katas. I have them documented on my phone's scratch org.

Godot Platformer 1.x series will get two more updates:

  1. Stretch Fade
  2. Screen Shake

I will develop both of those katas then look into "deeper features" for katas. Deeper features I'm considering:

  • Multiplayer
  • Melee attack
  • Projectile attack
  • State machine

4.38.2. Godot

  • [X] Platformer v1.2
    • 9.25
  • [X] Blood Spill Particle
    • 0:43

4.38.3. Python

  • [X] FastAPI
    • 2:00 This is all typing speed at this point.

4.39. [2021-07-30 Fri]

4.39.1. Godot

  • [X] Platformer v1.2
    • 9:52
  • [X] Blood Spill Particle
    • 0:52

4.39.2. Python

  • [X] FastAPI
    • 1:47

4.40. [2021-07-29 Thu]

4.40.1. Godot

  • [X] Platformer v1.2
    • 9:36
  • [X] Blood Spill Particle
    • 0:55

4.40.2. Python

  • [X] FastAPI
    • 1:48

4.41. [2021-07-28 Wed]

4.41.1. Godot

  • [X] Platformer v1.2
    • 10:38
  • [X] Blood Spill Particle
    • 0:57

4.41.2. Python

  • [X] FastAPI
    • 1:57

4.42. [2021-07-27 Tue]

4.42.1. Godot

  • [X] Platformer v1.2
    • 11:00, did everything
  • [X] Blood Spill Particle
    • 1:13 pre one-shot

4.42.2. Python

  • [X] FastAPI
    • 1:52 with sloppy errors

4.43. [2021-07-26 Mon]

4.43.1. Godot

  • [X] Platformer v1.2 first time
    • 10:50, missed http
  • [X] Blood Spill Particle
    • 1:43 pre-oneshot
  1. Notes

    I can create a landing particle effect with oneshot, cool!

4.43.2. Python

  • [X] FastAPI
    • 2:13 error with --reload. I got the app.main:app part correct though for uvicorn

4.44. [2021-07-25 Sun]

4.44.1. Godot

  • [X] Platformer v1.1
    • 8:06 - nice!
  • [X] Flash Shader
    • 2:17 - no errors. Using sp instead of fp for ShaderPlayer
  1. Notes

    Today I'm going to design the Blood Spill Particle.

4.45. [2021-07-24 Sat]

4.45.1. Godot

  • [X] Platformer v1.1
  • [X] Flash Shader

4.46. [2021-07-23 Fri]

4.46.1. Godot

  • [X] Platformer v1.1
    • Didn't time, was walking through the steps with Buppi. When explaining, I rushed a few pieces. Interesting.
  • [X] Flash Shader
    • 2:18 no errors. I like to use ap for AnimationPlayer and fp for FlashPlayer. I may rename these to something that represents physical animation vs shader animation.

4.47. [2021-07-22 Thu]

4.47.1. Godot

  • [X] Platformer v1.1
    • 8:45
  • [X] Flash Shader
    • 2:46 but have an error. It was parent material. Strange, because the animation was working in the editor but not during play. Will work on that.

4.48. [2021-07-21 Wed]

4.48.1. Update

Godot Platformer kata is now going to include teh HTTPRequest, Top Right Button, Bounce Jump and Bounce Land in one kata called Platformer v1.1 where the previous iteration of Platformer can be considered v1.0.

4.48.2. Godot

  • [X] Platformer v1.1 (first time)
    • 11:09 Slower than expected. Forgot button! Also included an AnimationPlayer for Shader before other kata.
  • [X] Flash Shader
    • 2:48 I need to remember to inherit and use the correct color on materials.

4.49. [2021-07-20 Tue]

4.49.1. Godot

  • [X] Platformer
    • 5:57. Typos, capped.
  • [X] HTTPRequest
    • 1:06. Typos, capped.
  • [X] Top Right Button
    • 0:20. Capped.
  • [X] Bounce Jump
    • 1:17. Several typos, still fast. I rushed.
  • [X] Bounce Land
    • 0:56. PR'd.
  • [ ] Flash Shader first time
    • 5:19. Executed with separate animation player. Will research AnimationPlayerTree
      • Difficulties
        • Shader syntax (corect terms are hint_color and hint_range)
        • Selecting shader from animation player
        • Need better naming convention for two players
      • Thoughts
        • Plenty of room to improve!

4.50. [2021-07-19 Mon]

4.50.1. Godot

  • [X] Platformer
    • 5:19. This is capped.
  • [X] HTTPRequest
    • 0:49. This is capped.
  • [X] Top Right Button
    • 0:25. This is capped.
  • [X] Bounce Jump
    • 1:01. Capped?
  • [X] Bounce Land
    • 1:00. Capped?
  1. Notes

    Wow, major improvements across the board. Patting myself on the back for this one. I really need to work on new katas.

4.51. [2021-07-18 Sun]

4.51.1. Godot

  • [X] Platformer
    • 6:10 Mouse issues. I might throw my computer out. Nevermind, it was the mousepad. Disabled.
  • [X] HTTPRequest
    • 1:04 Capped I believe.
  • [X] Top Right Button
    • 0:49 I'm still angry about my mouse, causing careless errors slowing me down.
  • [X] Bounce Jump
    • 1:10
  • [X] Bounce Land
    • 1:20 many typos, still improvement.

4.52. [2021-07-17 Sat]

4.52.1. Godot

  • [X] Platformer
    • 5:42 Had some typos, consistent time with yesterday.
  • [X] HTTPRequest
    • 1:05 Had some time lost due to thoughts. Still an improvement.
  • [X] Top Right ButtonA
    • 0:24 I may be capping out on performance for this one.
  • [X] Bounce Jump
    • 1:07 There may be faster ways to keyframe.
  • [X] Bounce Land
    • 1:24 Hand some typos and keyframe errors.

4.53. [2021-07-16 Fri]

4.53.1. Godot

  • [X] Platformer
    • 5:41 Shaved 3 minutes off my initial clock-in on Monday.
  • [X] HTTPRequest
    • 1:12 Only 1 second difference from yesterday. Minute from Monday.
  • [X] Top Right Button
    • 0:26 Shaved 2.5 minutes since Monday
  • [X] Bounce Jump (new)
    • 1:41
  • [X]

    Bounce Land (new)

    • 1:38, no raycast!
    if !is_on_floor():
      ground = false
    
    if is_on_floor():
      if !ground:
        ground = true
        animationPlayer.play("Land")
    

4.54. [2021-07-15 Thu]

4.54.1. Godot

  • [X] Platformer
    • 6:24
  • [X] HTTPRequest
    • 1:13
  • [X] Top Right Button
    • 0:39
  • [X] Bounce Animations (experimental)
    • 3:05
      • Created jump and land animations
      • Added jump animation to player
      • For land I used raycast, I did not include this in the kata.
      • I should make a separate kata for raycast + landing animation.

4.55. [2021-07-14 Wed]

4.55.1. Godot

  • [X] Platformer
    • 6:57
  • [X] HTTPRequest
    • 2:26
  • [X] Top Right Button
    • 1:11 Used top controls. Pretty easy to work with
  1. Design New Katas
    • [X] Bouncy animation for jumping and landing. [2021-07-16 Fri]
    • [X] Flash shader. [2021-07-19 Mon]
    • [X] Blood spill particles. [2021-07-26 Mon]
    • [X] Stretch and fade (death) animation + shader. [2021-08-02 Mon]

4.56. [2021-07-13 Tue]

4.56.1. Godot

  • [X] Platformer
    • 6:42
  • [ ] HTTPRequest
  • [ ] Top Right Button

4.57. [2021-07-12 Mon]

4.57.1. Godot

  • [X] Platformer
    • 8:41
  • [X] HTTPRequest
    • 2:29
  • [X] Top Right Button
    • 3:02, caught up with CanvasLayer

Author: Ricardo Rodriguez

Created: 2021-10-04 Mon 07:31

Validate