diff --git a/assets/tilemaps/default/sample_level.tmx b/assets/tilemaps/default/sample_level.tmx
new file mode 100644
index 0000000..d6d184b
--- /dev/null
+++ b/assets/tilemaps/default/sample_level.tmx
@@ -0,0 +1,58 @@
+
+
diff --git a/assets/ui/clock.xcf b/assets/ui/clock.xcf
new file mode 100644
index 0000000..84ff4bb
Binary files /dev/null and b/assets/ui/clock.xcf differ
diff --git a/assets/ui/icons/help.png b/assets/ui/icons/help.png
new file mode 100644
index 0000000..71b8014
Binary files /dev/null and b/assets/ui/icons/help.png differ
diff --git a/assets/ui/icons/help.xcf b/assets/ui/icons/help.xcf
new file mode 100644
index 0000000..c8f6511
Binary files /dev/null and b/assets/ui/icons/help.xcf differ
diff --git a/assets/ui/icons/progress_texture.xcf b/assets/ui/icons/progress_texture.xcf
new file mode 100644
index 0000000..b505f35
Binary files /dev/null and b/assets/ui/icons/progress_texture.xcf differ
diff --git a/game/.import/bridge.png-2db149efb21bb9bbfac413be9641e085.stex b/game/.import/bridge.png-2db149efb21bb9bbfac413be9641e085.stex
new file mode 100644
index 0000000..a4683b2
Binary files /dev/null and b/game/.import/bridge.png-2db149efb21bb9bbfac413be9641e085.stex differ
diff --git a/game/.import/clock.png-09b4a660a58c86478b8ce31163fe5a4d.stex b/game/.import/clock.png-09b4a660a58c86478b8ce31163fe5a4d.stex
new file mode 100644
index 0000000..89e55ef
Binary files /dev/null and b/game/.import/clock.png-09b4a660a58c86478b8ce31163fe5a4d.stex differ
diff --git a/game/.import/farm.png-defc6fd14185d12b7de4e2cbc06ae785.stex b/game/.import/farm.png-defc6fd14185d12b7de4e2cbc06ae785.stex
new file mode 100644
index 0000000..ec48b09
Binary files /dev/null and b/game/.import/farm.png-defc6fd14185d12b7de4e2cbc06ae785.stex differ
diff --git a/game/.import/grass.png-b7950067027b0d689b097507982efb2a.stex b/game/.import/grass.png-b7950067027b0d689b097507982efb2a.stex
new file mode 100644
index 0000000..4e31f49
Binary files /dev/null and b/game/.import/grass.png-b7950067027b0d689b097507982efb2a.stex differ
diff --git a/game/.import/help.png-e2b8cfcaccb3e2cf0ea7059f79a1642c.stex b/game/.import/help.png-e2b8cfcaccb3e2cf0ea7059f79a1642c.stex
new file mode 100644
index 0000000..90e05e0
Binary files /dev/null and b/game/.import/help.png-e2b8cfcaccb3e2cf0ea7059f79a1642c.stex differ
diff --git a/game/.import/house.png-90b2798c1dfceadf2b73486f421d1f9c.stex b/game/.import/house.png-90b2798c1dfceadf2b73486f421d1f9c.stex
new file mode 100644
index 0000000..62b8d82
Binary files /dev/null and b/game/.import/house.png-90b2798c1dfceadf2b73486f421d1f9c.stex differ
diff --git a/game/.import/progress_texture.png-457c15d58017cd09c9bd2f6adbe8ac4e.stex b/game/.import/progress_texture.png-457c15d58017cd09c9bd2f6adbe8ac4e.stex
new file mode 100644
index 0000000..c5b3905
Binary files /dev/null and b/game/.import/progress_texture.png-457c15d58017cd09c9bd2f6adbe8ac4e.stex differ
diff --git a/game/.import/road_cross.png-c9952a90dbaaecffbc9e220ef4dbdc8d.stex b/game/.import/road_cross.png-c9952a90dbaaecffbc9e220ef4dbdc8d.stex
new file mode 100644
index 0000000..0979abf
Binary files /dev/null and b/game/.import/road_cross.png-c9952a90dbaaecffbc9e220ef4dbdc8d.stex differ
diff --git a/game/.import/road_single.png-cf1cddecd73dd335a077840111cb9343.stex b/game/.import/road_single.png-cf1cddecd73dd335a077840111cb9343.stex
new file mode 100644
index 0000000..7e984b0
Binary files /dev/null and b/game/.import/road_single.png-cf1cddecd73dd335a077840111cb9343.stex differ
diff --git a/game/.import/road_straight.png-87dff282d0a16c1706f7235cbdb25bb6.stex b/game/.import/road_straight.png-87dff282d0a16c1706f7235cbdb25bb6.stex
new file mode 100644
index 0000000..26db624
Binary files /dev/null and b/game/.import/road_straight.png-87dff282d0a16c1706f7235cbdb25bb6.stex differ
diff --git a/game/.import/road_tee.png-1e119bbfbb4a1c0ab0627bf2e30a96d2.stex b/game/.import/road_tee.png-1e119bbfbb4a1c0ab0627bf2e30a96d2.stex
new file mode 100644
index 0000000..44e5be1
Binary files /dev/null and b/game/.import/road_tee.png-1e119bbfbb4a1c0ab0627bf2e30a96d2.stex differ
diff --git a/game/.import/tiled.png-056a3a2e257801d36b0b2b85a83d0c60.stex b/game/.import/tiled.png-056a3a2e257801d36b0b2b85a83d0c60.stex
new file mode 100644
index 0000000..91f647c
Binary files /dev/null and b/game/.import/tiled.png-056a3a2e257801d36b0b2b85a83d0c60.stex differ
diff --git a/game/.import/tiled.png-ef727fc4b3b4a5e804e2f623484b6474.stex b/game/.import/tiled.png-ef727fc4b3b4a5e804e2f623484b6474.stex
new file mode 100644
index 0000000..91f647c
Binary files /dev/null and b/game/.import/tiled.png-ef727fc4b3b4a5e804e2f623484b6474.stex differ
diff --git a/game/.import/water.png-cfef9686b4b28753118fd0b3683f052e.stex b/game/.import/water.png-cfef9686b4b28753118fd0b3683f052e.stex
new file mode 100644
index 0000000..900615c
Binary files /dev/null and b/game/.import/water.png-cfef9686b4b28753118fd0b3683f052e.stex differ
diff --git a/game/game.gd b/game/game.gd
new file mode 100644
index 0000000..97fc4a7
--- /dev/null
+++ b/game/game.gd
@@ -0,0 +1,249 @@
+extends Node
+
+# class member variables go here, for example:
+# var a = 2
+# var b = "textvar"
+
+
+var command_registry = Dictionary();
+var command_history = []
+
+export(bool) var debug = false
+
+export(NodePath) var level_path = 'res://levels/sample/level.tscn'
+var level = null
+
+export(float) var turn_max_length = 60.0 # Seconds
+var turn_time_left = -1.0
+
+export(int) var population_start = 10
+export(int) var jobs_start = 0
+export(int) var food_start = 20
+export(int) var resources_start = 0
+export(int) var effort_start = 20
+export(int) var goods_start = 0
+
+var game_resources = {
+ 'population': population_start,
+ 'jobs': jobs_start,
+ 'food': food_start,
+ 'resources': resources_start,
+ 'effort': effort_start,
+ 'goods': goods_start,
+}
+var turns = 0
+
+var build_regex = RegEx.new()
+var set_resource_regex = RegEx.new()
+# Game rules ish
+export(bool) var advance_turn_on_successful_command = true
+
+var game_object_registry = {
+ # TileMap ID. this is a crap way. but hey. do it fast.
+ 2: {
+ "name": 'road',
+ },
+ 3: {
+ "name": 'road',
+ },
+ 4: {
+ 'name': 'road',
+ },
+ 5: {
+ 'name': 'road',
+ },
+ 6: {
+ 'name': 'bridge',
+ },
+ 7: {
+ 'name': 'house'
+ },
+ 8: {
+ "name": 'farm',
+ "node_path": 'N/A',
+ }
+}
+
+func _ready():
+ # Called every time the node is added to the scene.
+ # Initialization here
+ self.register_command('help', funcref(self, "command_help"))
+ self.build_regex.compile("build (?[a-z_]*) (?\\d+),(?\\d+)")
+ self.register_command('build', funcref(self, "command_build"))
+ self.register_command('skip', funcref(self, 'command_skip'))
+ self.set_level(self.level_path)
+ if not self.debug:
+ get_node('ui/left sidebar/toggleWorldButton').hide()
+ if self.debug:
+ self.register_command('set_resource', funcref(self, 'command_set_resource'))
+ self.set_resource_regex.compile('set_resource (?[a-z_]*) (?\\d+)')
+ get_node('ui/right sidebar/resources').update_resources(self.game_resources)
+
+func set_level(path):
+ self.level = load(self.level_path).instance()
+ self.level.hide()
+ # Display?
+ get_node('world').add_child(self.level)
+ get_node('ui/right sidebar/MapSizeContainer').set_level_size(self.level.get_level_size())
+ # Set objects / simulation parameters.
+
+ # Start time
+ self.turn_time_left = self.turn_max_length
+ get_node('ui/right sidebar/timer').set_time_max(self.turn_max_length)
+ self.update_timer()
+
+func _process(delta):
+# # Called every frame. Delta is time since last frame.
+# # Update game logic here.
+ self.turn_time_left -= delta
+ if self.turn_time_left <= 0.0:
+ self.advance_turn()
+ self.update_timer()
+
+func advance_turn():
+ self.turn_time_left = self.turn_max_length
+ # Find people who can't get to jobs
+ # Find unfilled jobs
+ # Report unconnected buildings
+ # Update stats: consume food, word, etc.
+ self.turns += 1
+
+func update_timer():
+ get_node('ui/right sidebar/timer').set_time_left(self.turn_time_left)
+
+# A player has hit enter
+func _on_prompt_text_entered(new_text):
+ history_append(new_text)
+ if new_text:
+ run_command(new_text)
+ # @TODO Run the command
+ get_node('ui/prompt').clear()
+
+func history_append(text, is_command_result = false, return_code = 0):
+ var n = get_node('ui/ViewportContainer/history')
+ if not n:
+ return
+ if is_command_result:
+ if return_code != 0:
+ n.push_color(Color(1.0, 0.0, 0.0, 1.0))
+ n.add_text(' > (%d) %s' %[return_code, text])
+ if return_code != 0:
+ n.pop()
+ else:
+ n.add_text("$ " + text)
+ n.newline()
+
+func history_search():
+ pass
+
+func run_command(text):
+ var result;
+ var callback = parse_command(text)
+ if not callback[1]:
+ result = [-1, 'Command "%s" not found' % callback[0]]
+ else:
+ result = callback[1].call_func(text)
+ self.history_append(result[1], true, result[0])
+ # Possibly advance the turn depending on the game rule.
+ if self.advance_turn_on_successful_command && result[0] == 0:
+ self.advance_turn()
+
+func parse_command(text):
+ var a = text.split(' ')
+ if self.command_registry.has(a[0]):
+ return [a[0], self.command_registry[a[0]]]
+ return [a[0], false]
+
+func register_command(name, callback):
+ self.command_registry[name] = callback;
+
+func remove_command(name):
+ if self.command_registry.has(name):
+ self.command_registry.erase(name);
+
+func command_help(text):
+ print("received command: '%s'" % text)
+ return [0, 'no!']
+
+func command_set_resource(text):
+ var r = self.set_resource_regex.search(text)
+ if r == null:
+ return [-1, 'set_resource command could not match arguments. Format: set_resource ']
+ var resource_name = r.get_string(1)
+ if ! self.game_resources.has(resource_name):
+ return [-2, 'Resource "%s" does not exist' %resource_name]
+ var value = int(r.get_string(2))
+ self.set_game_resource(resource_name, value)
+ return [0, 'Set resource "%s" to %d' %[resource_name, value]]
+
+func set_game_resource(name, value):
+ self.game_resources[name] = value
+ get_node('ui/right sidebar/resources').update_resources(self.game_resources)
+
+func command_build(text):
+ var r = self.build_regex.search(text)
+ if r == null:
+ return [-1, 'Build command could not match arguments. Format: build ,']
+ var object_id = _get_obj_id_by_name(r.get_string(1))
+ if object_id == null:
+ return [-3, "Object with id '%s' is not registered" % r.get_string(1)]
+ var p = Vector2(int(r.get_string(2)), int(r.get_string(3)))
+ if not _is_in_level(p):
+ return [-4, "Point %d,%d is not in current level" %[p.x, p.y]]
+ var obj_exists = _obj_exists_in_level(p)
+ if obj_exists:
+ var obj_name = self.game_object_registry[_obj_in_level(p)]['name']
+ return [-5, "Object %s already exists at %d, %d" % [obj_name, p.x, p.y]]
+ # Check if base terrain is valid.
+ var terrain_object_id = self.level.get_node('terrain').get_cellv(p)
+ if terrain_object_id == -1:
+ return [-6, "No terrain underneath point at %d,%d" %[p.x, p.y]]
+ # grass
+ if terrain_object_id == 0 && object_id == 6:
+ return [-7, "Can not build over water at %d,%d" %[p.x, p.y]]
+ if terrain_object_id == 1 && object_id != 6:
+ return [-8, "Can not build over grass at %d,%d" %[p.x, p.y]]
+ # (optional) check resources
+ # Build
+ self.level.get_node('objects').set_cellv(p, object_id)
+ # (optional) spend resources
+ return [0, 'Built %s at %d,%d' % [self.game_object_registry[object_id]['name'], p.x, p.y]]
+
+func _is_in_level(v):
+ if v.x >= self.level.origin.x and v.x <= self.level.origin.x + self.level.width and \
+ v.y >= self.level.origin.y and v.y <= self.level.origin.y + self.level.height:
+ return true
+ return false
+
+func _get_obj_id_by_name(n):
+ for i in self.game_object_registry.keys():
+ if self.game_object_registry[i]['name'] == n:
+ return i
+ return null
+
+func _obj_in_level(v):
+ var c = self.level.get_node('objects').get_cellv(v)
+ if c == -1:
+ return null
+ return c
+
+func _obj_exists_in_level(v):
+ if _obj_in_level(v) != null:
+ return true
+ return false
+
+
+func _on_toggleWorldButton_toggled(button_pressed):
+ print(button_pressed)
+ if self.level.is_visible_in_tree():
+ self.level.hide()
+ else:
+ self.level.show()
+
+func command_skip(t):
+ self.advance_turn()
+ return [0, 'OK']
+
+func _on_timer_skip_presssed():
+ print('a')
+ self.advance_turn()
diff --git a/game/game.tscn b/game/game.tscn
new file mode 100644
index 0000000..fd1859b
--- /dev/null
+++ b/game/game.tscn
@@ -0,0 +1,411 @@
+[gd_scene load_steps=10 format=2]
+
+[ext_resource path="res://game.gd" type="Script" id=1]
+[ext_resource path="res://ui/prompt.gd" type="Script" id=2]
+[ext_resource path="res://ui/help.png" type="Texture" id=3]
+[ext_resource path="res://ui/mapsize.tscn" type="PackedScene" id=4]
+[ext_resource path="res://ui/timer.tscn" type="PackedScene" id=5]
+[ext_resource path="res://ui/current_resources.tscn" type="PackedScene" id=6]
+[ext_resource path="res://help_popup.gd" type="Script" id=7]
+
+[sub_resource type="Environment" id=1]
+
+background_mode = 0
+background_sky_custom_fov = 0.0
+background_color = Color( 0, 0, 0, 1 )
+background_energy = 1.0
+background_canvas_max_layer = 0
+ambient_light_color = Color( 0, 0, 0, 1 )
+ambient_light_energy = 1.0
+ambient_light_sky_contribution = 1.0
+fog_enabled = false
+fog_color = Color( 0.5, 0.6, 0.7, 1 )
+fog_sun_color = Color( 1, 0.9, 0.7, 1 )
+fog_sun_amount = 0.0
+fog_depth_enabled = true
+fog_depth_begin = 10.0
+fog_depth_curve = 1.0
+fog_transmit_enabled = false
+fog_transmit_curve = 1.0
+fog_height_enabled = false
+fog_height_min = 0.0
+fog_height_max = 100.0
+fog_height_curve = 1.0
+tonemap_mode = 0
+tonemap_exposure = 1.0
+tonemap_white = 1.0
+auto_exposure_enabled = false
+auto_exposure_scale = 0.4
+auto_exposure_min_luma = 0.05
+auto_exposure_max_luma = 8.0
+auto_exposure_speed = 0.5
+ss_reflections_enabled = false
+ss_reflections_max_steps = 64
+ss_reflections_fade_in = 0.15
+ss_reflections_fade_out = 2.0
+ss_reflections_depth_tolerance = 0.2
+ss_reflections_roughness = true
+ssao_enabled = false
+ssao_radius = 1.0
+ssao_intensity = 1.0
+ssao_radius2 = 0.0
+ssao_intensity2 = 1.0
+ssao_bias = 0.01
+ssao_light_affect = 0.0
+ssao_color = Color( 0, 0, 0, 1 )
+ssao_quality = 0
+ssao_blur = 3
+ssao_edge_sharpness = 4.0
+dof_blur_far_enabled = false
+dof_blur_far_distance = 10.0
+dof_blur_far_transition = 5.0
+dof_blur_far_amount = 0.1
+dof_blur_far_quality = 1
+dof_blur_near_enabled = false
+dof_blur_near_distance = 2.0
+dof_blur_near_transition = 1.0
+dof_blur_near_amount = 0.1
+dof_blur_near_quality = 1
+glow_enabled = false
+glow_levels/1 = false
+glow_levels/2 = false
+glow_levels/3 = true
+glow_levels/4 = false
+glow_levels/5 = true
+glow_levels/6 = false
+glow_levels/7 = false
+glow_intensity = 0.8
+glow_strength = 1.0
+glow_bloom = 0.0
+glow_blend_mode = 2
+glow_hdr_threshold = 1.0
+glow_hdr_scale = 2.0
+glow_bicubic_upscale = false
+adjustment_enabled = false
+adjustment_brightness = 1.0
+adjustment_contrast = 1.0
+adjustment_saturation = 1.0
+
+[sub_resource type="World" id=2]
+
+environment = SubResource( 1 )
+
+[node name="game" type="Node" index="0"]
+
+script = ExtResource( 1 )
+debug = true
+level_path = "res://levels/sample/level.tscn"
+turn_max_length = 60.0
+population_start = 10
+jobs_start = 0
+food_start = 20
+resources_start = 0
+effort_start = 20
+goods_start = 0
+advance_turn_on_successful_command = true
+
+[node name="ui" type="Control" parent="." index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_right = 40.0
+margin_bottom = 40.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+_sections_unfolded = [ "Anchor", "Grow Direction", "Hint", "Margin", "Material", "Rect", "Visibility" ]
+
+[node name="left sidebar" type="VBoxContainer" parent="ui" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_right = 175.0
+margin_bottom = 600.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 0
+_sections_unfolded = [ "Rect", "Size Flags" ]
+
+[node name="toggleWorldButton" type="CheckButton" parent="ui/left sidebar" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_right = 175.0
+margin_bottom = 40.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+focus_mode = 2
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+toggle_mode = true
+enabled_focus_mode = 2
+shortcut = null
+group = null
+text = "Show World"
+flat = false
+align = 0
+
+[node name="ViewportContainer" type="ViewportContainer" parent="ui" index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 175.0
+margin_right = 850.0
+margin_bottom = 550.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+stretch = false
+stretch_shrink = 1
+_sections_unfolded = [ "Rect" ]
+
+[node name="history" type="RichTextLabel" parent="ui/ViewportContainer" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 2.0
+margin_top = 1.0
+margin_right = 677.0
+margin_bottom = 551.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = true
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+bbcode_enabled = false
+bbcode_text = ""
+visible_characters = -1
+percent_visible = 1.0
+meta_underlined = true
+tab_size = 4
+text = ""
+scroll_active = true
+scroll_following = false
+selection_enabled = false
+override_selected_font_color = false
+
+[node name="Viewport" type="Viewport" parent="ui/ViewportContainer" index="1"]
+
+arvr = false
+size = Vector2( 0, 0 )
+own_world = true
+world = SubResource( 2 )
+transparent_bg = false
+msaa = 0
+hdr = true
+disable_3d = false
+usage = 2
+debug_draw = 0
+render_target_v_flip = false
+render_target_clear_mode = 0
+render_target_update_mode = 3
+audio_listener_enable_2d = false
+audio_listener_enable_3d = false
+physics_object_picking = false
+gui_disable_input = false
+gui_snap_controls_to_pixels = true
+shadow_atlas_size = 0
+shadow_atlas_quad_0 = 2
+shadow_atlas_quad_1 = 2
+shadow_atlas_quad_2 = 3
+shadow_atlas_quad_3 = 4
+
+[node name="prompt" type="LineEdit" parent="ui" index="2"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 175.0
+margin_top = 550.0
+margin_right = 850.0
+margin_bottom = 600.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+focus_mode = 2
+mouse_filter = 0
+mouse_default_cursor_shape = 1
+size_flags_horizontal = 1
+size_flags_vertical = 1
+focus_mode = 2
+context_menu_enabled = true
+placeholder_text = "Click here and type to start entering commands"
+placeholder_alpha = 0.6
+caret_blink = true
+caret_blink_speed = 0.65
+caret_position = 0
+script = ExtResource( 2 )
+_sections_unfolded = [ "Caret", "Placeholder", "Rect" ]
+
+[node name="right sidebar" type="VBoxContainer" parent="ui" index="3"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 850.0
+margin_right = 1025.0
+margin_bottom = 600.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 0
+_sections_unfolded = [ "Rect" ]
+
+[node name="help" type="Button" parent="ui/right sidebar" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_right = 175.0
+margin_bottom = 38.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+focus_mode = 2
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+toggle_mode = false
+enabled_focus_mode = 2
+shortcut = null
+group = null
+text = "Help"
+icon = ExtResource( 3 )
+flat = false
+align = 1
+_sections_unfolded = [ "Rect", "Textures", "Theme", "Visibility" ]
+
+[node name="MapSizeContainer" parent="ui/right sidebar" index="1" instance=ExtResource( 4 )]
+
+margin_top = 42.0
+margin_bottom = 56.0
+alignment = 2
+
+[node name="timer" parent="ui/right sidebar" index="2" instance=ExtResource( 5 )]
+
+margin_top = 60.0
+margin_bottom = 260.0
+rect_min_size = Vector2( 175, 200 )
+
+[node name="resources" parent="ui/right sidebar" index="3" instance=ExtResource( 6 )]
+
+margin_top = 264.0
+margin_bottom = 464.0
+rect_min_size = Vector2( 175, 200 )
+
+[node name="help_popup" type="PopupPanel" parent="ui" index="4"]
+
+editor/display_folded = true
+visible = false
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 166.0
+margin_top = 2.0
+margin_right = 852.0
+margin_bottom = 539.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+popup_exclusive = true
+script = ExtResource( 7 )
+_sections_unfolded = [ "Popup" ]
+
+[node name="Label" type="Label" parent="ui/help_popup" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 310.0
+margin_top = 5.0
+margin_right = 350.0
+margin_bottom = 19.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 2
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 4
+text = "Help"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="ToolButton" type="ToolButton" parent="ui/help_popup" index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 5.0
+margin_top = 5.0
+margin_right = 52.0
+margin_bottom = 27.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+focus_mode = 2
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+toggle_mode = false
+enabled_focus_mode = 2
+shortcut = null
+group = null
+text = "Close"
+flat = true
+align = 1
+
+[node name="world" type="Node2D" parent="." index="1"]
+
+z_index = -1
+_sections_unfolded = [ "Transform", "Z Index" ]
+
+[connection signal="toggled" from="ui/left sidebar/toggleWorldButton" to="." method="_on_toggleWorldButton_toggled"]
+
+[connection signal="gui_input" from="ui/prompt" to="ui/prompt" method="_on_prompt_gui_input"]
+
+[connection signal="text_entered" from="ui/prompt" to="." method="_on_prompt_text_entered"]
+
+[connection signal="text_entered" from="ui/prompt" to="ui/prompt" method="_on_prompt_text_entered"]
+
+[connection signal="pressed" from="ui/right sidebar/help" to="ui/help_popup" method="_on_help_pressed"]
+
+[connection signal="skip_presssed" from="ui/right sidebar/timer" to="." method="_on_timer_skip_presssed"]
+
+[connection signal="pressed" from="ui/help_popup/ToolButton" to="ui/help_popup" method="_on_ToolButton_pressed"]
+
+
diff --git a/game/help_popup.gd b/game/help_popup.gd
new file mode 100644
index 0000000..5305a5b
--- /dev/null
+++ b/game/help_popup.gd
@@ -0,0 +1,23 @@
+extends PopupPanel
+
+# class member variables go here, for example:
+# var a = 2
+# var b = "textvar"
+
+func _ready():
+ # Called every time the node is added to the scene.
+ # Initialization here
+ pass
+
+#func _process(delta):
+# # Called every frame. Delta is time since last frame.
+# # Update game logic here.
+# pass
+
+
+func _on_help_pressed():
+ self.popup()
+
+
+func _on_ToolButton_pressed():
+ self.hide()
diff --git a/game/levels/sample/level.gd b/game/levels/sample/level.gd
new file mode 100644
index 0000000..a3e1f71
--- /dev/null
+++ b/game/levels/sample/level.gd
@@ -0,0 +1,22 @@
+extends Node2D
+
+# class member variables go here, for example:
+# var a = 2
+# var b = "textvar"
+
+export(int) var height;
+export(int) var width;
+export(Vector2) var origin = Vector2(0, 0)
+
+func _ready():
+ # Called every time the node is added to the scene.
+ # Initialization here
+ pass
+
+#func _process(delta):
+# # Called every frame. Delta is time since last frame.
+# # Update game logic here.
+# pass
+
+func get_level_size():
+ return Vector2(self.width, self.height)
\ No newline at end of file
diff --git a/game/levels/sample/level.tscn b/game/levels/sample/level.tscn
new file mode 100644
index 0000000..939d160
--- /dev/null
+++ b/game/levels/sample/level.tscn
@@ -0,0 +1,37 @@
+[gd_scene load_steps=4 format=2]
+
+[ext_resource path="res://levels/sample/level.gd" type="Script" id=1]
+[ext_resource path="res://levels/sample/terrain.tscn" type="PackedScene" id=2]
+[ext_resource path="res://levels/tilesets/default/default.tres" type="TileSet" id=3]
+
+[node name="level" type="Node2D"]
+
+script = ExtResource( 1 )
+height = 19
+width = 32
+origin = Vector2( 0, 0 )
+
+[node name="terrain" parent="." index="0" instance=ExtResource( 2 )]
+
+[node name="objects" type="TileMap" parent="." index="1"]
+
+mode = 0
+tile_set = ExtResource( 3 )
+cell_size = Vector2( 32, 32 )
+cell_quadrant_size = 16
+cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
+cell_half_offset = 2
+cell_tile_origin = 0
+cell_y_sort = false
+cell_clip_uv = false
+collision_use_kinematic = false
+collision_friction = 1.0
+collision_bounce = 0.0
+collision_layer = 1
+collision_mask = 1
+occluder_light_mask = 1
+format = 1
+tile_data = PoolIntArray( 196612, 8, 0, 196624, 7, 0 )
+_sections_unfolded = [ "Cell" ]
+
+
diff --git a/game/levels/sample/sample_level.tmx b/game/levels/sample/sample_level.tmx
new file mode 100644
index 0000000..d6d184b
--- /dev/null
+++ b/game/levels/sample/sample_level.tmx
@@ -0,0 +1,58 @@
+
+
diff --git a/game/levels/sample/sample_level.tmx.import b/game/levels/sample/sample_level.tmx.import
new file mode 100644
index 0000000..625f6e5
--- /dev/null
+++ b/game/levels/sample/sample_level.tmx.import
@@ -0,0 +1,20 @@
+[remap]
+
+importer="vnen.tiled_importer"
+type="PackedScene"
+valid=false
+
+[deps]
+
+source_file="res://levels/sample/sample_level.tmx"
+source_md5="c93c2b42ad236f11d839e7afb7ef89ab"
+
+[params]
+
+custom_properties=false
+tile_metadata=true
+uv_clip=true
+image_flags=7
+embed_internal_images=true
+save_tiled_properties=false
+post_import_script=""
diff --git a/game/levels/sample/sample_level.tsx b/game/levels/sample/sample_level.tsx
new file mode 100644
index 0000000..6d7a37a
--- /dev/null
+++ b/game/levels/sample/sample_level.tsx
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/game/levels/sample/sample_level.tsx.import b/game/levels/sample/sample_level.tsx.import
new file mode 100644
index 0000000..2e83230
--- /dev/null
+++ b/game/levels/sample/sample_level.tsx.import
@@ -0,0 +1,20 @@
+[remap]
+
+importer="vnen.tiled_tileset_importer"
+type="TileSet"
+valid=false
+
+[deps]
+
+source_file="res://levels/sample/sample_level.tsx"
+source_md5="093f655dca7c76883d0057a4d3963412"
+
+[params]
+
+custom_properties=true
+tile_metadata=true
+image_flags=7
+embed_internal_images=true
+save_tiled_properties=true
+apply_offset=false
+post_import_script=""
diff --git a/game/levels/sample/terrain.tscn b/game/levels/sample/terrain.tscn
new file mode 100644
index 0000000..dbf53ba
--- /dev/null
+++ b/game/levels/sample/terrain.tscn
@@ -0,0 +1,26 @@
+[gd_scene load_steps=2 format=2]
+
+[ext_resource path="res://levels/tilesets/default/default.tres" type="TileSet" id=1]
+
+[node name="level" type="TileMap"]
+
+mode = 0
+tile_set = ExtResource( 1 )
+cell_size = Vector2( 32, 32 )
+cell_quadrant_size = 16
+cell_custom_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
+cell_half_offset = 2
+cell_tile_origin = 0
+cell_y_sort = false
+cell_clip_uv = false
+collision_use_kinematic = false
+collision_friction = 1.0
+collision_bounce = 0.0
+collision_layer = 1
+collision_mask = 1
+occluder_light_mask = 1
+format = 1
+tile_data = PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 17, 0, 0, 18, 0, 0, 19, 0, 0, 20, 0, 0, 21, 0, 0, 22, 0, 0, 23, 0, 0, 24, 0, 0, 25, 0, 0, 26, 0, 0, 27, 0, 0, 28, 0, 0, 29, 1, 0, 30, 0, 0, 31, 0, 0, 65536, 0, 0, 65537, 0, 0, 65538, 0, 0, 65539, 0, 0, 65540, 0, 0, 65541, 0, 0, 65542, 0, 0, 65543, 0, 0, 65544, 0, 0, 65545, 0, 0, 65546, 0, 0, 65547, 0, 0, 65548, 0, 0, 65549, 0, 0, 65550, 0, 0, 65551, 0, 0, 65552, 0, 0, 65553, 0, 0, 65554, 0, 0, 65555, 0, 0, 65556, 0, 0, 65557, 0, 0, 65558, 0, 0, 65559, 0, 0, 65560, 0, 0, 65561, 0, 0, 65562, 0, 0, 65563, 0, 0, 65564, 1, 0, 65565, 1, 0, 65566, 0, 0, 65567, 0, 0, 131072, 0, 0, 131073, 0, 0, 131074, 0, 0, 131075, 0, 0, 131076, 0, 0, 131077, 0, 0, 131078, 0, 0, 131079, 0, 0, 131080, 0, 0, 131081, 0, 0, 131082, 0, 0, 131083, 0, 0, 131084, 0, 0, 131085, 0, 0, 131086, 0, 0, 131087, 0, 0, 131088, 0, 0, 131089, 0, 0, 131090, 0, 0, 131091, 0, 0, 131092, 0, 0, 131093, 0, 0, 131094, 0, 0, 131095, 0, 0, 131096, 0, 0, 131097, 0, 0, 131098, 0, 0, 131099, 0, 0, 131100, 1, 0, 131101, 0, 0, 131102, 0, 0, 131103, 0, 0, 196608, 0, 0, 196609, 0, 0, 196610, 0, 0, 196611, 0, 0, 196612, 0, 0, 196613, 0, 0, 196614, 0, 0, 196615, 0, 0, 196616, 0, 0, 196617, 0, 0, 196618, 0, 0, 196619, 0, 0, 196620, 0, 0, 196621, 0, 0, 196622, 0, 0, 196623, 0, 0, 196624, 0, 0, 196625, 0, 0, 196626, 0, 0, 196627, 0, 0, 196628, 0, 0, 196629, 0, 0, 196630, 0, 0, 196631, 0, 0, 196632, 0, 0, 196633, 0, 0, 196634, 1, 0, 196635, 1, 0, 196636, 1, 0, 196637, 0, 0, 196638, 0, 0, 196639, 0, 0, 262144, 0, 0, 262145, 0, 0, 262146, 0, 0, 262147, 0, 0, 262148, 0, 0, 262149, 0, 0, 262150, 0, 0, 262151, 0, 0, 262152, 0, 0, 262153, 0, 0, 262154, 0, 0, 262155, 0, 0, 262156, 0, 0, 262157, 0, 0, 262158, 0, 0, 262159, 0, 0, 262160, 0, 0, 262161, 0, 0, 262162, 0, 0, 262163, 0, 0, 262164, 0, 0, 262165, 0, 0, 262166, 0, 0, 262167, 0, 0, 262168, 0, 0, 262169, 0, 0, 262170, 1, 0, 262171, 0, 0, 262172, 0, 0, 262173, 0, 0, 262174, 0, 0, 262175, 0, 0, 327680, 0, 0, 327681, 0, 0, 327682, 0, 0, 327683, 0, 0, 327684, 0, 0, 327685, 0, 0, 327686, 0, 0, 327687, 0, 0, 327688, 0, 0, 327689, 0, 0, 327690, 0, 0, 327691, 0, 0, 327692, 0, 0, 327693, 0, 0, 327694, 1, 0, 327695, 1, 0, 327696, 1, 0, 327697, 1, 0, 327698, 1, 0, 327699, 1, 0, 327700, 1, 0, 327701, 0, 0, 327702, 0, 0, 327703, 0, 0, 327704, 0, 0, 327705, 0, 0, 327706, 1, 0, 327707, 0, 0, 327708, 0, 0, 327709, 0, 0, 327710, 0, 0, 327711, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 0, 0, 393219, 0, 0, 393220, 0, 0, 393221, 0, 0, 393222, 0, 0, 393223, 0, 0, 393224, 0, 0, 393225, 1, 0, 393226, 1, 0, 393227, 1, 0, 393228, 1, 0, 393229, 1, 0, 393230, 1, 0, 393231, 0, 0, 393232, 0, 0, 393233, 0, 0, 393234, 0, 0, 393235, 0, 0, 393236, 1, 0, 393237, 0, 0, 393238, 0, 0, 393239, 0, 0, 393240, 0, 0, 393241, 1, 0, 393242, 1, 0, 393243, 0, 0, 393244, 0, 0, 393245, 0, 0, 393246, 0, 0, 393247, 0, 0, 458752, 0, 0, 458753, 0, 0, 458754, 0, 0, 458755, 0, 0, 458756, 0, 0, 458757, 0, 0, 458758, 0, 0, 458759, 0, 0, 458760, 0, 0, 458761, 1, 0, 458762, 0, 0, 458763, 0, 0, 458764, 0, 0, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 458768, 0, 0, 458769, 0, 0, 458770, 0, 0, 458771, 0, 0, 458772, 1, 0, 458773, 0, 0, 458774, 0, 0, 458775, 1, 0, 458776, 1, 0, 458777, 1, 0, 458778, 0, 0, 458779, 0, 0, 458780, 0, 0, 458781, 0, 0, 458782, 0, 0, 458783, 0, 0, 524288, 0, 0, 524289, 0, 0, 524290, 0, 0, 524291, 0, 0, 524292, 0, 0, 524293, 0, 0, 524294, 0, 0, 524295, 0, 0, 524296, 1, 0, 524297, 1, 0, 524298, 0, 0, 524299, 0, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 524305, 0, 0, 524306, 0, 0, 524307, 0, 0, 524308, 1, 0, 524309, 1, 0, 524310, 1, 0, 524311, 1, 0, 524312, 0, 0, 524313, 0, 0, 524314, 0, 0, 524315, 0, 0, 524316, 0, 0, 524317, 0, 0, 524318, 0, 0, 524319, 0, 0, 589824, 1, 0, 589825, 1, 0, 589826, 0, 0, 589827, 0, 0, 589828, 0, 0, 589829, 0, 0, 589830, 0, 0, 589831, 0, 0, 589832, 1, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0, 589841, 0, 0, 589842, 0, 0, 589843, 0, 0, 589844, 1, 0, 589845, 1, 0, 589846, 0, 0, 589847, 0, 0, 589848, 0, 0, 589849, 0, 0, 589850, 0, 0, 589851, 0, 0, 589852, 0, 0, 589853, 0, 0, 589854, 0, 0, 589855, 0, 0, 655360, 0, 0, 655361, 0, 0, 655362, 1, 0, 655363, 1, 0, 655364, 1, 0, 655365, 1, 0, 655366, 1, 0, 655367, 1, 0, 655368, 1, 0, 655369, 0, 0, 655370, 0, 0, 655371, 0, 0, 655372, 0, 0, 655373, 0, 0, 655374, 0, 0, 655375, 0, 0, 655376, 0, 0, 655377, 0, 0, 655378, 0, 0, 655379, 0, 0, 655380, 1, 0, 655381, 0, 0, 655382, 0, 0, 655383, 0, 0, 655384, 0, 0, 655385, 0, 0, 655386, 0, 0, 655387, 0, 0, 655388, 0, 0, 655389, 0, 0, 655390, 0, 0, 655391, 0, 0, 720896, 0, 0, 720897, 0, 0, 720898, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0, 720903, 0, 0, 720904, 1, 0, 720905, 1, 0, 720906, 1, 0, 720907, 1, 0, 720908, 1, 0, 720909, 1, 0, 720910, 0, 0, 720911, 0, 0, 720912, 0, 0, 720913, 0, 0, 720914, 0, 0, 720915, 1, 0, 720916, 1, 0, 720917, 0, 0, 720918, 0, 0, 720919, 0, 0, 720920, 0, 0, 720921, 0, 0, 720922, 0, 0, 720923, 0, 0, 720924, 0, 0, 720925, 0, 0, 720926, 0, 0, 720927, 0, 0, 786432, 0, 0, 786433, 0, 0, 786434, 0, 0, 786435, 0, 0, 786436, 0, 0, 786437, 0, 0, 786438, 0, 0, 786439, 0, 0, 786440, 0, 0, 786441, 0, 0, 786442, 0, 0, 786443, 0, 0, 786444, 0, 0, 786445, 0, 0, 786446, 1, 0, 786447, 1, 0, 786448, 1, 0, 786449, 1, 0, 786450, 1, 0, 786451, 1, 0, 786452, 0, 0, 786453, 0, 0, 786454, 0, 0, 786455, 0, 0, 786456, 0, 0, 786457, 0, 0, 786458, 0, 0, 786459, 0, 0, 786460, 0, 0, 786461, 0, 0, 786462, 0, 0, 786463, 0, 0, 851968, 0, 0, 851969, 0, 0, 851970, 0, 0, 851971, 0, 0, 851972, 0, 0, 851973, 0, 0, 851974, 0, 0, 851975, 0, 0, 851976, 0, 0, 851977, 0, 0, 851978, 0, 0, 851979, 0, 0, 851980, 0, 0, 851981, 0, 0, 851982, 0, 0, 851983, 1, 0, 851984, 1, 0, 851985, 0, 0, 851986, 0, 0, 851987, 0, 0, 851988, 0, 0, 851989, 0, 0, 851990, 0, 0, 851991, 0, 0, 851992, 0, 0, 851993, 0, 0, 851994, 0, 0, 851995, 0, 0, 851996, 0, 0, 851997, 0, 0, 851998, 0, 0, 851999, 0, 0, 917504, 0, 0, 917505, 0, 0, 917506, 0, 0, 917507, 0, 0, 917508, 0, 0, 917509, 0, 0, 917510, 0, 0, 917511, 0, 0, 917512, 0, 0, 917513, 0, 0, 917514, 0, 0, 917515, 0, 0, 917516, 0, 0, 917517, 0, 0, 917518, 0, 0, 917519, 0, 0, 917520, 1, 0, 917521, 0, 0, 917522, 0, 0, 917523, 0, 0, 917524, 0, 0, 917525, 0, 0, 917526, 0, 0, 917527, 0, 0, 917528, 0, 0, 917529, 0, 0, 917530, 0, 0, 917531, 0, 0, 917532, 0, 0, 917533, 0, 0, 917534, 0, 0, 917535, 0, 0, 983040, 0, 0, 983041, 0, 0, 983042, 0, 0, 983043, 0, 0, 983044, 0, 0, 983045, 0, 0, 983046, 0, 0, 983047, 0, 0, 983048, 0, 0, 983049, 0, 0, 983050, 0, 0, 983051, 0, 0, 983052, 0, 0, 983053, 0, 0, 983054, 0, 0, 983055, 0, 0, 983056, 1, 0, 983057, 1, 0, 983058, 1, 0, 983059, 1, 0, 983060, 1, 0, 983061, 1, 0, 983062, 1, 0, 983063, 1, 0, 983064, 1, 0, 983065, 0, 0, 983066, 0, 0, 983067, 0, 0, 983068, 0, 0, 983069, 0, 0, 983070, 0, 0, 983071, 0, 0, 1048576, 0, 0, 1048577, 0, 0, 1048578, 0, 0, 1048579, 0, 0, 1048580, 0, 0, 1048581, 0, 0, 1048582, 0, 0, 1048583, 0, 0, 1048584, 0, 0, 1048585, 0, 0, 1048586, 0, 0, 1048587, 0, 0, 1048588, 0, 0, 1048589, 0, 0, 1048590, 0, 0, 1048591, 0, 0, 1048592, 0, 0, 1048593, 0, 0, 1048594, 0, 0, 1048595, 0, 0, 1048596, 0, 0, 1048597, 0, 0, 1048598, 0, 0, 1048599, 0, 0, 1048600, 1, 0, 1048601, 1, 0, 1048602, 0, 0, 1048603, 0, 0, 1048604, 0, 0, 1048605, 0, 0, 1048606, 0, 0, 1048607, 0, 0, 1114112, 0, 0, 1114113, 0, 0, 1114114, 0, 0, 1114115, 0, 0, 1114116, 0, 0, 1114117, 0, 0, 1114118, 0, 0, 1114119, 0, 0, 1114120, 0, 0, 1114121, 0, 0, 1114122, 0, 0, 1114123, 0, 0, 1114124, 0, 0, 1114125, 0, 0, 1114126, 0, 0, 1114127, 0, 0, 1114128, 0, 0, 1114129, 0, 0, 1114130, 0, 0, 1114131, 0, 0, 1114132, 0, 0, 1114133, 0, 0, 1114134, 0, 0, 1114135, 0, 0, 1114136, 0, 0, 1114137, 1, 0, 1114138, 0, 0, 1114139, 0, 0, 1114140, 0, 0, 1114141, 0, 0, 1114142, 0, 0, 1114143, 0, 0, 1179648, 0, 0, 1179649, 0, 0, 1179650, 0, 0, 1179651, 0, 0, 1179652, 0, 0, 1179653, 0, 0, 1179654, 0, 0, 1179655, 0, 0, 1179656, 0, 0, 1179657, 0, 0, 1179658, 0, 0, 1179659, 0, 0, 1179660, 0, 0, 1179661, 0, 0, 1179662, 0, 0, 1179663, 0, 0, 1179664, 0, 0, 1179665, 0, 0, 1179666, 0, 0, 1179667, 0, 0, 1179668, 0, 0, 1179669, 0, 0, 1179670, 0, 0, 1179671, 0, 0, 1179672, 0, 0, 1179673, 1, 0, 1179674, 0, 0, 1179675, 0, 0, 1179676, 0, 0, 1179677, 0, 0, 1179678, 0, 0, 1179679, 0, 0 )
+_sections_unfolded = [ "Cell", "Collision", "Z Index" ]
+
+
diff --git a/game/levels/tilesets/default/default.tres b/game/levels/tilesets/default/default.tres
new file mode 100644
index 0000000..f54fdac
--- /dev/null
+++ b/game/levels/tilesets/default/default.tres
@@ -0,0 +1,102 @@
+[gd_resource type="TileSet" load_steps=10 format=2]
+
+[ext_resource path="res://levels/tilesets/default/png/grass.png" type="Texture" id=1]
+[ext_resource path="res://levels/tilesets/default/png/water.png" type="Texture" id=2]
+[ext_resource path="res://levels/tilesets/default/png/road_cross.png" type="Texture" id=3]
+[ext_resource path="res://levels/tilesets/default/png/road_single.png" type="Texture" id=4]
+[ext_resource path="res://levels/tilesets/default/png/road_straight.png" type="Texture" id=5]
+[ext_resource path="res://levels/tilesets/default/png/road_tee.png" type="Texture" id=6]
+[ext_resource path="res://levels/tilesets/default/png/bridge.png" type="Texture" id=7]
+[ext_resource path="res://levels/tilesets/default/png/house.png" type="Texture" id=8]
+[ext_resource path="res://levels/tilesets/default/png/farm.png" type="Texture" id=9]
+
+[resource]
+
+0/name = "Grass"
+0/texture = ExtResource( 1 )
+0/tex_offset = Vector2( 0, 0 )
+0/modulate = Color( 1, 1, 1, 1 )
+0/region = Rect2( 0, 0, 0, 0 )
+0/is_autotile = false
+0/occluder_offset = Vector2( 0, 0 )
+0/navigation_offset = Vector2( 0, 0 )
+0/shapes = [ ]
+1/name = "Water"
+1/texture = ExtResource( 2 )
+1/tex_offset = Vector2( 0, 0 )
+1/modulate = Color( 1, 1, 1, 1 )
+1/region = Rect2( 0, 0, 0, 0 )
+1/is_autotile = false
+1/occluder_offset = Vector2( 0, 0 )
+1/navigation_offset = Vector2( 0, 0 )
+1/shapes = [ ]
+2/name = "Road (Cross)"
+2/texture = ExtResource( 3 )
+2/tex_offset = Vector2( 0, 0 )
+2/modulate = Color( 1, 1, 1, 1 )
+2/region = Rect2( 0, 0, 0, 0 )
+2/is_autotile = false
+2/occluder_offset = Vector2( 0, 0 )
+2/navigation_offset = Vector2( 0, 0 )
+2/shapes = [ {
+"autotile_coord": Vector2( 0, 0 ),
+"one_way": false,
+"shape": null,
+"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
+} ]
+3/name = "Road (End)"
+3/texture = ExtResource( 4 )
+3/tex_offset = Vector2( 0, 0 )
+3/modulate = Color( 1, 1, 1, 1 )
+3/region = Rect2( 0, 0, 0, 0 )
+3/is_autotile = false
+3/occluder_offset = Vector2( 0, 0 )
+3/navigation_offset = Vector2( 0, 0 )
+3/shapes = [ ]
+4/name = "Road (Straight)"
+4/texture = ExtResource( 5 )
+4/tex_offset = Vector2( 0, 0 )
+4/modulate = Color( 1, 1, 1, 1 )
+4/region = Rect2( 0, 0, 0, 0 )
+4/is_autotile = false
+4/occluder_offset = Vector2( 0, 0 )
+4/navigation_offset = Vector2( 0, 0 )
+4/shapes = [ ]
+5/name = "Road (Tee)"
+5/texture = ExtResource( 6 )
+5/tex_offset = Vector2( 0, 0 )
+5/modulate = Color( 1, 1, 1, 1 )
+5/region = Rect2( 0, 0, 0, 0 )
+5/is_autotile = false
+5/occluder_offset = Vector2( 0, 0 )
+5/navigation_offset = Vector2( 0, 0 )
+5/shapes = [ ]
+6/name = "Bridge"
+6/texture = ExtResource( 7 )
+6/tex_offset = Vector2( 0, 0 )
+6/modulate = Color( 1, 1, 1, 1 )
+6/region = Rect2( 0, 0, 0, 0 )
+6/is_autotile = false
+6/occluder_offset = Vector2( 0, 0 )
+6/navigation_offset = Vector2( 0, 0 )
+6/shapes = [ ]
+7/name = "House"
+7/texture = ExtResource( 8 )
+7/tex_offset = Vector2( 0, 0 )
+7/modulate = Color( 1, 1, 1, 1 )
+7/region = Rect2( 0, 0, 0, 0 )
+7/is_autotile = false
+7/occluder_offset = Vector2( 0, 0 )
+7/navigation_offset = Vector2( 0, 0 )
+7/shapes = [ ]
+8/name = "Farm"
+8/texture = ExtResource( 9 )
+8/tex_offset = Vector2( 0, 0 )
+8/modulate = Color( 1, 1, 1, 1 )
+8/region = Rect2( 0, 0, 0, 0 )
+8/is_autotile = false
+8/occluder_offset = Vector2( 0, 0 )
+8/navigation_offset = Vector2( 0, 0 )
+8/shapes = [ ]
+_sections_unfolded = [ "0", "1", "2", "3", "4", "5", "6", "7", "8" ]
+
diff --git a/game/levels/tilesets/default/default.tsx b/game/levels/tilesets/default/default.tsx
new file mode 100644
index 0000000..6d7a37a
--- /dev/null
+++ b/game/levels/tilesets/default/default.tsx
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/game/levels/tilesets/default/default.tsx.import b/game/levels/tilesets/default/default.tsx.import
new file mode 100644
index 0000000..b47c862
--- /dev/null
+++ b/game/levels/tilesets/default/default.tsx.import
@@ -0,0 +1,20 @@
+[remap]
+
+importer="vnen.tiled_tileset_importer"
+type="TileSet"
+valid=false
+
+[deps]
+
+source_file="res://levels/tilesets/default/default.tsx"
+source_md5="093f655dca7c76883d0057a4d3963412"
+
+[params]
+
+custom_properties=true
+tile_metadata=false
+image_flags=7
+embed_internal_images=false
+save_tiled_properties=false
+apply_offset=false
+post_import_script=""
diff --git a/game/levels/tilesets/default/png/bridge.png b/game/levels/tilesets/default/png/bridge.png
new file mode 100644
index 0000000..5eb92b3
Binary files /dev/null and b/game/levels/tilesets/default/png/bridge.png differ
diff --git a/game/levels/tilesets/default/png/bridge.png.import b/game/levels/tilesets/default/png/bridge.png.import
new file mode 100644
index 0000000..a2fbf43
--- /dev/null
+++ b/game/levels/tilesets/default/png/bridge.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/bridge.png-2db149efb21bb9bbfac413be9641e085.stex"
+
+[deps]
+
+source_file="res://levels/tilesets/default/png/bridge.png"
+source_md5="e8cbf8545804a79b256b9e3a3735460b"
+
+dest_files=[ "res://.import/bridge.png-2db149efb21bb9bbfac413be9641e085.stex" ]
+dest_md5="a95a2c1428670fb99095bc713ac6f243"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/levels/tilesets/default/png/farm.png b/game/levels/tilesets/default/png/farm.png
new file mode 100644
index 0000000..a51c633
Binary files /dev/null and b/game/levels/tilesets/default/png/farm.png differ
diff --git a/game/levels/tilesets/default/png/farm.png.import b/game/levels/tilesets/default/png/farm.png.import
new file mode 100644
index 0000000..fbd43b6
--- /dev/null
+++ b/game/levels/tilesets/default/png/farm.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/farm.png-defc6fd14185d12b7de4e2cbc06ae785.stex"
+
+[deps]
+
+source_file="res://levels/tilesets/default/png/farm.png"
+source_md5="a8a0165c22ff60a9e8226a5079ffecd0"
+
+dest_files=[ "res://.import/farm.png-defc6fd14185d12b7de4e2cbc06ae785.stex" ]
+dest_md5="2f62792167780bc1689e621e951723df"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/levels/tilesets/default/png/grass.png b/game/levels/tilesets/default/png/grass.png
new file mode 100644
index 0000000..706c35e
Binary files /dev/null and b/game/levels/tilesets/default/png/grass.png differ
diff --git a/game/levels/tilesets/default/png/grass.png.import b/game/levels/tilesets/default/png/grass.png.import
new file mode 100644
index 0000000..d5be1eb
--- /dev/null
+++ b/game/levels/tilesets/default/png/grass.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/grass.png-b7950067027b0d689b097507982efb2a.stex"
+
+[deps]
+
+source_file="res://levels/tilesets/default/png/grass.png"
+source_md5="3d1ff9f41d8a9f35816223b3706d4aae"
+
+dest_files=[ "res://.import/grass.png-b7950067027b0d689b097507982efb2a.stex" ]
+dest_md5="93bcdde3baabe028c90e91ca85e95f28"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/levels/tilesets/default/png/house.png b/game/levels/tilesets/default/png/house.png
new file mode 100644
index 0000000..1bd25d6
Binary files /dev/null and b/game/levels/tilesets/default/png/house.png differ
diff --git a/game/levels/tilesets/default/png/house.png.import b/game/levels/tilesets/default/png/house.png.import
new file mode 100644
index 0000000..47816d6
--- /dev/null
+++ b/game/levels/tilesets/default/png/house.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/house.png-90b2798c1dfceadf2b73486f421d1f9c.stex"
+
+[deps]
+
+source_file="res://levels/tilesets/default/png/house.png"
+source_md5="8bac60f2c16f7350223cb826508d06ea"
+
+dest_files=[ "res://.import/house.png-90b2798c1dfceadf2b73486f421d1f9c.stex" ]
+dest_md5="69b1c2780e71562bc7c1b04aebda2ac8"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/levels/tilesets/default/png/road_cross.png b/game/levels/tilesets/default/png/road_cross.png
new file mode 100644
index 0000000..7c2e23a
Binary files /dev/null and b/game/levels/tilesets/default/png/road_cross.png differ
diff --git a/game/levels/tilesets/default/png/road_cross.png.import b/game/levels/tilesets/default/png/road_cross.png.import
new file mode 100644
index 0000000..691f363
--- /dev/null
+++ b/game/levels/tilesets/default/png/road_cross.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/road_cross.png-c9952a90dbaaecffbc9e220ef4dbdc8d.stex"
+
+[deps]
+
+source_file="res://levels/tilesets/default/png/road_cross.png"
+source_md5="30767db6f91eac1ea98e7742b8abaa08"
+
+dest_files=[ "res://.import/road_cross.png-c9952a90dbaaecffbc9e220ef4dbdc8d.stex" ]
+dest_md5="a89dbe7c59146b4985ce9c6a7f9364ef"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/levels/tilesets/default/png/road_single.png b/game/levels/tilesets/default/png/road_single.png
new file mode 100644
index 0000000..ec83b34
Binary files /dev/null and b/game/levels/tilesets/default/png/road_single.png differ
diff --git a/game/levels/tilesets/default/png/road_single.png.import b/game/levels/tilesets/default/png/road_single.png.import
new file mode 100644
index 0000000..40a73c0
--- /dev/null
+++ b/game/levels/tilesets/default/png/road_single.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/road_single.png-cf1cddecd73dd335a077840111cb9343.stex"
+
+[deps]
+
+source_file="res://levels/tilesets/default/png/road_single.png"
+source_md5="17801f7f903b615e6dfd371e21a1f3a8"
+
+dest_files=[ "res://.import/road_single.png-cf1cddecd73dd335a077840111cb9343.stex" ]
+dest_md5="5e11880b21baef78db928866a5184cfa"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/levels/tilesets/default/png/road_straight.png b/game/levels/tilesets/default/png/road_straight.png
new file mode 100644
index 0000000..8ad655a
Binary files /dev/null and b/game/levels/tilesets/default/png/road_straight.png differ
diff --git a/game/levels/tilesets/default/png/road_straight.png.import b/game/levels/tilesets/default/png/road_straight.png.import
new file mode 100644
index 0000000..617923c
--- /dev/null
+++ b/game/levels/tilesets/default/png/road_straight.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/road_straight.png-87dff282d0a16c1706f7235cbdb25bb6.stex"
+
+[deps]
+
+source_file="res://levels/tilesets/default/png/road_straight.png"
+source_md5="b21b1e9a9c0cf458df8363de9ca44cc0"
+
+dest_files=[ "res://.import/road_straight.png-87dff282d0a16c1706f7235cbdb25bb6.stex" ]
+dest_md5="9a59eaa499d6f84258b5fc36e37111df"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/levels/tilesets/default/png/road_tee.png b/game/levels/tilesets/default/png/road_tee.png
new file mode 100644
index 0000000..09b421f
Binary files /dev/null and b/game/levels/tilesets/default/png/road_tee.png differ
diff --git a/game/levels/tilesets/default/png/road_tee.png.import b/game/levels/tilesets/default/png/road_tee.png.import
new file mode 100644
index 0000000..f3ca092
--- /dev/null
+++ b/game/levels/tilesets/default/png/road_tee.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/road_tee.png-1e119bbfbb4a1c0ab0627bf2e30a96d2.stex"
+
+[deps]
+
+source_file="res://levels/tilesets/default/png/road_tee.png"
+source_md5="080f804e7072a19355aa4b5ee53654e7"
+
+dest_files=[ "res://.import/road_tee.png-1e119bbfbb4a1c0ab0627bf2e30a96d2.stex" ]
+dest_md5="ee99abdaa173ac39ed31a360b170d4ac"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/levels/tilesets/default/png/water.png b/game/levels/tilesets/default/png/water.png
new file mode 100644
index 0000000..9a9f014
Binary files /dev/null and b/game/levels/tilesets/default/png/water.png differ
diff --git a/game/levels/tilesets/default/png/water.png.import b/game/levels/tilesets/default/png/water.png.import
new file mode 100644
index 0000000..d553cb4
--- /dev/null
+++ b/game/levels/tilesets/default/png/water.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/water.png-cfef9686b4b28753118fd0b3683f052e.stex"
+
+[deps]
+
+source_file="res://levels/tilesets/default/png/water.png"
+source_md5="96a9ed8fd6d25eaf7ba8656bf1072fd8"
+
+dest_files=[ "res://.import/water.png-cfef9686b4b28753118fd0b3683f052e.stex" ]
+dest_md5="4100211fef875f35a450c8e296a15f03"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/levels/tilesets/default/source/bridge.xcf b/game/levels/tilesets/default/source/bridge.xcf
new file mode 100644
index 0000000..1a8bdd8
Binary files /dev/null and b/game/levels/tilesets/default/source/bridge.xcf differ
diff --git a/game/levels/tilesets/default/source/farm.xcf b/game/levels/tilesets/default/source/farm.xcf
new file mode 100644
index 0000000..28321a5
Binary files /dev/null and b/game/levels/tilesets/default/source/farm.xcf differ
diff --git a/game/levels/tilesets/default/source/grass.xcf b/game/levels/tilesets/default/source/grass.xcf
new file mode 100644
index 0000000..b2830e4
Binary files /dev/null and b/game/levels/tilesets/default/source/grass.xcf differ
diff --git a/game/levels/tilesets/default/source/house.xcf b/game/levels/tilesets/default/source/house.xcf
new file mode 100644
index 0000000..0bcd5fe
Binary files /dev/null and b/game/levels/tilesets/default/source/house.xcf differ
diff --git a/game/levels/tilesets/default/source/road_cross.xcf b/game/levels/tilesets/default/source/road_cross.xcf
new file mode 100644
index 0000000..fc5345e
Binary files /dev/null and b/game/levels/tilesets/default/source/road_cross.xcf differ
diff --git a/game/levels/tilesets/default/source/road_single.xcf b/game/levels/tilesets/default/source/road_single.xcf
new file mode 100644
index 0000000..14fcbb3
Binary files /dev/null and b/game/levels/tilesets/default/source/road_single.xcf differ
diff --git a/game/levels/tilesets/default/source/road_straight.xcf b/game/levels/tilesets/default/source/road_straight.xcf
new file mode 100644
index 0000000..c798f97
Binary files /dev/null and b/game/levels/tilesets/default/source/road_straight.xcf differ
diff --git a/game/levels/tilesets/default/source/road_tee.xcf b/game/levels/tilesets/default/source/road_tee.xcf
new file mode 100644
index 0000000..7ce5686
Binary files /dev/null and b/game/levels/tilesets/default/source/road_tee.xcf differ
diff --git a/game/levels/tilesets/default/source/water.xcf b/game/levels/tilesets/default/source/water.xcf
new file mode 100644
index 0000000..fa9a196
Binary files /dev/null and b/game/levels/tilesets/default/source/water.xcf differ
diff --git a/game/mainmenu.tscn b/game/mainmenu.tscn
new file mode 100644
index 0000000..f977418
--- /dev/null
+++ b/game/mainmenu.tscn
@@ -0,0 +1,5 @@
+[gd_scene format=2]
+
+[node name="Node" type="Node"]
+
+
diff --git a/game/project.godot b/game/project.godot
index f20d7ac..e81a822 100644
--- a/game/project.godot
+++ b/game/project.godot
@@ -10,7 +10,7 @@ config_version=3
[application]
-config/name="Godot3 Project Template"
+config/name="LD41 : Sim S****y"
run/main_scene="res://tests/test-2d.tscn"
boot_splash/fullsize=false
config/icon="res://icon.png"
@@ -21,7 +21,7 @@ window/stretch/shrink="1"
[editor_plugins]
-enabled=PoolStringArray( "gut" )
+enabled=PoolStringArray( "tiled_importer" )
[rendering]
diff --git a/game/tests/test-2d.tscn b/game/tests/test-2d.tscn
index 3a39273..8b72a09 100644
--- a/game/tests/test-2d.tscn
+++ b/game/tests/test-2d.tscn
@@ -15,7 +15,7 @@ gradient = SubResource( 1 )
width = 1024
_sections_unfolded = [ "Resource" ]
-[node name="test-2d" type="Node" index="0"]
+[node name="test-2d" type="Node"]
script = ExtResource( 1 )
diff --git a/game/ui/clock.png b/game/ui/clock.png
new file mode 100644
index 0000000..3cc242d
Binary files /dev/null and b/game/ui/clock.png differ
diff --git a/game/ui/clock.png.import b/game/ui/clock.png.import
new file mode 100644
index 0000000..2b53509
--- /dev/null
+++ b/game/ui/clock.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/clock.png-09b4a660a58c86478b8ce31163fe5a4d.stex"
+
+[deps]
+
+source_file="res://ui/clock.png"
+source_md5="c51f169ca04f3f1454f4a36aca7b902a"
+
+dest_files=[ "res://.import/clock.png-09b4a660a58c86478b8ce31163fe5a4d.stex" ]
+dest_md5="45be711dfb788be0dcd6c54e33bb9fda"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/ui/current_resources.gd b/game/ui/current_resources.gd
new file mode 100644
index 0000000..438c46c
--- /dev/null
+++ b/game/ui/current_resources.gd
@@ -0,0 +1,33 @@
+extends Panel
+
+# class member variables go here, for example:
+# var a = 2
+# var b = "textvar"
+
+var resources = [
+ 'population',
+ 'jobs',
+ 'food',
+ 'resources',
+ 'effort',
+ 'goods'
+]
+
+func _ready():
+ # Called every time the node is added to the scene.
+ # Initialization here
+ pass
+
+func update_resources(r):
+ print(self.resources)
+ for i in self.resources:
+ if not i:
+ continue
+ var v = r[i]
+ get_node('HBoxContainer/%s/progress' %i).value = v
+ get_node('HBoxContainer/%s' %i).hint_tooltip = '%s: %d' %[i, v]
+
+#func _process(delta):
+# # Called every frame. Delta is time since last frame.
+# # Update game logic here.
+# pass
diff --git a/game/ui/current_resources.tscn b/game/ui/current_resources.tscn
new file mode 100644
index 0000000..4d560ee
--- /dev/null
+++ b/game/ui/current_resources.tscn
@@ -0,0 +1,449 @@
+[gd_scene load_steps=3 format=2]
+
+[ext_resource path="res://ui/current_resources.gd" type="Script" id=1]
+[ext_resource path="res://ui/progress_texture.png" type="Texture" id=2]
+
+[node name="resources" type="Panel"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 64.0
+margin_right = 175.0
+margin_bottom = 264.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+script = ExtResource( 1 )
+_sections_unfolded = [ "Rect" ]
+
+[node name="HBoxContainer" type="HBoxContainer" parent="." index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_right = 179.0
+margin_bottom = 197.0
+rect_min_size = Vector2( 175, 200 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 1
+_sections_unfolded = [ "Rect" ]
+
+[node name="population" type="VBoxContainer" parent="HBoxContainer" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 4.0
+margin_right = 29.0
+margin_bottom = 200.0
+rect_min_size = Vector2( 25, 0 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 2
+_sections_unfolded = [ "Rect" ]
+
+[node name="progress" type="TextureProgress" parent="HBoxContainer/population" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 21.0
+margin_right = 25.0
+margin_bottom = 196.0
+rect_min_size = Vector2( 0, 175 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+min_value = 0.0
+max_value = 100.0
+step = 1.0
+page = 0.0
+value = 0.0
+exp_edit = false
+rounded = false
+texture_under = null
+texture_over = null
+texture_progress = ExtResource( 2 )
+fill_mode = 3
+radial_fill_degrees = 360.0
+radial_center_offset = Vector2( 0, 0 )
+nine_patch_stretch = false
+_sections_unfolded = [ "Rect", "Textures" ]
+
+[node name="icon" type="TextureRect" parent="HBoxContainer/population" index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 200.0
+margin_right = 25.0
+margin_bottom = 200.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+stretch_mode = 0
+
+[node name="jobs" type="VBoxContainer" parent="HBoxContainer" index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 33.0
+margin_right = 58.0
+margin_bottom = 200.0
+rect_min_size = Vector2( 25, 0 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 2
+_sections_unfolded = [ "Rect" ]
+
+[node name="progress" type="TextureProgress" parent="HBoxContainer/jobs" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 21.0
+margin_right = 25.0
+margin_bottom = 196.0
+rect_min_size = Vector2( 0, 175 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+min_value = 0.0
+max_value = 100.0
+step = 1.0
+page = 0.0
+value = 0.0
+exp_edit = false
+rounded = false
+texture_under = null
+texture_over = null
+texture_progress = ExtResource( 2 )
+fill_mode = 3
+radial_fill_degrees = 360.0
+radial_center_offset = Vector2( 0, 0 )
+nine_patch_stretch = false
+_sections_unfolded = [ "Rect", "Textures" ]
+
+[node name="icon" type="TextureRect" parent="HBoxContainer/jobs" index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 200.0
+margin_right = 25.0
+margin_bottom = 200.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+stretch_mode = 0
+
+[node name="food" type="VBoxContainer" parent="HBoxContainer" index="2"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 62.0
+margin_right = 87.0
+margin_bottom = 200.0
+rect_min_size = Vector2( 25, 0 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 2
+_sections_unfolded = [ "Hint", "Rect" ]
+
+[node name="progress" type="TextureProgress" parent="HBoxContainer/food" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 21.0
+margin_right = 25.0
+margin_bottom = 196.0
+rect_min_size = Vector2( 0, 175 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+min_value = 0.0
+max_value = 100.0
+step = 1.0
+page = 0.0
+value = 0.0
+exp_edit = false
+rounded = false
+texture_under = null
+texture_over = null
+texture_progress = ExtResource( 2 )
+fill_mode = 3
+radial_fill_degrees = 360.0
+radial_center_offset = Vector2( 0, 0 )
+nine_patch_stretch = false
+_sections_unfolded = [ "Rect", "Textures" ]
+
+[node name="icon" type="TextureRect" parent="HBoxContainer/food" index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 200.0
+margin_right = 25.0
+margin_bottom = 200.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+stretch_mode = 0
+
+[node name="resources" type="VBoxContainer" parent="HBoxContainer" index="3"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 91.0
+margin_right = 116.0
+margin_bottom = 200.0
+rect_min_size = Vector2( 25, 0 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 2
+_sections_unfolded = [ "Rect" ]
+
+[node name="progress" type="TextureProgress" parent="HBoxContainer/resources" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 21.0
+margin_right = 25.0
+margin_bottom = 196.0
+rect_min_size = Vector2( 0, 175 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+min_value = 0.0
+max_value = 100.0
+step = 1.0
+page = 0.0
+value = 0.0
+exp_edit = false
+rounded = false
+texture_under = null
+texture_over = null
+texture_progress = ExtResource( 2 )
+fill_mode = 3
+radial_fill_degrees = 360.0
+radial_center_offset = Vector2( 0, 0 )
+nine_patch_stretch = false
+_sections_unfolded = [ "Rect", "Textures" ]
+
+[node name="icon" type="TextureRect" parent="HBoxContainer/resources" index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 200.0
+margin_right = 25.0
+margin_bottom = 200.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+stretch_mode = 0
+
+[node name="effort" type="VBoxContainer" parent="HBoxContainer" index="4"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 120.0
+margin_right = 145.0
+margin_bottom = 200.0
+rect_min_size = Vector2( 25, 0 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 2
+_sections_unfolded = [ "Rect" ]
+
+[node name="progress" type="TextureProgress" parent="HBoxContainer/effort" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 21.0
+margin_right = 25.0
+margin_bottom = 196.0
+rect_min_size = Vector2( 0, 175 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+min_value = 0.0
+max_value = 100.0
+step = 1.0
+page = 0.0
+value = 0.0
+exp_edit = false
+rounded = false
+texture_under = null
+texture_over = null
+texture_progress = ExtResource( 2 )
+fill_mode = 3
+radial_fill_degrees = 360.0
+radial_center_offset = Vector2( 0, 0 )
+nine_patch_stretch = false
+_sections_unfolded = [ "Rect", "Textures" ]
+
+[node name="icon" type="TextureRect" parent="HBoxContainer/effort" index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 200.0
+margin_right = 25.0
+margin_bottom = 200.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+stretch_mode = 0
+
+[node name="goods" type="VBoxContainer" parent="HBoxContainer" index="5"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 149.0
+margin_right = 174.0
+margin_bottom = 200.0
+rect_min_size = Vector2( 25, 0 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 2
+_sections_unfolded = [ "Rect" ]
+
+[node name="progress" type="TextureProgress" parent="HBoxContainer/goods" index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 21.0
+margin_right = 25.0
+margin_bottom = 196.0
+rect_min_size = Vector2( 0, 175 )
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+min_value = 0.0
+max_value = 100.0
+step = 1.0
+page = 0.0
+value = 0.0
+exp_edit = false
+rounded = false
+texture_under = null
+texture_over = null
+texture_progress = ExtResource( 2 )
+fill_mode = 3
+radial_fill_degrees = 360.0
+radial_center_offset = Vector2( 0, 0 )
+nine_patch_stretch = false
+_sections_unfolded = [ "Rect", "Textures" ]
+
+[node name="icon" type="TextureRect" parent="HBoxContainer/goods" index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 200.0
+margin_right = 25.0
+margin_bottom = 200.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+
+
diff --git a/game/ui/help.png b/game/ui/help.png
new file mode 100644
index 0000000..fba24f7
Binary files /dev/null and b/game/ui/help.png differ
diff --git a/game/ui/help.png.import b/game/ui/help.png.import
new file mode 100644
index 0000000..a0de751
--- /dev/null
+++ b/game/ui/help.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/help.png-e2b8cfcaccb3e2cf0ea7059f79a1642c.stex"
+
+[deps]
+
+source_file="res://ui/help.png"
+source_md5="b6dca20b5d1cd4c2fa015b2a78630632"
+
+dest_files=[ "res://.import/help.png-e2b8cfcaccb3e2cf0ea7059f79a1642c.stex" ]
+dest_md5="0dcba7b3df6253b41024d662b57f5e15"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/ui/mapsize.gd b/game/ui/mapsize.gd
new file mode 100644
index 0000000..eb4e430
--- /dev/null
+++ b/game/ui/mapsize.gd
@@ -0,0 +1,19 @@
+extends HBoxContainer
+
+# class member variables go here, for example:
+# var a = 2
+# var b = "textvar"
+
+func _ready():
+ # Called every time the node is added to the scene.
+ # Initialization here
+ pass
+
+
+func set_level_size(size):
+ get_node('mapsize').text = '%d x %d' % [size.x, size.y]
+
+#func _process(delta):
+# # Called every frame. Delta is time since last frame.
+# # Update game logic here.
+# pass
diff --git a/game/ui/mapsize.tscn b/game/ui/mapsize.tscn
new file mode 100644
index 0000000..84ac5e0
--- /dev/null
+++ b/game/ui/mapsize.tscn
@@ -0,0 +1,77 @@
+[gd_scene load_steps=2 format=2]
+
+[ext_resource path="res://ui/mapsize.gd" type="Script" id=1]
+
+[node name="MapSizeContainer" type="HBoxContainer"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_right = 175.0
+margin_bottom = 14.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 0
+script = ExtResource( 1 )
+
+[node name="icon" type="TextureRect" parent="." index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_bottom = 14.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+stretch_mode = 0
+
+[node name="Label" type="Label" parent="." index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 4.0
+margin_right = 61.0
+margin_bottom = 14.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 2
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 4
+text = "Map Size"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+[node name="mapsize" type="Label" parent="." index="2"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 65.0
+margin_right = 96.0
+margin_bottom = 14.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 2
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 4
+text = "X x X"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+
diff --git a/game/ui/progress_texture.png b/game/ui/progress_texture.png
new file mode 100644
index 0000000..51fbfa0
Binary files /dev/null and b/game/ui/progress_texture.png differ
diff --git a/game/ui/progress_texture.png.import b/game/ui/progress_texture.png.import
new file mode 100644
index 0000000..6c61f83
--- /dev/null
+++ b/game/ui/progress_texture.png.import
@@ -0,0 +1,32 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/progress_texture.png-457c15d58017cd09c9bd2f6adbe8ac4e.stex"
+
+[deps]
+
+source_file="res://ui/progress_texture.png"
+source_md5="1f3e052e1febf74611f78d634c3e4a30"
+
+dest_files=[ "res://.import/progress_texture.png-457c15d58017cd09c9bd2f6adbe8ac4e.stex" ]
+dest_md5="d304153aa385c6eb7be032a85fdeef13"
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0
diff --git a/game/ui/prompt.gd b/game/ui/prompt.gd
new file mode 100644
index 0000000..095cb4c
--- /dev/null
+++ b/game/ui/prompt.gd
@@ -0,0 +1,45 @@
+extends LineEdit
+
+
+# class member variables go here, for example:
+# var a = 2
+# var b = "textvar"
+
+func _ready():
+ # Called every time the node is added to the scene.
+ # Initialization here
+ pass
+
+#func _process(delta):
+# # Called every frame. Delta is time since last frame.
+# # Update game logic here.
+# pass
+
+
+# This only fires when a user presses enter
+func _on_prompt_text_entered(new_text):
+ print(text)
+ pass # replace with function body
+
+
+# Here we can do tab complete, ctrl-c clear line, etc.
+# ctrl-r search
+func _on_prompt_gui_input(ev):
+ # Check if we have focus on the prompt
+ if not self.has_focus():
+ return
+ if ev is InputEventKey and ev.pressed:
+ if ev.scancode == KEY_C:
+ # This is Ctrl-c
+ if ev.get_scancode_with_modifiers() == 268435523:
+ # Emit signal on clear?
+ self.clear()
+ # How to mark input as consumed
+ if ev.scancode == KEY_TAB:
+ # @TODO: Autocomplete current text if possible
+ print("@TODO: Implemement auto-complete")
+ if ev.scancode == KEY_R:
+ # This is Ctrl-r
+ if ev.get_scancode_with_modifiers() == 268435538:
+ # Emit signal to start search
+ print("@TODO Implementare Ctrl-r Search")
\ No newline at end of file
diff --git a/game/ui/resource_progress_bar.gd b/game/ui/resource_progress_bar.gd
new file mode 100644
index 0000000..f10065a
--- /dev/null
+++ b/game/ui/resource_progress_bar.gd
@@ -0,0 +1,21 @@
+extends VBoxContainer
+
+# class member variables go here, for example:
+# var a = 2
+# var b = "textvar"
+
+export(Texture) var icon;
+export(String) var name;
+export(Texture) var progress_texture;
+
+func _ready():
+ # Called every time the node is added to the scene.
+ # Initialization here
+ if this.icon:
+ get_node('TextureRect').texture = this.icon
+
+
+#func _process(delta):
+# # Called every frame. Delta is time since last frame.
+# # Update game logic here.
+# pass
diff --git a/game/ui/resource_progress_bar.tscn b/game/ui/resource_progress_bar.tscn
new file mode 100644
index 0000000..76a64ed
--- /dev/null
+++ b/game/ui/resource_progress_bar.tscn
@@ -0,0 +1,91 @@
+[gd_scene load_steps=2 format=2]
+
+[ext_resource path="res://ui/resource_progress_bar.gd" type="Script" id=1]
+
+[node name="VBoxContainer" type="VBoxContainer"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_right = 1.0
+margin_bottom = 40.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+alignment = 0
+script = ExtResource( 1 )
+icon = null
+name = null
+progress_texture = null
+
+[node name="ProgressBar" type="TextureProgress" parent="." index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_right = 1.0
+margin_bottom = 1.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 0
+min_value = 0.0
+max_value = 100.0
+step = 1.0
+page = 0.0
+value = 0.0
+exp_edit = false
+rounded = false
+texture_under = null
+texture_over = null
+texture_progress = null
+radial_fill_degrees = 360.0
+radial_center_offset = Vector2( 0, 0 )
+nine_patch_stretch = false
+_sections_unfolded = [ "Percent" ]
+
+[node name="TextureRect" type="TextureRect" parent="." index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 5.0
+margin_right = 1.0
+margin_bottom = 5.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+stretch_mode = 0
+
+[node name="Label" type="Label" parent="." index="2"]
+
+visible = false
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 9.0
+margin_right = 1.0
+margin_bottom = 23.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 2
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 4
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+
+
diff --git a/game/ui/timer.gd b/game/ui/timer.gd
new file mode 100644
index 0000000..ba7d06d
--- /dev/null
+++ b/game/ui/timer.gd
@@ -0,0 +1,43 @@
+extends Panel
+
+# class member variables go here, for example:
+# var a = 2
+# var b = "textvar"
+
+var t_max = 60.0
+var t = 60.0
+
+signal skip_presssed
+
+func set_time_max(t):
+ self.t_max = t
+ self.set_time_left(t)
+
+func set_time_left(t):
+ if t == null && self.t > self.t_max:
+ self.t = self.t_max
+ if t <= self.t_max:
+ self.t = t
+ get_node('timeleft').text = self.format_time(self.t)
+
+func format_time(t):
+ var minutes = t / 60;
+ var seconds = int(t) % 60;
+ return '%d:%02d' % [minutes, seconds]
+
+func _draw():
+ pass
+
+func _ready():
+ # Called every time the node is added to the scene.
+ # Initialization here
+ pass
+
+#func _process(delta):
+# # Called every frame. Delta is time since last frame.
+# # Update game logic here.
+# pass
+
+
+func _on_skip_pressed():
+ emit_signal('skip_pressed')
diff --git a/game/ui/timer.tscn b/game/ui/timer.tscn
new file mode 100644
index 0000000..67ebf2d
--- /dev/null
+++ b/game/ui/timer.tscn
@@ -0,0 +1,93 @@
+[gd_scene load_steps=3 format=2]
+
+[ext_resource path="res://ui/timer.gd" type="Script" id=1]
+[ext_resource path="res://ui/clock.png" type="Texture" id=2]
+
+[node name="timer" type="Panel"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_top = 18.0
+margin_right = 175.0
+margin_bottom = 218.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+script = ExtResource( 1 )
+_sections_unfolded = [ "Rect" ]
+
+[node name="TextureRect" type="TextureRect" parent="." index="0"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_right = 175.0
+margin_bottom = 175.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 1
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+texture = ExtResource( 2 )
+stretch_mode = 0
+_sections_unfolded = [ "Rect" ]
+
+[node name="timeleft" type="Label" parent="." index="1"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 39.0
+margin_top = 179.0
+margin_right = 131.0
+margin_bottom = 210.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+mouse_filter = 2
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 4
+text = "asdf
+"
+percent_visible = 1.0
+lines_skipped = 0
+max_lines_visible = -1
+_sections_unfolded = [ "Hint", "Rect" ]
+
+[node name="skip" type="Button" parent="." index="2"]
+
+anchor_left = 0.0
+anchor_top = 0.0
+anchor_right = 0.0
+anchor_bottom = 0.0
+margin_left = 103.0
+margin_top = 173.0
+margin_right = 174.0
+margin_bottom = 200.0
+rect_pivot_offset = Vector2( 0, 0 )
+rect_clip_content = false
+focus_mode = 2
+mouse_filter = 0
+mouse_default_cursor_shape = 0
+size_flags_horizontal = 1
+size_flags_vertical = 1
+toggle_mode = false
+enabled_focus_mode = 2
+shortcut = null
+group = null
+text = "Skip"
+flat = false
+align = 1
+_sections_unfolded = [ "Anchor", "Grow Direction", "Hint", "Margin" ]
+
+[connection signal="pressed" from="skip" to="." method="_on_skip_pressed"]
+
+