l---------.github/workflows/export.yml55
-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.gd20
-rw-r--r--Verdana.tres7
-rw-r--r--World.tscn14
-rw-r--r--export_presets.cfg438
-rw-r--r--project.godot34
-rw-r--r--verdana-bold.ttf.import33
14 files changed, 596 insertions, 171 deletions
diff --git a/.github/workflows/export.yml b/.github/workflows/export.yml
index 1d64eab..a24ee36 120000
--- a/.github/workflows/export.yml
+++ b/.github/workflows/export.yml
@@ -1,45 +1,22 @@
-# Whenever a push is made to the master branch then run the job
+name: "export"
on:
+ workflow_dispatch:
push:
+ paths:
+ - "**.gd"
+ - "**.tscn"
+ - "**.import"
+ - "**.tres"
+ - "**.ttf"
+ - ".github/workflows/export.yml"
+ - "export_presets.cfg"
branches:
- main
jobs:
- # job id, can be anything
- export_game:
- # Always use ubuntu-latest for this action
- runs-on: ubuntu-latest
- # Job name, can be anything
- name: export
- steps:
- # Always include the checkout step so that
- # your project is available for Godot to export
- - name: checkout
- uses: actions/[email protected]
- - name: Set up JDK 8
- uses: actions/setup-java@v3
- with:
- java-version: '8'
- distribution: adopt
-
- - name: Setup Android SDK
- uses: android-actions/setup-android@v2
- # Ensure that you get the entire project history
- with:
- fetch-depth: 0
- - name: create keystore
- run: |
- keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 -deststoretype pkcs12
- mv debug.keystore /tmp/debug.keystore
- - name: export game
- # Use latest version (see releases for all versions)
-
- uses: firebelley/[email protected]
- with:
- # Defining all the required inputs
- # I used the mono version of Godot in this example
- godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.4.2/Godot_v3.4.2-stable_linux_headless.64.zip
- godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.4.2/Godot_v3.4.2-stable_export_templates.tpz
- relative_project_path: ./
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ 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 68c3732..f6b70a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
*.log
.import/
+.godot/
diff --git a/Block.gd b/Block.gd
index bde3ce9..8258880 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_color_override("font_color", text_color)
+ if text_color != Color.WHITE:
+ label.add_theme_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 c5aa4d8..2e3d153 100644
--- a/Block.tscn
+++ b/Block.tscn
@@ -1,28 +1,30 @@
-[gd_scene load_steps=3 format=2]
+[gd_scene load_steps=3 format=3 uid="uid://oigfq0ftg7qf"]
-[ext_resource path="res://Block.gd" type="Script" id=1]
-[ext_resource path="res://LabelTheme.tres" type="Theme" id=2]
+[ext_resource type="Script" path="res://Block.gd" id="1"]
+[ext_resource type="Theme" uid="uid://b7nnb5t1wik1r" path="res://LabelTheme.tres" 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
-margin_right = 30.0
-margin_bottom = 30.0
-color = Color( 0.823529, 0.517647, 0.517647, 1 )
+offset_right = 30.0
+offset_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
-margin_right = 30.0
-margin_bottom = 30.0
-theme = ExtResource( 2 )
+offset_right = 30.0
+offset_bottom = 30.0
+theme = ExtResource("2")
text = "2"
-align = 1
-valign = 1
+horizontal_alignment = 1
+vertical_alignment = 1
diff --git a/Constants.gd b/Constants.gd
index dc18293..258af6b 100644
--- a/Constants.gd
+++ b/Constants.gd
@@ -1,15 +1,15 @@
extends Node
-export(Color) var LOSE_COLOR_TEXT
+@export var LOSE_COLOR_TEXT: Color
const SIZE = 400
const GRID_LEN = 4
const BLOCK_SIZE = 32
-export(Color) var BACKGROUND_COLOR_GAME = "#92877d"
-export(Color) var BACKGROUND_COLOR_CELL_EMPTY = "#9e948a"
+@export var BACKGROUND_COLOR_GAME: Color = "#92877d"
+@export var BACKGROUND_COLOR_CELL_EMPTY: Color = "#9e948a"
-export(Array, Color) var BACKGROUND_COLOR_ARRAY: Array # go up to 65536
-export(Array, Color) var CELL_COLOR_ARRAY: Array # go up to 65536
+@export var BACKGROUND_COLOR_ARRAY: Array # go up to 65536 # (Array, Color)
+@export var CELL_COLOR_ARRAY: Array # go up to 65536 # (Array, Color)
const cells = {
2: 1,
diff --git a/Grid.gd b/Grid.gd
index 8077245..cd0396e 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.instance()
+ var block = Block.instantiate()
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 e730cc0..dfe6899 100644
--- a/LabelTheme.tres
+++ b/LabelTheme.tres
@@ -1,6 +1,7 @@
-[gd_resource type="Theme" load_steps=2 format=2]
+[gd_resource type="Theme" load_steps=2 format=3 uid="uid://b7nnb5t1wik1r"]
-[ext_resource path="res://Verdana.tres" type="DynamicFont" id=1]
+[ext_resource type="FontFile" uid="uid://c3j06a350i6tj" path="res://verdana-bold.ttf" id="1_ffyfu"]
[resource]
-Label/fonts/font = ExtResource( 1 )
+default_font_size = 10
+Label/fonts/font = ExtResource("1_ffyfu")
diff --git a/Logic.gd b/Logic.gd
index 176752e..6163317 100644
--- a/Logic.gd
+++ b/Logic.gd
@@ -2,12 +2,26 @@
extends Node
var done
+var moves: Array
+var materialized_a: Vector2
+var materialized_b: Vector2
+class Merge:
+ var at: Vector2
+ var with: Vector2
-func new_game(n):
- var matrix = []
+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] = []
for i in range(n):
- matrix.append([])
+ matrix.append(PackedInt32Array())
for _j in range(n):
matrix[i].append(0)
matrix = add_two(matrix)
@@ -15,17 +29,19 @@ func new_game(n):
return matrix
-func add_two(mat):
- var a = round(rand_range(0, mat.size() - 1))
- var b = round(rand_range(0, mat.size() - 1))
+func add_two(mat: Array[PackedInt32Array]):
+ var a = roundi(randf_range(0, mat.size() - 1))
+ var b = roundi(randf_range(0, mat.size() - 1))
while mat[a][b] != 0:
- 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
+ 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())
return mat
-func game_state(mat):
+func game_state(mat: Array[PackedInt32Array]):
# check for win cell
var zero = false
for i in range(mat.size()):
@@ -53,28 +69,28 @@ func game_state(mat):
return "lose"
-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 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 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 = []
+ var new: Array[PackedInt32Array] = []
for _j in range(Constants.GRID_LEN):
- var partial_new = []
+ var partial_new = PackedInt32Array()
for _i in range(Constants.GRID_LEN):
partial_new.append(0)
new.append(partial_new)
@@ -85,59 +101,67 @@ 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):
+func merge(mat: Array[PackedInt32Array]):
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):
+func left(game: Array[PackedInt32Array]):
print("<")
+ moves.clear()
# return matrix after shifting left
- game = transpose(game)
+ transpose(game)
game = cover_up(game)
- game = merge(game)
+ merge(game)
game = cover_up(game, true)
- game = transpose(game)
+ transpose(game)
return [game, done]
-func right(game):
+func right(game: Array[PackedInt32Array]):
print(">")
+ moves.clear()
# return matrix after shifting right
- game = reverse(transpose(game))
+ game = reverse(transpose(game.duplicate()))
game = cover_up(game)
- game = merge(game)
+ merge(game)
game = cover_up(game, true)
- game = transpose(reverse(game))
+ game = transpose(reverse(game.duplicate()))
return [game, done]
-func up(game):
+func up(game: Array[PackedInt32Array]):
print("^")
+ moves.clear()
# return matrix after shifting up
game = cover_up(game)
- game = merge(game)
+ merge(game)
game = cover_up(game, true)
return [game, done]
-func down(game):
+func down(game: Array[PackedInt32Array]):
print("v")
+ moves.clear()
# return matrix after shifting down
- game = reverse(game)
+ reverse(game)
game = cover_up(game)
- game = merge(game)
+ merge(game)
game = cover_up(game, true)
- game = reverse(game)
+ reverse(game)
return [game, done]
diff --git a/SwipeHandler.gd b/SwipeHandler.gd
index d6a5cd3..cadcdd5 100644
--- a/SwipeHandler.gd
+++ b/SwipeHandler.gd
@@ -6,16 +6,16 @@ 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
+@export var swipe_limit : float
+@export var touch_y_limit : int
var swipe_start
var quick_trigger = 150
func _ready():
- set_process(not OS.has_touchscreen_ui_hint())
- set_process_input(OS.has_touchscreen_ui_hint())
+ set_process(not DisplayServer.is_touchscreen_available())
+ set_process_input(DisplayServer.is_touchscreen_available())
func _input(event):
if event is InputEventScreenTouch:
@@ -41,14 +41,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 = rad2deg(swipe_vector.angle()) + 180 # right = 0
+ var temp = rad_to_deg(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,8 +57,8 @@ 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)
@@ -67,4 +67,4 @@ func calculate_swipe(dist):
elif dist.y > .5:
emit_signal("swiped", Vector2.DOWN)
elif dist.y < -.5:
- emit_signal("swiped", Vector2.UP) \ No newline at end of file
+ emit_signal("swiped", Vector2.UP)
diff --git a/Verdana.tres b/Verdana.tres
deleted file mode 100644
index ea78c0d..0000000
--- a/Verdana.tres
+++ /dev/null
@@ -1,7 +0,0 @@
-[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 81a497f..64193e3 100644
--- a/World.tscn
+++ b/World.tscn
@@ -1,18 +1,18 @@
-[gd_scene load_steps=4 format=2]
+[gd_scene load_steps=4 format=3 uid="uid://dmvyw3206dmuq"]
-[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]
+[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"]
[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
index e50e75b..2963d55 100644
--- a/export_presets.cfg
+++ b/export_presets.cfg
@@ -1,57 +1,445 @@
[preset.0]
-name="Mac"
-platform="Mac OSX"
+name="Linux/X11"
+platform="Linux/X11"
runnable=true
+dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
-export_path="exports/mac.zip"
-script_export_mode=1
-script_encryption_key=""
+export_path=""
+encryption_include_filters=""
+encryption_exclude_filters=""
+encrypt_pck=false
+encrypt_directory=false
[preset.0.options]
custom_template/debug=""
custom_template/release=""
-application/name="2048"
-application/info="heck yeah"
+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/identifier="bendn.2048"
+application/icon_interpolation=4
+application/bundle_identifier="bendn.2048.hi"
application/signature=""
-application/app_category="Games"
+application/app_category="Strategy-games"
application/short_version="1.0"
-application/version="1.0"
+application/version=""
application/copyright=""
+application/copyright_localized={}
+application/min_macos_version="10.12"
display/high_res=true
-privacy/camera_usage_description=""
+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=""
-texture_format/s3tc=true
-texture_format/etc=false
-texture_format/etc2=false
+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.1]
+[preset.3]
-name="Linux"
-platform="Linux/X11"
+name="Web"
+platform="Web"
runnable=true
+dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
-export_path="exports/linux..zip.x86_64"
-script_export_mode=1
-script_encryption_key=""
+export_path=""
+encryption_include_filters=""
+encryption_exclude_filters=""
+encrypt_pck=false
+encrypt_directory=false
-[preset.1.options]
+[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=""
-binary_format/64_bits=true
-binary_format/embed_pck=true
-texture_format/bptc=false
+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
-texture_format/no_bptc_fallbacks=true
+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/project.godot b/project.godot
index 87e8770..d769147 100644
--- a/project.godot
+++ b/project.godot
@@ -6,7 +6,7 @@
; [section] ; section goes between []
; param=value ; assign values to parameters
-config_version=4
+config_version=5
[application]
@@ -14,6 +14,7 @@ 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]
@@ -22,28 +23,33 @@ Logic="*res://Logic.gd"
[display]
-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"
+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
[input]
quit={
"deadzone": 0.5,
-"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)
- ]
+"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)
+]
}
undo={
"deadzone": 0.5,
-"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)
- ]
+"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)
+]
}
touch={
"deadzone": 0.5,
-"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)
- ]
+"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)
+]
}
+
+[rendering]
+
+renderer/rendering_method="mobile"
diff --git a/verdana-bold.ttf.import b/verdana-bold.ttf.import
new file mode 100644
index 0000000..94f7fb3
--- /dev/null
+++ b/verdana-bold.ttf.import
@@ -0,0 +1,33 @@
+[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={}