l---------.github/workflows/export.yml22
-rw-r--r--.gitignore1
-rw-r--r--Block.gd8
-rw-r--r--Block.tscn26
-rw-r--r--Constants.gd10
-rw-r--r--Grid.gd2
-rw-r--r--LabelTheme.tres7
-rw-r--r--Logic.gd112
-rw-r--r--SwipeHandler.gd46
-rw-r--r--Verdana.tres7
-rw-r--r--World.tscn14
-rw-r--r--export_presets.cfg445
l---------exports/release.sh1
-rw-r--r--project.godot34
-rw-r--r--verdana-bold.ttf.import33
15 files changed, 104 insertions, 664 deletions
diff --git a/.github/workflows/export.yml b/.github/workflows/export.yml
deleted file mode 120000
index a24ee36..0000000
--- a/.github/workflows/export.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-name: "export"
-on:
- workflow_dispatch:
- push:
- paths:
- - "**.gd"
- - "**.tscn"
- - "**.import"
- - "**.tres"
- - "**.ttf"
- - ".github/workflows/export.yml"
- - "export_presets.cfg"
- branches:
- - main
-
-jobs:
- export:
- uses: bend-n/godot-actions/.github/workflows/callable-export.yml@main
- with:
- export-name: 2048
- image: ghcr.io/bend-n/godot-2d:4.1.1
- platforms: "windows linux web android mac"
diff --git a/.gitignore b/.gitignore
index f6b70a0..68c3732 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,2 @@
*.log
.import/
-.godot/
diff --git a/Block.gd b/Block.gd
index 8258880..bde3ce9 100644
--- a/Block.gd
+++ b/Block.gd
@@ -3,15 +3,15 @@ var bg
var label: Label
-func configure(text: String, background: Color, text_color: Color = Color.WHITE):
+func configure(text: String, background: Color, text_color: Color = Color.white):
if !bg:
bg = $ColorRect
if !label:
label = $Label
bg.color = background
label.text = text
- if text_color != Color.WHITE:
- label.add_theme_color_override("font_color", text_color)
+ if text_color != Color.white:
+ label.add_color_override("font_color", text_color)
func update_colors(new_number):
if new_number == 0:
@@ -21,4 +21,4 @@ func update_colors(new_number):
str(new_number),
Constants.BACKGROUND_COLOR_ARRAY[Constants.cells[new_number]],
Constants.CELL_COLOR_ARRAY[Constants.cells[new_number]]
- )
+ ) \ No newline at end of file
diff --git a/Block.tscn b/Block.tscn
index 2e3d153..c5aa4d8 100644
--- a/Block.tscn
+++ b/Block.tscn
@@ -1,30 +1,28 @@
-[gd_scene load_steps=3 format=3 uid="uid://oigfq0ftg7qf"]
+[gd_scene load_steps=3 format=2]
-[ext_resource type="Script" path="res://Block.gd" id="1"]
-[ext_resource type="Theme" uid="uid://b7nnb5t1wik1r" path="res://LabelTheme.tres" id="2"]
+[ext_resource path="res://Block.gd" type="Script" id=1]
+[ext_resource path="res://LabelTheme.tres" type="Theme" id=2]
[node name="Block" type="Node2D"]
-script = ExtResource("1")
+script = ExtResource( 1 )
[node name="ColorRect" type="ColorRect" parent="."]
-anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
-offset_right = 30.0
-offset_bottom = 30.0
-color = Color(0.823529, 0.517647, 0.517647, 1)
+margin_right = 30.0
+margin_bottom = 30.0
+color = Color( 0.823529, 0.517647, 0.517647, 1 )
[node name="Label" type="Label" parent="."]
-anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
-offset_right = 30.0
-offset_bottom = 30.0
-theme = ExtResource("2")
+margin_right = 30.0
+margin_bottom = 30.0
+theme = ExtResource( 2 )
text = "2"
-horizontal_alignment = 1
-vertical_alignment = 1
+align = 1
+valign = 1
diff --git a/Constants.gd b/Constants.gd
index 258af6b..dc18293 100644
--- a/Constants.gd
+++ b/Constants.gd
@@ -1,15 +1,15 @@
extends Node
-@export var LOSE_COLOR_TEXT: Color
+export(Color) var LOSE_COLOR_TEXT
const SIZE = 400
const GRID_LEN = 4
const BLOCK_SIZE = 32
-@export var BACKGROUND_COLOR_GAME: Color = "#92877d"
-@export var BACKGROUND_COLOR_CELL_EMPTY: Color = "#9e948a"
+export(Color) var BACKGROUND_COLOR_GAME = "#92877d"
+export(Color) var BACKGROUND_COLOR_CELL_EMPTY = "#9e948a"
-@export var BACKGROUND_COLOR_ARRAY: Array # go up to 65536 # (Array, Color)
-@export var CELL_COLOR_ARRAY: Array # go up to 65536 # (Array, Color)
+export(Array, Color) var BACKGROUND_COLOR_ARRAY: Array # go up to 65536
+export(Array, Color) var CELL_COLOR_ARRAY: Array # go up to 65536
const cells = {
2: 1,
diff --git a/Grid.gd b/Grid.gd
index cd0396e..8077245 100644
--- a/Grid.gd
+++ b/Grid.gd
@@ -23,7 +23,7 @@ func init_grid():
for i in range(Constants.GRID_LEN):
var grid_row = []
for j in range(Constants.GRID_LEN):
- var block = Block.instantiate()
+ var block = Block.instance()
add_child(block)
block.global_position += Vector2(
i * Constants.BLOCK_SIZE + 10, j * Constants.BLOCK_SIZE + 10
diff --git a/LabelTheme.tres b/LabelTheme.tres
index dfe6899..e730cc0 100644
--- a/LabelTheme.tres
+++ b/LabelTheme.tres
@@ -1,7 +1,6 @@
-[gd_resource type="Theme" load_steps=2 format=3 uid="uid://b7nnb5t1wik1r"]
+[gd_resource type="Theme" load_steps=2 format=2]
-[ext_resource type="FontFile" uid="uid://c3j06a350i6tj" path="res://verdana-bold.ttf" id="1_ffyfu"]
+[ext_resource path="res://Verdana.tres" type="DynamicFont" id=1]
[resource]
-default_font_size = 10
-Label/fonts/font = ExtResource("1_ffyfu")
+Label/fonts/font = ExtResource( 1 )
diff --git a/Logic.gd b/Logic.gd
index 6163317..176752e 100644
--- a/Logic.gd
+++ b/Logic.gd
@@ -2,26 +2,12 @@
extends Node
var done
-var moves: Array
-var materialized_a: Vector2
-var materialized_b: Vector2
-class Merge:
- var at: Vector2
- var with: Vector2
-class Move:
- var from: Vector2
- var to: Vector2
-
- func _init(a: Vector2, b: Vector2):
- self.from = a
- self.to = b
-
-func new_game(n: int) -> Array[PackedInt32Array]:
- var matrix: Array[PackedInt32Array] = []
+func new_game(n):
+ var matrix = []
for i in range(n):
- matrix.append(PackedInt32Array())
+ matrix.append([])
for _j in range(n):
matrix[i].append(0)
matrix = add_two(matrix)
@@ -29,19 +15,17 @@ func new_game(n: int) -> Array[PackedInt32Array]:
return matrix
-func add_two(mat: Array[PackedInt32Array]):
- var a = roundi(randf_range(0, mat.size() - 1))
- var b = roundi(randf_range(0, mat.size() - 1))
+func add_two(mat):
+ var a = round(rand_range(0, mat.size() - 1))
+ var b = round(rand_range(0, mat.size() - 1))
while mat[a][b] != 0:
- a = roundi(randf_range(0, mat.size() - 1))
- b = roundi(randf_range(0, mat.size() - 1))
- mat[a][b] = 4 if randf_range(0, 1) > .9 else 2
- materialized_a = Vector2(a / mat.size(), a % mat.size())
- materialized_b = Vector2(b / mat.size(), b % mat.size())
+ a = round(rand_range(0, mat.size() - 1))
+ b = round(rand_range(0, mat.size() - 1))
+ mat[a][b] = 4 if rand_range(0, 1) > .9 else 2
return mat
-func game_state(mat: Array[PackedInt32Array]):
+func game_state(mat):
# check for win cell
var zero = false
for i in range(mat.size()):
@@ -69,28 +53,28 @@ func game_state(mat: Array[PackedInt32Array]):
return "lose"
-func reverse(mat: Array[PackedInt32Array]):
- for i in range(Constants.GRID_LEN):
- for j in range(Constants.GRID_LEN/2):
- var tmp = mat[i][j]
- mat[i][j] = mat[i][Constants.GRID_LEN - j - 1]
- mat[i][Constants.GRID_LEN - j - 1] = tmp
- moves.append(Move.new(Vector2(i,j), Vector2(j, Constants.GRID_LEN - j - i)))
- return mat
+func reverse(mat):
+ var new = []
+ for i in range(mat.size()):
+ new.append([])
+ for j in range(mat[0].size()):
+ new[i].append(mat[i][mat[0].size() - j - 1])
+ return new
+
+
+func transpose(mat):
+ var new = []
+ for i in range(mat[0].size()):
+ new.append([])
+ for j in range(mat.size()):
+ new[i].append(mat[j][i])
+ return new
-func transpose(mat: Array[PackedInt32Array]):
- for i in range(Constants.GRID_LEN):
- for j in range(i + 1, Constants.GRID_LEN):
- var tmp = mat[i][j]
- mat[i][j] = mat[j][i]
- mat[j][i] = tmp
- moves.append(Move.new(Vector2(j,i), Vector2(i, j)))
- return mat
func cover_up(mat, no_done = false):
- var new: Array[PackedInt32Array] = []
+ var new = []
for _j in range(Constants.GRID_LEN):
- var partial_new = PackedInt32Array()
+ var partial_new = []
for _i in range(Constants.GRID_LEN):
partial_new.append(0)
new.append(partial_new)
@@ -101,67 +85,59 @@ func cover_up(mat, no_done = false):
for j in range(Constants.GRID_LEN):
if mat[i][j] != 0:
new[i][count] = mat[i][j]
- moves.append(Move.new(Vector2(i, j), Vector2(i, count)))
if !no_done and j != count:
done = true
count += 1
return new
-func merge(mat: Array[PackedInt32Array]):
+func merge(mat):
for i in range(Constants.GRID_LEN):
for j in range(Constants.GRID_LEN - 1):
if mat[i][j] == mat[i][j + 1] and mat[i][j] != 0:
mat[i][j] *= 2
mat[i][j + 1] = 0
- var merge = Merge.new()
- merge.at = Vector2(i, j)
- merge.with = Vector2(i, j + 1)
- moves.append(merge)
done = true
+ return mat
-func left(game: Array[PackedInt32Array]):
+func left(game):
print("<")
- moves.clear()
# return matrix after shifting left
- transpose(game)
+ game = transpose(game)
game = cover_up(game)
- merge(game)
+ game = merge(game)
game = cover_up(game, true)
- transpose(game)
+ game = transpose(game)
return [game, done]
-func right(game: Array[PackedInt32Array]):
+func right(game):
print(">")
- moves.clear()
# return matrix after shifting right
- game = reverse(transpose(game.duplicate()))
+ game = reverse(transpose(game))
game = cover_up(game)
- merge(game)
+ game = merge(game)
game = cover_up(game, true)
- game = transpose(reverse(game.duplicate()))
+ game = transpose(reverse(game))
return [game, done]
-func up(game: Array[PackedInt32Array]):
+func up(game):
print("^")
- moves.clear()
# return matrix after shifting up
game = cover_up(game)
- merge(game)
+ game = merge(game)
game = cover_up(game, true)
return [game, done]
-func down(game: Array[PackedInt32Array]):
+func down(game):
print("v")
- moves.clear()
# return matrix after shifting down
- reverse(game)
+ game = reverse(game)
game = cover_up(game)
- merge(game)
+ game = merge(game)
game = cover_up(game, true)
- reverse(game)
+ game = reverse(game)
return [game, done]
diff --git a/SwipeHandler.gd b/SwipeHandler.gd
index cadcdd5..362ebf7 100644
--- a/SwipeHandler.gd
+++ b/SwipeHandler.gd
@@ -6,31 +6,8 @@ var first_touch_position := Vector2.ZERO
var touch_release_position := Vector2.ZERO
var swiping := false
-@export var swipe_limit : float
-@export var touch_y_limit : int
-
-var swipe_start
-
-var quick_trigger = 150
-
-func _ready():
- set_process(not DisplayServer.is_touchscreen_available())
- set_process_input(DisplayServer.is_touchscreen_available())
-
-func _input(event):
- if event is InputEventScreenTouch:
- if event.pressed:
- swipe_start = event.position
- elif swipe_start != null:
- var distance = swipe_start.distance_to(event.position)
- if distance > swipe_limit:
- calculate_swipe(swipe_start.direction_to(event.position))
- if event is InputEventScreenDrag:
- if abs(event.speed.x) > quick_trigger || abs(event.speed.y) > quick_trigger:
- if swipe_start != null:
- calculate_swipe((swipe_start.direction_to(event.position)))
- print(swipe_start.direction_to(event.position))
- swipe_start = null
+export var swipe_limit : float
+export var touch_y_limit : int
func _process(_delta):
if Input.is_action_just_pressed("touch"):
@@ -41,14 +18,14 @@ func _process(_delta):
touch_release_position = get_global_mouse_position()
calculate_direction()
swiping = false
-
+
func calculate_direction():
var swipe_vector = touch_release_position - first_touch_position
if swipe_vector.length() > swipe_limit:
- var temp = rad_to_deg(swipe_vector.angle()) + 180 # right = 0
+ var temp = rad2deg(swipe_vector.angle()) + 180 # right = 0
first_touch_position = Vector2.ZERO
touch_release_position = Vector2.ZERO
-
+
if temp > 45 and temp <= 135:
emit_signal("swiped", Vector2.UP)
elif temp > 135 and temp <= 225:
@@ -57,14 +34,5 @@ func calculate_direction():
emit_signal("swiped", Vector2.DOWN)
else:
emit_signal("swiped", Vector2.LEFT)
-
-
-func calculate_swipe(dist):
- if dist.x > .5:
- emit_signal("swiped", Vector2.RIGHT)
- elif dist.x < -.5:
- emit_signal("swiped", Vector2.LEFT)
- elif dist.y > .5:
- emit_signal("swiped", Vector2.DOWN)
- elif dist.y < -.5:
- emit_signal("swiped", Vector2.UP)
+
+
diff --git a/Verdana.tres b/Verdana.tres
new file mode 100644
index 0000000..ea78c0d
--- /dev/null
+++ b/Verdana.tres
@@ -0,0 +1,7 @@
+[gd_resource type="DynamicFont" load_steps=2 format=2]
+
+[ext_resource path="res://verdana-bold.ttf" type="DynamicFontData" id=1]
+
+[resource]
+size = 10
+font_data = ExtResource( 1 )
diff --git a/World.tscn b/World.tscn
index 64193e3..81a497f 100644
--- a/World.tscn
+++ b/World.tscn
@@ -1,18 +1,18 @@
-[gd_scene load_steps=4 format=3 uid="uid://dmvyw3206dmuq"]
+[gd_scene load_steps=4 format=2]
-[ext_resource type="Script" path="res://Grid.gd" id="1"]
-[ext_resource type="Script" path="res://SwipeHandler.gd" id="2"]
-[ext_resource type="PackedScene" path="res://UI.tscn" id="3"]
+[ext_resource path="res://Grid.gd" type="Script" id=1]
+[ext_resource path="res://SwipeHandler.gd" type="Script" id=2]
+[ext_resource path="res://UI.tscn" type="PackedScene" id=3]
[node name="World" type="Node2D"]
[node name="Grid" type="Node2D" parent="."]
-script = ExtResource("1")
+script = ExtResource( 1 )
[node name="SwipeHandler" type="Node2D" parent="."]
-script = ExtResource("2")
+script = ExtResource( 2 )
swipe_limit = 15.0
-[node name="UI" parent="." instance=ExtResource("3")]
+[node name="UI" parent="." instance=ExtResource( 3 )]
[connection signal="swiped" from="SwipeHandler" to="Grid" method="_on_SwipeHandler_swiped"]
diff --git a/export_presets.cfg b/export_presets.cfg
deleted file mode 100644
index 2963d55..0000000
--- a/export_presets.cfg
+++ /dev/null
@@ -1,445 +0,0 @@
-[preset.0]
-
-name="Linux/X11"
-platform="Linux/X11"
-runnable=true
-dedicated_server=false
-custom_features=""
-export_filter="all_resources"
-include_filter=""
-exclude_filter=""
-export_path=""
-encryption_include_filters=""
-encryption_exclude_filters=""
-encrypt_pck=false
-encrypt_directory=false
-
-[preset.0.options]
-
-custom_template/debug=""
-custom_template/release=""
-debug/export_console_wrapper=1
-binary_format/embed_pck=false
-texture_format/bptc=true
-texture_format/s3tc=true
-texture_format/etc=false
-texture_format/etc2=false
-binary_format/architecture="x86_64"
-ssh_remote_deploy/enabled=false
-ssh_remote_deploy/host="user@host_ip"
-ssh_remote_deploy/port="22"
-ssh_remote_deploy/extra_args_ssh=""
-ssh_remote_deploy/extra_args_scp=""
-ssh_remote_deploy/run_script="#!/usr/bin/env bash
-export DISPLAY=:0
-unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
-\"{temp_dir}/{exe_name}\" {cmd_args}"
-ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
-kill $(pgrep -x -f \"{temp_dir}/{exe_name} {cmd_args}\")
-rm -rf \"{temp_dir}\""
-
-[preset.1]
-
-name="Android"
-platform="Android"
-runnable=true
-dedicated_server=false
-custom_features=""
-export_filter="all_resources"
-include_filter=""
-exclude_filter=""
-export_path=""
-encryption_include_filters=""
-encryption_exclude_filters=""
-encrypt_pck=false
-encrypt_directory=false
-
-[preset.1.options]
-
-custom_template/debug=""
-custom_template/release=""
-gradle_build/use_gradle_build=false
-gradle_build/export_format=0
-gradle_build/min_sdk=""
-gradle_build/target_sdk=""
-architectures/armeabi-v7a=false
-architectures/arm64-v8a=true
-architectures/x86=false
-architectures/x86_64=false
-version/code=1
-version/name=""
-package/unique_name="com.example.$genname"
-package/name=""
-package/signed=true
-package/app_category=2
-package/retain_data_on_uninstall=false
-package/exclude_from_recents=false
-package/show_in_android_tv=false
-package/show_in_app_library=true
-package/show_as_launcher_app=false
-launcher_icons/main_192x192=""
-launcher_icons/adaptive_foreground_432x432=""
-launcher_icons/adaptive_background_432x432=""
-graphics/opengl_debug=false
-xr_features/xr_mode=0
-screen/immersive_mode=true
-screen/support_small=true
-screen/support_normal=true
-screen/support_large=true
-screen/support_xlarge=true
-user_data_backup/allow=false
-command_line/extra_args=""
-apk_expansion/enable=false
-apk_expansion/SALT=""
-apk_expansion/public_key=""
-permissions/custom_permissions=PackedStringArray()
-permissions/access_checkin_properties=false
-permissions/access_coarse_location=false
-permissions/access_fine_location=false
-permissions/access_location_extra_commands=false
-permissions/access_mock_location=false
-permissions/access_network_state=false
-permissions/access_surface_flinger=false
-permissions/access_wifi_state=false
-permissions/account_manager=false
-permissions/add_voicemail=false
-permissions/authenticate_accounts=false
-permissions/battery_stats=false
-permissions/bind_accessibility_service=false
-permissions/bind_appwidget=false
-permissions/bind_device_admin=false
-permissions/bind_input_method=false
-permissions/bind_nfc_service=false
-permissions/bind_notification_listener_service=false
-permissions/bind_print_service=false
-permissions/bind_remoteviews=false
-permissions/bind_text_service=false
-permissions/bind_vpn_service=false
-permissions/bind_wallpaper=false
-permissions/bluetooth=false
-permissions/bluetooth_admin=false
-permissions/bluetooth_privileged=false
-permissions/brick=false
-permissions/broadcast_package_removed=false
-permissions/broadcast_sms=false
-permissions/broadcast_sticky=false
-permissions/broadcast_wap_push=false
-permissions/call_phone=false
-permissions/call_privileged=false
-permissions/camera=false
-permissions/capture_audio_output=false
-permissions/capture_secure_video_output=false
-permissions/capture_video_output=false
-permissions/change_component_enabled_state=false
-permissions/change_configuration=false
-permissions/change_network_state=false
-permissions/change_wifi_multicast_state=false
-permissions/change_wifi_state=false
-permissions/clear_app_cache=false
-permissions/clear_app_user_data=false
-permissions/control_location_updates=false
-permissions/delete_cache_files=false
-permissions/delete_packages=false
-permissions/device_power=false
-permissions/diagnostic=false
-permissions/disable_keyguard=false
-permissions/dump=false
-permissions/expand_status_bar=false
-permissions/factory_test=false
-permissions/flashlight=false
-permissions/force_back=false
-permissions/get_accounts=false
-permissions/get_package_size=false
-permissions/get_tasks=false
-permissions/get_top_activity_info=false
-permissions/global_search=false
-permissions/hardware_test=false
-permissions/inject_events=false
-permissions/install_location_provider=false
-permissions/install_packages=false
-permissions/install_shortcut=false
-permissions/internal_system_window=false
-permissions/internet=false
-permissions/kill_background_processes=false
-permissions/location_hardware=false
-permissions/manage_accounts=false
-permissions/manage_app_tokens=false
-permissions/manage_documents=false
-permissions/manage_external_storage=false
-permissions/master_clear=false
-permissions/media_content_control=false
-permissions/modify_audio_settings=false
-permissions/modify_phone_state=false
-permissions/mount_format_filesystems=false
-permissions/mount_unmount_filesystems=false
-permissions/nfc=false
-permissions/persistent_activity=false
-permissions/process_outgoing_calls=false
-permissions/read_calendar=false
-permissions/read_call_log=false
-permissions/read_contacts=false
-permissions/read_external_storage=false
-permissions/read_frame_buffer=false
-permissions/read_history_bookmarks=false
-permissions/read_input_state=false
-permissions/read_logs=false
-permissions/read_phone_state=false
-permissions/read_profile=false
-permissions/read_sms=false
-permissions/read_social_stream=false
-permissions/read_sync_settings=false
-permissions/read_sync_stats=false
-permissions/read_user_dictionary=false
-permissions/reboot=false
-permissions/receive_boot_completed=false
-permissions/receive_mms=false
-permissions/receive_sms=false
-permissions/receive_wap_push=false
-permissions/record_audio=false
-permissions/reorder_tasks=false
-permissions/restart_packages=false
-permissions/send_respond_via_message=false
-permissions/send_sms=false
-permissions/set_activity_watcher=false
-permissions/set_alarm=false
-permissions/set_always_finish=false
-permissions/set_animation_scale=false
-permissions/set_debug_app=false
-permissions/set_orientation=false
-permissions/set_pointer_speed=false
-permissions/set_preferred_applications=false
-permissions/set_process_limit=false
-permissions/set_time=false
-permissions/set_time_zone=false
-permissions/set_wallpaper=false
-permissions/set_wallpaper_hints=false
-permissions/signal_persistent_processes=false
-permissions/status_bar=false
-permissions/subscribed_feeds_read=false
-permissions/subscribed_feeds_write=false
-permissions/system_alert_window=false
-permissions/transmit_ir=false
-permissions/uninstall_shortcut=false
-permissions/update_device_stats=false
-permissions/use_credentials=false
-permissions/use_sip=false
-permissions/vibrate=false
-permissions/wake_lock=false
-permissions/write_apn_settings=false
-permissions/write_calendar=false
-permissions/write_call_log=false
-permissions/write_contacts=false
-permissions/write_external_storage=false
-permissions/write_gservices=false
-permissions/write_history_bookmarks=false
-permissions/write_profile=false
-permissions/write_secure_settings=false
-permissions/write_settings=false
-permissions/write_sms=false
-permissions/write_social_stream=false
-permissions/write_sync_settings=false
-permissions/write_user_dictionary=false
-
-[preset.2]
-
-name="macOS"
-platform="macOS"
-runnable=true
-dedicated_server=false
-custom_features=""
-export_filter="all_resources"
-include_filter=""
-exclude_filter=""
-export_path=""
-encryption_include_filters=""
-encryption_exclude_filters=""
-encrypt_pck=false
-encrypt_directory=false
-
-[preset.2.options]
-
-export/distribution_type=1
-binary_format/architecture="universal"
-custom_template/debug=""
-custom_template/release=""
-debug/export_console_wrapper=1
-application/icon=""
-application/icon_interpolation=4
-application/bundle_identifier="bendn.2048.hi"
-application/signature=""
-application/app_category="Strategy-games"
-application/short_version="1.0"
-application/version=""
-application/copyright=""
-application/copyright_localized={}
-application/min_macos_version="10.12"
-display/high_res=true
-xcode/platform_build="14C18"
-xcode/sdk_version="13.1"
-xcode/sdk_build="22C55"
-xcode/sdk_name="macosx13.1"
-xcode/xcode_version="1420"
-xcode/xcode_build="14C18"
-codesign/codesign=1
-codesign/installer_identity=""
-codesign/apple_team_id=""
-codesign/identity=""
-codesign/entitlements/custom_file=""
-codesign/entitlements/allow_jit_code_execution=false
-codesign/entitlements/allow_unsigned_executable_memory=false
-codesign/entitlements/allow_dyld_environment_variables=false
-codesign/entitlements/disable_library_validation=false
-codesign/entitlements/audio_input=false
-codesign/entitlements/camera=false
-codesign/entitlements/location=false
-codesign/entitlements/address_book=false
-codesign/entitlements/calendars=false
-codesign/entitlements/photos_library=false
-codesign/entitlements/apple_events=false
-codesign/entitlements/debugging=false
-codesign/entitlements/app_sandbox/enabled=false
-codesign/entitlements/app_sandbox/network_server=false
-codesign/entitlements/app_sandbox/network_client=false
-codesign/entitlements/app_sandbox/device_usb=false
-codesign/entitlements/app_sandbox/device_bluetooth=false
-codesign/entitlements/app_sandbox/files_downloads=0
-codesign/entitlements/app_sandbox/files_pictures=0
-codesign/entitlements/app_sandbox/files_music=0
-codesign/entitlements/app_sandbox/files_movies=0
-codesign/entitlements/app_sandbox/files_user_selected=0
-codesign/entitlements/app_sandbox/helper_executables=[]
-codesign/custom_options=PackedStringArray()
-notarization/notarization=0
-privacy/microphone_usage_description=""
-privacy/microphone_usage_description_localized={}
-privacy/camera_usage_description=""
-privacy/camera_usage_description_localized={}
-privacy/location_usage_description=""
-privacy/location_usage_description_localized={}
-privacy/address_book_usage_description=""
-privacy/address_book_usage_description_localized={}
-privacy/calendar_usage_description=""
-privacy/calendar_usage_description_localized={}
-privacy/photos_library_usage_description=""
-privacy/photos_library_usage_description_localized={}
-privacy/desktop_folder_usage_description=""
-privacy/desktop_folder_usage_description_localized={}
-privacy/documents_folder_usage_description=""
-privacy/documents_folder_usage_description_localized={}
-privacy/downloads_folder_usage_description=""
-privacy/downloads_folder_usage_description_localized={}
-privacy/network_volumes_usage_description=""
-privacy/network_volumes_usage_description_localized={}
-privacy/removable_volumes_usage_description=""
-privacy/removable_volumes_usage_description_localized={}
-ssh_remote_deploy/enabled=false
-ssh_remote_deploy/host="user@host_ip"
-ssh_remote_deploy/port="22"
-ssh_remote_deploy/extra_args_ssh=""
-ssh_remote_deploy/extra_args_scp=""
-ssh_remote_deploy/run_script="#!/usr/bin/env bash
-unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
-open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"
-ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
-kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
-rm -rf \"{temp_dir}\""
-
-[preset.3]
-
-name="Web"
-platform="Web"
-runnable=true
-dedicated_server=false
-custom_features=""
-export_filter="all_resources"
-include_filter=""
-exclude_filter=""
-export_path=""
-encryption_include_filters=""
-encryption_exclude_filters=""
-encrypt_pck=false
-encrypt_directory=false
-
-[preset.3.options]
-
-custom_template/debug=""
-custom_template/release=""
-variant/extensions_support=false
-vram_texture_compression/for_desktop=true
-vram_texture_compression/for_mobile=false
-html/export_icon=true
-html/custom_html_shell=""
-html/head_include=""
-html/canvas_resize_policy=2
-html/focus_canvas_on_start=true
-html/experimental_virtual_keyboard=false
-progressive_web_app/enabled=false
-progressive_web_app/offline_page=""
-progressive_web_app/display=1
-progressive_web_app/orientation=0
-progressive_web_app/icon_144x144=""
-progressive_web_app/icon_180x180=""
-progressive_web_app/icon_512x512=""
-progressive_web_app/background_color=Color(0, 0, 0, 1)
-
-[preset.4]
-
-name="Windows Desktop"
-platform="Windows Desktop"
-runnable=true
-dedicated_server=false
-custom_features=""
-export_filter="all_resources"
-include_filter=""
-exclude_filter=""
-export_path=""
-encryption_include_filters=""
-encryption_exclude_filters=""
-encrypt_pck=false
-encrypt_directory=false
-
-[preset.4.options]
-
-custom_template/debug=""
-custom_template/release=""
-debug/export_console_wrapper=1
-binary_format/embed_pck=false
-texture_format/bptc=true
-texture_format/s3tc=true
-texture_format/etc=false
-texture_format/etc2=false
-binary_format/architecture="x86_64"
-codesign/enable=false
-codesign/timestamp=true
-codesign/timestamp_server_url=""
-codesign/digest_algorithm=1
-codesign/description=""
-codesign/custom_options=PackedStringArray()
-application/modify_resources=true
-application/icon=""
-application/console_wrapper_icon=""
-application/icon_interpolation=4
-application/file_version=""
-application/product_version=""
-application/company_name=""
-application/product_name=""
-application/file_description=""
-application/copyright=""
-application/trademarks=""
-ssh_remote_deploy/enabled=false
-ssh_remote_deploy/host="user@host_ip"
-ssh_remote_deploy/port="22"
-ssh_remote_deploy/extra_args_ssh=""
-ssh_remote_deploy/extra_args_scp=""
-ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
-$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
-$trigger = New-ScheduledTaskTrigger -Once -At 00:00
-$settings = New-ScheduledTaskSettingsSet
-$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
-Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
-Start-ScheduledTask -TaskName godot_remote_debug
-while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
-Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
-ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
-Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
-Remove-Item -Recurse -Force '{temp_dir}'"
diff --git a/exports/release.sh b/exports/release.sh
deleted file mode 120000
index 5577000..0000000
--- a/exports/release.sh
+++ /dev/null
@@ -1 +0,0 @@
-/home/bendn/release/release.sh \ No newline at end of file
diff --git a/project.godot b/project.godot
index d769147..87e8770 100644
--- a/project.godot
+++ b/project.godot
@@ -6,7 +6,7 @@
; [section] ; section goes between []
; param=value ; assign values to parameters
-config_version=5
+config_version=4
[application]
@@ -14,7 +14,6 @@ config/name="2048"
run/main_scene="res://World.tscn"
config/use_custom_user_dir=true
config/custom_user_dir_name="bendn-2048"
-config/features=PackedStringArray("4.2")
[autoload]
@@ -23,33 +22,28 @@ Logic="*res://Logic.gd"
[display]
-window/size/viewport_width=148
-window/size/viewport_height=148
-window/size/window_width_override=720
-window/size/window_height_override=720
-window/stretch/mode="canvas_items"
-window/stretch/aspect="expand"
-window/vsync/vsync_mode=0
+window/size/width=148
+window/size/height=148
+window/size/test_width=720
+window/size/test_height=720
+window/stretch/mode="2d"
+window/stretch/aspect="keep"
[input]
quit={
"deadzone": 0.5,
-"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":4194305,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
-]
+"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777217,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
+ ]
}
undo={
"deadzone": 0.5,
-"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":true,"meta_pressed":false,"pressed":false,"keycode":90,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
-, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":90,"physical_keycode":0,"key_label":0,"unicode":0,"echo":false,"script":null)
-]
+"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":true,"meta":false,"command":true,"pressed":false,"scancode":90,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
+, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":90,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
+ ]
}
touch={
"deadzone": 0.5,
-"events": [Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"button_mask":0,"position":Vector2(0, 0),"global_position":Vector2(0, 0),"factor":1.0,"button_index":1,"canceled":false,"pressed":false,"double_click":false,"script":null)
-]
+"events": [ Object(InputEventMouseButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"button_mask":0,"position":Vector2( 0, 0 ),"global_position":Vector2( 0, 0 ),"factor":1.0,"button_index":1,"pressed":false,"doubleclick":false,"script":null)
+ ]
}
-
-[rendering]
-
-renderer/rendering_method="mobile"
diff --git a/verdana-bold.ttf.import b/verdana-bold.ttf.import
deleted file mode 100644
index 94f7fb3..0000000
--- a/verdana-bold.ttf.import
+++ /dev/null
@@ -1,33 +0,0 @@
-[remap]
-
-importer="font_data_dynamic"
-type="FontFile"
-uid="uid://c3j06a350i6tj"
-path="res://.godot/imported/verdana-bold.ttf-93f425362066cca82762a45da5954722.fontdata"
-
-[deps]
-
-source_file="res://verdana-bold.ttf"
-dest_files=["res://.godot/imported/verdana-bold.ttf-93f425362066cca82762a45da5954722.fontdata"]
-
-[params]
-
-Rendering=null
-antialiasing=1
-generate_mipmaps=false
-multichannel_signed_distance_field=false
-msdf_pixel_range=8
-msdf_size=48
-allow_system_fallback=true
-force_autohinter=false
-hinting=1
-subpixel_positioning=1
-oversampling=0.0
-Fallbacks=null
-fallbacks=[]
-Compress=null
-compress=true
-preload=[]
-language_support={}
-script_support={}
-opentype_features={}