Welcome to johnbintz.com

Godot Learning - Part 5

Aug 05, 2019

Dialogue Boxes Part 2

Godot Learning - Part 4

Aug 03, 2019

Dialogue Boxes

Solving “Move RPG dialogue box to other end of screen to not hide player”

Krita script to turn off all Pencil layers

Aug 01, 2019

When working on my comic, I create a bunch of layers named Pencils where I do my cleaner pencil drawings overtop of my layouts, usually one layer per character or important prop. When I’ve finished inking (in another layer for each object) overtop of the Pencils layers, I hide all the Pencils layers. These can be nested pretty deep, and there can be a lot of them, and I’ve been wanting to expand my Python knowledge a bit, so here’s a little script (copypaste into the Scripter plugin editor pane) to turn them all off:

from krita import *

active = Krita.instance().activeDocument()
queue = [active.rootNode()]

while len(queue) > 0:
  node = queue.pop()
  if node:
    if node.name() == "Pencils":
      node.setVisible(False)
    for child in node.childNodes():
      queue.append(child)

active.refreshProjection()

Godot Learning - Part 3

Jul 30, 2019

Lunchtime Video: Branching Dialogue and Dynamic Events

Solution to “Clamp camera to max area of Map Scene”

Solution to “Fade to black when changing rooms”

Godot Learning - Part 2

Jul 29, 2019

Lunchtime video: Platform Game Tutorial

Game planning

I’m now thinking the game will be a walking simulator with QTE. No items, no stats, no tight action stuff, just dialog choices, exploration, and QTE. Should be pretty straightforward.

Solution to “Pixel size of Scene for Camera2D clamping”

This doesn’t take into account transforms on the Map or the MapContainer.

func get_map_max_size():
  var maxSize = Rect2(0,0,0,0)

  for node in $MapContainer/Map.get_children():
    # Object#is_class is like Ruby Object#is_a?.
    # if I used instances in the tree whose classes subclassed TileMap,
    # is_class will return true for those instances.
    if node.is_class("TileMap"):
      var mapSize = Transform2D(
        Vector2(node.cell_size.x, 0),
        Vector2(0, node.cell_size.y),
        Vector2()
      ) * node.get_used_rect().size

      maxSize = maxSize.expand(Vector2(mapSize.x, mapSize.y))

  return maxSize