diff --git a/Global.gd b/Global.gd index 714ff82..fa6dfa2 100644 --- a/Global.gd +++ b/Global.gd @@ -44,6 +44,19 @@ func _input(event): pass func _ready(): + CheckDBInUserDir() get_tree().get_root().add_child(river_intersection_home_2) get_tree().get_root().add_child(inventory_screen) pass + +func CheckDBInUserDir(): + var file2Check = File.new() + if file2Check.file_exists("user://gdsqlite.gdns"): + print("File exist! Doing nothing") + return + else: + var dir = Directory.new(); + dir.copy("res://addons/godot-sqlite/bin/gdsqlite.gdns","user://gdsqlite.gdns") + dir.make_dir("user://Storage/") + print("Database not found, making one!") + pass diff --git a/Menu.tscn b/Menu.tscn index a668ccd..fd5301e 100644 --- a/Menu.tscn +++ b/Menu.tscn @@ -15,7 +15,7 @@ script = ExtResource( 1 ) [node name="loading_ring" type="Sprite" parent="."] visible = false -position = Vector2( 574.719, 228.63 ) +position = Vector2( 640, 250.63 ) z_index = 1 texture = ExtResource( 2 ) script = ExtResource( 3 ) @@ -30,10 +30,10 @@ __meta__ = { } [node name="Btn_PlayGame" type="Button" parent="."] -margin_left = 484.204 -margin_top = 100.226 -margin_right = 679.204 -margin_bottom = 153.226 +margin_left = 494.5 +margin_top = 90.5 +margin_right = 802.5 +margin_bottom = 208.5 custom_fonts/font = SubResource( 1 ) text = "Play Game" __meta__ = { diff --git a/Ring of Races_v03.apk b/Ring of Races_v03.apk index 0b6b867..9592ab5 100644 Binary files a/Ring of Races_v03.apk and b/Ring of Races_v03.apk differ diff --git a/Storage/Database.gd b/Storage/Database.gd index 803c46c..797bc05 100644 --- a/Storage/Database.gd +++ b/Storage/Database.gd @@ -1,7 +1,9 @@ extends Node -const SQLite = preload("res://addons/godot-sqlite/bin/gdsqlite.gdns") -var path = "res://Storage/World1.db" +#const SQLiteOriginal = preload("res://addons/godot-sqlite/bin/gdsqlite.gdns") +#const SQLite = preload("user://gdsqlite.gdns") + +var path = "user://Storage/World1.db" var db_name = "RingOfRaces" var db = null var verbose = true @@ -12,6 +14,7 @@ func _ready(): func CreateWorldDatabase(): print("Creating new database") + var SQLite = load("user://gdsqlite.gdns") var player_inventory : Dictionary = Dictionary() player_inventory["id"] = {"data_type":"int", "primary_key": true, "not_null": true} #slot id player_inventory["item_id"] = {"data_type":"int", "not_null": true} #item id @@ -32,6 +35,7 @@ func CreateWorldDatabase(): items.clear() func OpenConnection(): + var SQLite = load("user://gdsqlite.gdns") self.db = SQLite.new() var file = File.new() self.db.path = path diff --git a/export_presets.cfg b/export_presets.cfg index 3be27f6..e30a44e 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -5,7 +5,7 @@ platform="Android" runnable=true custom_features="" export_filter="all_resources" -include_filter="" +include_filter="*.db" exclude_filter="" export_path="./Ring of Races_v03.apk" patch_list=PoolStringArray( ) @@ -184,16 +184,16 @@ permissions/use_credentials=false permissions/use_sip=false permissions/vibrate=false permissions/wake_lock=false -permissions/write_apn_settings=false +permissions/write_apn_settings=true permissions/write_calendar=false permissions/write_call_log=false permissions/write_contacts=false -permissions/write_external_storage=false +permissions/write_external_storage=true permissions/write_gservices=false permissions/write_history_bookmarks=false permissions/write_profile=false permissions/write_secure_settings=false -permissions/write_settings=false +permissions/write_settings=true permissions/write_sms=false permissions/write_social_stream=false permissions/write_sync_settings=false diff --git a/project.godot b/project.godot index 8ff733a..c89648b 100644 --- a/project.godot +++ b/project.godot @@ -105,6 +105,14 @@ open_inventory={ pointing/emulate_touch_from_mouse=true +[memory] + +limits/message_queue/max_size_kb=2048 + +[physics] + +common/physics_jitter_fix=0.5 + [tiled_importer] enable_json_format=true diff --git a/river_intersection_home2.tscn b/river_intersection_home2.tscn index 1e8c7d4..b5170db 100644 --- a/river_intersection_home2.tscn +++ b/river_intersection_home2.tscn @@ -178,8 +178,8 @@ z_index = 13 normal = ExtResource( 14 ) [node name="MoveDown" type="TouchScreenButton" parent="Camera2D"] -position = Vector2( -480.965, 178.192 ) -scale = Vector2( 14.9928, 14.9987 ) +position = Vector2( -480.965, 177.248 ) +scale = Vector2( 14.9928, 15.4117 ) z_index = 11 normal = ExtResource( 9 ) pressed = ExtResource( 8 ) @@ -189,8 +189,8 @@ visibility_mode = 1 script = ExtResource( 6 ) [node name="MoveRight" type="TouchScreenButton" parent="Camera2D"] -position = Vector2( 478.572, -173.651 ) -scale = Vector2( 16.7497, 5.49206 ) +position = Vector2( 478.572, -180.258 ) +scale = Vector2( 17.2806, 5.66904 ) z_index = 11 normal = ExtResource( 3 ) pressed = ExtResource( 7 ) @@ -199,7 +199,7 @@ visibility_mode = 1 script = ExtResource( 6 ) [node name="MoveUp" type="TouchScreenButton" parent="Camera2D"] -position = Vector2( -479.063, -300.035 ) +position = Vector2( -479.063, -300.979 ) scale = Vector2( 14.9907, 15.5676 ) z_index = 11 normal = ExtResource( 9 ) @@ -209,7 +209,7 @@ visibility_mode = 1 script = ExtResource( 6 ) [node name="MoveLeft" type="TouchScreenButton" parent="Camera2D"] -position = Vector2( -615.955, -175.335 ) +position = Vector2( -615.955, -175.807 ) scale = Vector2( 16.8861, 5.52137 ) z_index = 11 z_as_relative = false