I guess I appreciate this more than I explicitly enjoy it. Maybe the boxes could have gotten smaller over time? I am not sure if 500 or 1000 lines of code would have been the optimum gameplay-to-code punch this is aiming for.
Viewing post in Panel Curling jam comments
Thank you for your feedback! 😄
I think the idea of making the target smaller over time is really good, so I refactored the code a little, and now it fits into 500 characters too!
extends Node
var n=RigidBody2D.new()
var v=Vector2(20,20)
var r="position"
var w=0:
set(a):w=a;t.text="%s"%w
var t=Label.new()
func f(a,b=self):b.add_child(a)
func u(p=v,n=Area2D.new(),c=CollisionShape2D.new(),s=Tree.new()):c.shape=CircleShape2D.new();n[r]=p;s.size=v;f(c,n);f(s,n);n.body_entered.connect(func (j,b=600):n.scale*=.9;n.position=Vector2(randi()%b,randi()%b);w+=8);f(n)
func _init():n.gravity_scale=0;u(v,n);u();f(t)
func _input(e):if e.is_pressed():n.apply_force((e[r]-n[r])*9);w-=1