This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from fnmatch import fnmatch | |
import os | |
from pathlib import Path | |
import zipfile | |
def build_apworld(world_name: str, ignore: list[str] = ["*__pycache__/*", "*.gitignore"], directory: str = "worlds"): | |
world_directory = Path(directory, world_name) | |
with zipfile.ZipFile(f"output/{world_name}.apworld", "w", zipfile.ZIP_DEFLATED, compresslevel = 9) as zf: | |
paths = world_directory.rglob("*.*") | |
for path in paths: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code can be used freely under CC0 1.0 license. | |
extends Node2D | |
## How wide and deep the playing area is. | |
@export var grid_size := Vector2i(8, 16) | |
## The visual size of the blocks in pixels. | |
@export var cell_size := Vector2(32, 32) | |
## How many blocks / second the current block falls. | |
@export var block_speed : float = 5.0 | |
## How long the block can be on ground until it sticks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
shader_type canvas_item; | |
render_mode blend_mix; | |
uniform sampler2D palette; | |
void fragment() | |
{ | |
vec3 source_col = texture(TEXTURE, UV).rgb; | |
vec3 closest_col = vec3(0.0); | |
float smallest_error = 10.0; |