much more logical phasing system
the old system wasn't random, but this makes things much more intuitive while not reducing the (interesting) emergent complexity. IMO
This commit is contained in:
parent
f1d959d8d9
commit
ce31680680
4 changed files with 53 additions and 2 deletions
20
board.gd
20
board.gd
|
@ -62,8 +62,26 @@ func add_pieces(piece: Array[Piece]):
|
|||
for p in piece:
|
||||
add_piece(p)
|
||||
|
||||
# here are the phases:
|
||||
# cardinal velocity
|
||||
# diagonal velocity
|
||||
# uhh that's it lol?
|
||||
# well, subphases: higher lvel magnitude moves first within a phase
|
||||
# TODO: maybe show these phases with the sun
|
||||
func do_step():
|
||||
for piece in pieces():
|
||||
var pieces_moving := pieces().filter(func(piece): return piece.lvel != Vector2i.ZERO)
|
||||
var pieces_cardinal := pieces_moving.filter(func(piece): return piece.lvel.x == 0 or piece.lvel.y == 0)
|
||||
var pieces_diagonal := pieces_moving.filter(func(piece): return piece.lvel.x != 0 and piece.lvel.y != 0)
|
||||
|
||||
var magnitude_sort := func(a: Piece, b: Piece):
|
||||
return a.lvel.length() < b.lvel.length()
|
||||
|
||||
pieces_cardinal.sort_custom(magnitude_sort)
|
||||
pieces_diagonal.sort_custom(magnitude_sort)
|
||||
|
||||
for piece in pieces_cardinal:
|
||||
piece.do_step(self)
|
||||
for piece in pieces_diagonal:
|
||||
piece.do_step(self)
|
||||
|
||||
func undo_step() -> Callable:
|
||||
|
|
BIN
concept-map.png
Normal file
BIN
concept-map.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 80 KiB |
30
concept-map.png.import
Normal file
30
concept-map.png.import
Normal file
|
@ -0,0 +1,30 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://b7344wqpbd3tq"
|
||||
valid=false
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://concept-map.png"
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
|
@ -70,7 +70,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0.600054, 4.5)
|
|||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0.600054, 5.5)
|
||||
|
||||
[node name="Ball" parent="." instance=ExtResource("3_eh72w")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.5, 0.3, 4.5)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.5, 0.3, 3.5)
|
||||
|
||||
[node name="Ball2" parent="." instance=ExtResource("3_eh72w")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.5, 0.3, 3.5)
|
||||
|
@ -78,6 +78,9 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.5, 0.3, 3.5)
|
|||
[node name="Goal" parent="." instance=ExtResource("5_pj7np")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.5, 0.057544, 4.5)
|
||||
|
||||
[node name="Goal2" parent="." instance=ExtResource("5_pj7np")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.5, 0.057544, 1.5)
|
||||
|
||||
[node name="Ball3" parent="." instance=ExtResource("3_eh72w")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.5, 0.3, 2.5)
|
||||
|
||||
|
|
Loading…
Reference in a new issue