Merge #31: intro speakers and conversations
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
fe08f6602c
8 changed files with 286 additions and 6 deletions
|
|
@ -6,8 +6,8 @@ extends RefCounted
|
|||
## sketched outlines (each edge drawn twice, slightly off, overshooting its corners), painted
|
||||
## fills (a flat color, a lighter dab, a darker rim), and painted icons for the weapons, the
|
||||
## materials, the backpack, the sun and moon, the scarecrow's portrait, what thieves take (crops,
|
||||
## animals, supplies), and the enemies; and the morning screen's wooden sign (planks, a nailed
|
||||
## sheet of paper, leaves). Every wobble comes from a hash of a seed, so a shape is drawn the
|
||||
## animals, supplies), the enemies, and the farmer and his wife (talking heads); and the morning
|
||||
## screen's wooden sign (planks, a nailed sheet of paper, leaves). Every wobble comes from a hash of a seed, so a shape is drawn the
|
||||
## same way each frame (no flicker).
|
||||
## Icons are designed in a 100 x 100 box and scaled to the rect they're drawn in.
|
||||
|
||||
|
|
@ -39,7 +39,7 @@ const LEAF := Color(0.42, 0.64, 0.22)
|
|||
## EnemySystem.TYPE_NAMES, and these.
|
||||
const ICONS: Array[String] = ["pitchfork", "corn_shooter", "pumpkin_bomb", "potato_cannon", "shurikens",
|
||||
"propane_torch", "alien_ray", "wood", "scrap", "straw", "alien_goop", "backpack", "sun", "moon", "portrait",
|
||||
"crops", "animals", "supplies", "crow", "thief", "breaker", "ufo"]
|
||||
"crops", "animals", "supplies", "crow", "thief", "breaker", "ufo", "farmer", "farmers_wife"]
|
||||
|
||||
static var _font: Font
|
||||
|
||||
|
|
@ -521,6 +521,85 @@ static func _icon(ci: CanvasItem, id: String) -> void:
|
|||
for i in 5:
|
||||
ci.draw_circle(Vector2(18.0 + i * 16.0, 57.0 + absf(i - 2.0) * -1.5), 3.6, Color(1.0, 0.86, 0.35))
|
||||
ci.draw_circle(Vector2(43, 38), 3.5, Color(1.0, 1.0, 1.0, 0.85))
|
||||
"farmer": # a round face under a straw hat, a big moustache
|
||||
var skin := Color(0.95, 0.73, 0.56)
|
||||
var straw := Color(0.93, 0.78, 0.4)
|
||||
var brown := Color(0.48, 0.31, 0.17)
|
||||
for k: float in [-1.0, 1.0]: # ears
|
||||
paint(ci, blob(Vector2(50.0 + 29.0 * k, 61.0), 6.0, 9.0, 291.0 + k), skin.darkened(0.08), 293.0 + k, 2.0)
|
||||
paint(ci, blob(Vector2(50, 60), 30.0, 30.0, 295.0, 0.03), skin, 296.0)
|
||||
for k: float in [-1.0, 1.0]:
|
||||
ci.draw_colored_polygon(blob(Vector2(50.0 + 17.0 * k, 68.0), 7.0, 5.0, 297.0 + k), Color(0.93, 0.4, 0.34, 0.35)) # sunburnt
|
||||
line(ci, Vector2(50.0 + 6.0 * k, 48.0), Vector2(50.0 + 18.0 * k, 47.0), brown, 3.5, 299.0 + k, 0.6)
|
||||
ci.draw_circle(Vector2(50.0 + 12.0 * k, 55.0), 3.4, INK)
|
||||
ci.draw_circle(Vector2(51.2 + 12.0 * k, 53.8), 1.1, Color.WHITE)
|
||||
paint(ci, blob(Vector2(50, 63), 6.5, 6.0, 301.0), skin.lerp(Color(0.88, 0.42, 0.36), 0.3), 302.0, 1.2) # nose
|
||||
var tache := _bezier(Vector2(24, 78), Vector2(34, 62), Vector2(50, 69), 8)
|
||||
tache.append_array(_bezier(Vector2(50, 69), Vector2(66, 62), Vector2(76, 78), 8).slice(1))
|
||||
tache.append_array(_bezier(Vector2(76, 78), Vector2(64, 77), Vector2(50, 78), 6).slice(1))
|
||||
tache.append_array(_bezier(Vector2(50, 78), Vector2(36, 77), Vector2(24, 78), 6).slice(1, -1))
|
||||
paint(ci, tache, brown, 303.0, 2.0)
|
||||
ci.draw_polyline(_bezier(Vector2(44, 81), Vector2(50, 85), Vector2(56, 81), 6), INK, 2.2, true) # a grin under it
|
||||
var top := _bezier(Vector2(30, 16), Vector2(38, 2), Vector2(50, 12), 8) # the crown, pinched at the top
|
||||
top.append_array(_bezier(Vector2(50, 12), Vector2(62, 2), Vector2(70, 16), 8).slice(1))
|
||||
paint(ci, _closed(top, [Vector2(72, 34), Vector2(28, 34)]), straw.darkened(0.05), 304.0)
|
||||
paint(ci, PackedVector2Array([Vector2(30, 20), Vector2(70, 19), Vector2(71, 28), Vector2(29, 29)]), Color(0.62, 0.2, 0.12), 305.0, 0.0) # the band
|
||||
paint(ci, blob(Vector2(50, 36), 48.0, 8.5, 306.0, 0.03, 32, -0.03), straw, 307.0) # the brim
|
||||
var weave := Color(straw.darkened(0.35), 0.7)
|
||||
for i in 8:
|
||||
var x := 10.0 + i * 11.5
|
||||
line(ci, Vector2(x, 33.0), Vector2(x + 4.0, 40.0), weave, 1.5, 308.0 + i, 0.4)
|
||||
for i in 3:
|
||||
line(ci, Vector2(38.0 + i * 12.0, 15.0 - absf(i - 1.0) * 4.0), Vector2(37.0 + i * 13.0, 19.0), weave, 1.5, 316.0 + i, 0.4)
|
||||
"farmers_wife": # curls under a straw sun hat with a flower in its ribbon
|
||||
var skin := Color(0.97, 0.78, 0.63)
|
||||
var hair := Color(0.7, 0.33, 0.15)
|
||||
var straw := Color(0.95, 0.82, 0.47)
|
||||
for i in 6: # curls down both sides, behind the face
|
||||
for k: float in [-1.0, 1.0]:
|
||||
var at := Vector2(50.0 + k * (28.0 + 2.5 * noise(331.0 + i + k * 7.0)), 42.0 + i * 8.0)
|
||||
paint(ci, blob(at, 8.5, 7.0, 333.0 + i * 2.0 + k, 0.08), hair, 345.0 + i * 2.0 + k, 2.0)
|
||||
paint(ci, blob(Vector2(50, 60), 24.0, 28.0, 357.0, 0.03), skin, 358.0)
|
||||
for k: float in [-1.0, 1.0]: # curls at the temples, over the face's edge
|
||||
paint(ci, blob(Vector2(50.0 + 22.0 * k, 47.0), 6.5, 5.5, 359.0 + k), hair.lightened(0.06), 361.0 + k, 1.5)
|
||||
ci.draw_colored_polygon(blob(Vector2(50.0 + 14.0 * k, 68.0), 6.0, 4.5, 369.0 + k), Color(0.95, 0.42, 0.45, 0.4)) # rosy
|
||||
var eye := Vector2(50.0 + 10.0 * k, 56.0)
|
||||
ci.draw_circle(eye, 3.2, INK)
|
||||
ci.draw_circle(eye + Vector2(1.0, -1.1), 1.0, Color.WHITE)
|
||||
for j in 3: # lashes
|
||||
var dir := Vector2.from_angle(-PI * 0.5 + k * (0.3 + 0.38 * j))
|
||||
line(ci, eye + dir * 3.0, eye + dir * 7.0, INK, 1.6, 371.0 + j * 2.0 + k, 0.3)
|
||||
ci.draw_polyline(_bezier(Vector2(51, 60), Vector2(46, 66), Vector2(52, 66), 6), skin.darkened(0.4), 2.0, true) # nose
|
||||
var lips := _bezier(Vector2(43, 73), Vector2(50, 71), Vector2(57, 73), 6)
|
||||
lips.append_array(_bezier(Vector2(57, 73), Vector2(50, 80), Vector2(43, 73), 6).slice(1, -1))
|
||||
paint(ci, lips, Color(0.84, 0.24, 0.26), 378.0, 1.5)
|
||||
var top := _bezier(Vector2(32, 20), Vector2(50, -2), Vector2(68, 20), 10) # the crown
|
||||
paint(ci, _closed(top, [Vector2(69, 36), Vector2(31, 36)]), straw.darkened(0.05), 379.0)
|
||||
paint(ci, PackedVector2Array([Vector2(33, 19), Vector2(67, 18), Vector2(68, 27), Vector2(32, 28)]), Color(0.38, 0.6, 0.86), 380.0, 0.0) # the ribbon
|
||||
paint(ci, blob(Vector2(50, 37), 49.0, 9.5, 381.0, 0.05, 32, -0.05), straw, 382.0) # the brim, a little tipped
|
||||
var weave := Color(straw.darkened(0.35), 0.7)
|
||||
for i in 8:
|
||||
var x := 9.0 + i * 11.5
|
||||
line(ci, Vector2(x, 34.0), Vector2(x + 4.0, 41.0), weave, 1.5, 383.0 + i, 0.4)
|
||||
var flower := Vector2(64, 23)
|
||||
leaf(ci, flower + Vector2(2, 2), 15.0, 0.4, 391.0)
|
||||
for j in 5:
|
||||
paint(ci, blob(flower + Vector2.from_angle(TAU * j / 5.0 - 0.3) * 5.5, 4.6, 4.6, 392.0 + j), Color(0.96, 0.42, 0.56), 397.0 + j, 1.2)
|
||||
ci.draw_circle(flower, 3.4, Color(1.0, 0.84, 0.3))
|
||||
|
||||
|
||||
## An open outline (pts) closed with straight edges through corners, in steps about 5 long, so
|
||||
## its points stay spread evenly (paint() places its lighter dab from their average).
|
||||
static func _closed(pts: PackedVector2Array, corners: Array[Vector2]) -> PackedVector2Array:
|
||||
var out := pts.duplicate()
|
||||
var path: Array[Vector2] = [pts[pts.size() - 1]]
|
||||
path.append_array(corners)
|
||||
path.append(pts[0])
|
||||
for i in path.size() - 1:
|
||||
var n := maxi(int(path[i].distance_to(path[i + 1]) / 5.0), 1)
|
||||
for j in range(1, n + 1 if i < path.size() - 2 else n): # (not pts[0] again)
|
||||
out.append(path[i].lerp(path[i + 1], float(j) / n))
|
||||
return out
|
||||
|
||||
|
||||
## Points along a circle (center c, radius r) between where it crosses another circle (o, ro),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue