├── .gitattributes ├── .github └── workflows │ └── github-pages.yml ├── .gitignore ├── LICENSE ├── README.md ├── addons └── block_code │ ├── LICENSE │ ├── README.md │ ├── block_code_node │ ├── block_code.gd │ ├── block_code_node.svg │ └── block_code_node.svg.import │ ├── block_code_plugin.gd │ ├── blocks │ ├── communication │ │ ├── add_node_to_group.tres │ │ ├── add_to_group.tres │ │ ├── area2d_on_entered.tres │ │ ├── area2d_on_exited.tres │ │ ├── call_method_group.tres │ │ ├── call_method_node.tres │ │ ├── define_method.tres │ │ ├── get_node.gd │ │ ├── get_node.tres │ │ ├── groups.gd │ │ ├── is_in_group.tres │ │ ├── is_node_in_group.tres │ │ ├── remove_from_group.tres │ │ ├── remove_node_from_group.tres │ │ ├── rigidbody2d_on_entered.tres │ │ └── rigidbody2d_on_exited.tres │ ├── graphics │ │ ├── animationplayer_is_playing.tres │ │ ├── animationplayer_pause.tres │ │ ├── animationplayer_play.gd │ │ ├── animationplayer_play.tres │ │ ├── animationplayer_stop.tres │ │ ├── viewport_center.tres │ │ ├── viewport_height.tres │ │ └── viewport_width.tres │ ├── input │ │ ├── characterbody2d_is_on_floor.tres │ │ ├── characterbody2d_move.tres │ │ ├── is_input_actioned.gd │ │ └── is_input_actioned.tres │ ├── lifecycle │ │ ├── process.tres │ │ ├── queue_free.tres │ │ ├── queue_free_node.tres │ │ └── ready.tres │ ├── log │ │ ├── breakpoint.tres │ │ ├── concat.tres │ │ └── print.tres │ ├── logic │ │ ├── and.tres │ │ ├── compare.tres │ │ ├── else.tres │ │ ├── else_if.tres │ │ ├── if.tres │ │ ├── not.tres │ │ └── or.tres │ ├── loops │ │ ├── await_scene_ready.tres │ │ ├── break.tres │ │ ├── continue.tres │ │ ├── for.tres │ │ └── while.tres │ ├── math │ │ ├── add.tres │ │ ├── cos.tres │ │ ├── divide.tres │ │ ├── multiply.tres │ │ ├── pow.tres │ │ ├── randf_range.tres │ │ ├── randi_range.tres │ │ ├── sin.tres │ │ ├── subtract.tres │ │ ├── tan.tres │ │ ├── vector2_x.tres │ │ ├── vector2_y.tres │ │ ├── vector_from_angle.tres │ │ └── vector_multiply.tres │ ├── physics │ │ └── characterbody2d_move_and_slide.tres │ ├── sounds │ │ ├── audiostreamplayer_play.tres │ │ ├── audiostreamplayer_stop.tres │ │ ├── load_sound.tres │ │ ├── pause_continue_sound.tres │ │ ├── play_sound.tres │ │ └── stop_sound.tres │ ├── spawn │ │ └── cpuparticles2d_finished.tres │ ├── transform │ │ └── rigidbody2d_physics_position.tres │ ├── ui │ │ └── label_set_text.tres │ └── variables │ │ └── vector2.tres │ ├── code_generation │ ├── ast_list.gd │ ├── block_ast.gd │ ├── block_definition.gd │ ├── block_extension.gd │ ├── blocks_catalog.gd │ ├── option_data.gd │ ├── script_generator.gd │ ├── util.gd │ └── variable_definition.gd │ ├── drag_manager │ ├── drag.gd │ ├── drag_manager.gd │ └── drag_manager.tscn │ ├── examples │ ├── pong_game │ │ ├── assets │ │ │ ├── ball.png │ │ │ ├── ball.png.import │ │ │ ├── line.png │ │ │ ├── line.png.import │ │ │ ├── paddle.png │ │ │ ├── paddle.png.import │ │ │ ├── paddle_hit.ogg │ │ │ ├── paddle_hit.ogg.import │ │ │ ├── score.ogg │ │ │ ├── score.ogg.import │ │ │ ├── space.png │ │ │ ├── space.png.import │ │ │ ├── wall_hit.ogg │ │ │ └── wall_hit.ogg.import │ │ ├── ball.tscn │ │ ├── goal_area.tscn │ │ ├── player_score.tscn │ │ ├── pong_game.tscn │ │ └── space.tscn │ └── spawner │ │ ├── ball.tscn │ │ ├── spawner.tscn │ │ └── volatile_ball.tscn │ ├── inspector_plugin │ └── block_script_inspector.gd │ ├── plugin.cfg │ ├── serialization │ ├── block_script_serialization.gd │ ├── block_serialization.gd │ ├── block_serialization_tree.gd │ ├── default_block_script.tres │ └── value_block_serialization.gd │ ├── simple_nodes │ ├── simple_character │ │ └── simple_character.gd │ └── simple_scoring │ │ └── simple_scoring.gd │ ├── simple_spawner │ └── simple_spawner.gd │ ├── types │ └── types.gd │ └── ui │ ├── block_canvas │ ├── block_canvas.gd │ └── block_canvas.tscn │ ├── block_editor_context.gd │ ├── block_tree_util.gd │ ├── blocks │ ├── block │ │ └── block.gd │ ├── control_block │ │ ├── control_block.gd │ │ └── control_block.tscn │ ├── entry_block │ │ ├── entry_block.gd │ │ └── entry_block.tscn │ ├── parameter_block │ │ ├── parameter_block.gd │ │ └── parameter_block.tscn │ ├── statement_block │ │ ├── statement_block.gd │ │ └── statement_block.tscn │ └── utilities │ │ ├── background │ │ ├── background.gd │ │ └── gutter.gd │ │ ├── drag_drop_area │ │ ├── drag_drop_area.gd │ │ └── drag_drop_area.tscn │ │ ├── parameter_input │ │ ├── parameter_input.gd │ │ └── parameter_input.tscn │ │ ├── parameter_output │ │ ├── parameter_output.gd │ │ └── parameter_output.tscn │ │ ├── snap_point │ │ ├── snap_point.gd │ │ └── snap_point.tscn │ │ └── template_editor │ │ ├── template_editor.gd │ │ └── template_editor.tscn │ ├── constants.gd │ ├── main_panel.gd │ ├── main_panel.tscn │ ├── picker │ ├── categories │ │ ├── block_category.gd │ │ ├── block_category_button.gd │ │ ├── block_category_button.tscn │ │ ├── block_category_display.gd │ │ ├── block_category_display.tscn │ │ ├── category_factory.gd │ │ └── variable_category │ │ │ ├── create_variable_button.gd │ │ │ ├── create_variable_button.tscn │ │ │ ├── create_variable_dialog.gd │ │ │ ├── create_variable_dialog.tscn │ │ │ ├── variable_category_display.gd │ │ │ └── variable_category_display.tscn │ ├── picker.gd │ └── picker.tscn │ ├── script_window │ ├── script_window.gd │ └── script_window.tscn │ ├── title_bar │ ├── title_bar.gd │ └── title_bar.tscn │ ├── tooltip │ ├── tooltip.gd │ └── tooltip.tscn │ └── util.gd ├── export_presets.cfg ├── game-02 ├── README.md ├── floor-tile.png ├── floor-tile.png.import ├── level.tscn ├── main.tscn ├── player.png ├── player.png.import ├── player.tscn ├── split.png ├── split.png.import ├── step.png ├── step.png.import ├── tiles.png ├── tiles.png.import ├── transparent.png └── transparent.png.import ├── game-03 ├── README.md ├── assets │ ├── background-layer-1.png │ ├── background-layer-1.png.import │ ├── background-layer-2.png │ ├── background-layer-2.png.import │ ├── enemy.png │ ├── enemy.png.import │ ├── flag.png │ ├── flag.png.import │ ├── heart.png │ ├── heart.png.import │ ├── items │ │ ├── crystal.png │ │ └── crystal.png.import │ ├── player-red.png │ ├── player-red.png.import │ ├── tiles-a.png │ └── tiles-a.png.import ├── components │ ├── coin │ │ └── coin.tscn │ ├── enemy │ │ └── enemy.tscn │ ├── flag │ │ ├── flag-spriteframes-green.tres │ │ ├── flag-spriteframes-red.tres │ │ └── flag.tscn │ ├── platform │ │ ├── float_platform.tscn │ │ └── platform.tscn │ └── player │ │ ├── player.tscn │ │ └── spriteframes-red.tres ├── hud.tscn ├── icon.svg ├── icon.svg.import ├── main.tscn └── spaces │ ├── background.tscn │ ├── dangerzone.tscn │ ├── tilemap.tscn │ └── tileset-a.tres ├── game-04 ├── Images │ ├── ball.svg │ ├── ball.svg.import │ ├── goal.svg │ ├── goal.svg.import │ ├── pin.svg │ ├── pin.svg.import │ ├── wall.svg │ └── wall.svg.import ├── Sounds │ ├── Bump.ogg │ ├── Bump.ogg.import │ ├── LICENSE.md │ ├── Muted 1.flac │ ├── Muted 1.ogg │ ├── Muted 1.ogg.import │ ├── Muted 2.flac │ ├── Muted 2.ogg │ ├── Muted 2.ogg.import │ ├── Muted 3.flac │ ├── Muted 3.ogg │ ├── Muted 3.ogg.import │ ├── Muted 4.flac │ ├── Muted 4.ogg │ ├── Muted 4.ogg.import │ ├── Muted 5.flac │ ├── Muted 5.ogg │ ├── Muted 5.ogg.import │ ├── Rattle 1.flac │ ├── Rattle 1.ogg │ ├── Rattle 1.ogg.import │ ├── Rattle 2.flac │ ├── Rattle 2.ogg │ ├── Rattle 2.ogg.import │ ├── Rattle 3.flac │ ├── Rattle 3.ogg │ ├── Rattle 3.ogg.import │ ├── Rattle 4.flac │ ├── Rattle 4.ogg │ ├── Rattle 4.ogg.import │ ├── Rim 1.flac │ ├── Rim 1.ogg │ ├── Rim 1.ogg.import │ ├── Rim 2.flac │ ├── Rim 2.ogg │ ├── Rim 2.ogg.import │ ├── Rim 3.flac │ ├── Rim 3.ogg │ ├── Rim 3.ogg.import │ ├── Rim 4.flac │ ├── Rim 4.ogg │ ├── Rim 4.ogg.import │ ├── Side 1.flac │ ├── Side 1.ogg │ ├── Side 1.ogg.import │ ├── Side 2.flac │ ├── Side 2.ogg │ ├── Side 2.ogg.import │ ├── Side 3.flac │ ├── Side 3.ogg │ ├── Side 3.ogg.import │ ├── Side 4.flac │ ├── Side 4.ogg │ ├── Side 4.ogg.import │ ├── Wood 1.flac │ ├── Wood 1.ogg │ ├── Wood 1.ogg.import │ ├── Wood 2.flac │ ├── Wood 2.ogg │ ├── Wood 2.ogg.import │ ├── Wood 3.flac │ ├── Wood 3.ogg │ ├── Wood 3.ogg.import │ ├── Wood 4.flac │ ├── Wood 4.ogg │ ├── Wood 4.ogg.import │ ├── Wood 5.flac │ ├── Wood 5.ogg │ ├── Wood 5.ogg.import │ ├── Wood 6.flac │ ├── Wood 6.ogg │ └── Wood 6.ogg.import ├── ball.tscn ├── main.tscn └── pin.tscn ├── game-05 ├── README.md ├── asteroid-normal.png ├── asteroid-normal.png.import ├── asteroid.png ├── asteroid.png.import ├── ball.png ├── ball.png.import ├── blaster_item.tscn ├── blue-key.png ├── blue-key.png.import ├── blue_door.tscn ├── blue_key.tscn ├── floor-diff.jpg ├── floor-diff.jpg.import ├── floor-normal.jpg ├── floor-normal.jpg.import ├── floor-tile-2-normal.png ├── floor-tile-2-normal.png.import ├── floor-tile-2.png ├── floor-tile-2.png.import ├── font │ ├── OFL.txt │ ├── Orbitron-Bold.ttf │ └── Orbitron-Bold.ttf.import ├── level_part.tscn ├── main.tscn ├── message.png ├── message.png.import ├── player_fire.tscn ├── rock.tscn ├── ship-normal.png ├── ship-normal.png.import ├── ship-shadow.png ├── ship-shadow.png.import ├── ship.png ├── ship.png.import ├── ship.tscn ├── tutorials.tscn ├── wall-tile-normal.png ├── wall-tile-normal.png.import ├── wall-tile.png └── wall-tile.png.import ├── game-06 ├── README.md ├── Sounds │ ├── Crash.ogg │ ├── Crash.ogg.import │ ├── Cyborg Ninja.mp3 │ ├── Cyborg Ninja.mp3.import │ ├── Ding.ogg │ ├── Ding.ogg.import │ ├── Engine.ogg │ ├── Engine.ogg.import │ ├── Pew.ogg │ └── Pew.ogg.import ├── coin.tscn ├── delete_zone.tscn ├── game_score.tscn ├── graphics │ ├── alan-labisch-NJpQ85eQJDE-unsplash.jpg │ ├── alan-labisch-NJpQ85eQJDE-unsplash.jpg.import │ ├── coin.png │ ├── coin.png.import │ ├── engine.svg │ ├── engine.svg.import │ ├── glow.png │ ├── glow.png.import │ ├── graphics.png │ ├── graphics.png.import │ ├── obstacle.png │ └── obstacle.png.import ├── hud.tscn ├── laser_gun.tscn ├── laser_particle.tscn ├── main.tscn ├── obstacle.tscn └── ship.tscn ├── icon.svg ├── icon.svg.import ├── main-menu ├── global.gd ├── main.gd └── main.tscn └── project.godot /.gitattributes: -------------------------------------------------------------------------------- 1 | # Normalize EOL for all files that Git considers text files. 2 | * text=auto eol=lf 3 | 4 | # Exclude GitHub Actions-related files from published asset, except the GitHub 5 | # Pages workflow which learners may find useful to publish their modified game. 6 | /.github/** export-ignore 7 | /.github/workflows !export-ignore 8 | /.github/workflows/** export-ignore 9 | /.github/workflows/github-pages.yml !export-ignore 10 | /asset-template.json.hb export-ignore 11 | 12 | # Exclude artwork sources 13 | /asset-sources export-ignore 14 | 15 | # Substitute project version when publishing 16 | /project.godot export-subst 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Godot 4+ specific ignores 2 | .godot/ 3 | /android/ 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Endless OS Foundation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Demos for Godot Block Coding plugin 2 | 3 | These are demos for the [Godot Block Coding 4 | Plugin](https://github.com/endlessm/godot-block-coding). Intended to 5 | show the potential and find limitations on the plugin, in order to 6 | instruct its development. 7 | 8 | You can play them online at: https://endlessm.github.io/godot-block-coding-demos/ 9 | -------------------------------------------------------------------------------- /addons/block_code/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Endless OS Foundation 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /addons/block_code/block_code_node/block_code_node.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /addons/block_code/block_code_node/block_code_node.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cmusxj1ppspnp" 6 | path="res://.godot/imported/block_code_node.svg-ec44d62670f5745547380d82dd01a2b1.ctex" 7 | metadata={ 8 | "has_editor_variant": true, 9 | "vram_texture": false 10 | } 11 | 12 | [deps] 13 | 14 | source_file="res://addons/block_code/block_code_node/block_code_node.svg" 15 | dest_files=["res://.godot/imported/block_code_node.svg-ec44d62670f5745547380d82dd01a2b1.ctex"] 16 | 17 | [params] 18 | 19 | compress/mode=0 20 | compress/high_quality=false 21 | compress/lossy_quality=0.7 22 | compress/hdr_compression=1 23 | compress/normal_map=0 24 | compress/channel_pack=0 25 | mipmaps/generate=false 26 | mipmaps/limit=-1 27 | roughness/mode=0 28 | roughness/src_normal="" 29 | process/fix_alpha_border=true 30 | process/premult_alpha=false 31 | process/normal_map_invert_y=false 32 | process/hdr_as_srgb=false 33 | process/hdr_clamp_exposure=false 34 | process/size_limit=0 35 | detect_3d/compress_to=1 36 | svg/scale=1.0 37 | editor/scale_with_editor_scale=true 38 | editor/convert_colors_with_editor_theme=true 39 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/add_node_to_group.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=5 format=3 uid="uid://bpvefei72nh3a"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_5qal7"] 4 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_auf06"] 5 | [ext_resource type="Script" path="res://addons/block_code/blocks/communication/groups.gd" id="1_p83c7"] 6 | 7 | [sub_resource type="Resource" id="Resource_sus0f"] 8 | script = ExtResource("1_auf06") 9 | selected = 0 10 | items = [] 11 | 12 | [resource] 13 | script = ExtResource("1_5qal7") 14 | name = &"add_node_to_group" 15 | target_node_class = "" 16 | description = "Add the node into the group" 17 | category = "Communication | Groups" 18 | type = 2 19 | variant_type = 0 20 | display_template = "add {node: OBJECT} to group {group: STRING}" 21 | code_template = "{node}.add_to_group({group})" 22 | defaults = { 23 | "group": SubResource("Resource_sus0f") 24 | } 25 | signal_name = "" 26 | scope = "" 27 | extension_script = ExtResource("1_p83c7") 28 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/add_to_group.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=5 format=3 uid="uid://bvrmau8atjx1x"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_aom4j"] 4 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_bcm71"] 5 | [ext_resource type="Script" path="res://addons/block_code/blocks/communication/groups.gd" id="2_42ixf"] 6 | 7 | [sub_resource type="Resource" id="Resource_fk0wa"] 8 | script = ExtResource("1_aom4j") 9 | selected = 0 10 | items = [] 11 | 12 | [resource] 13 | script = ExtResource("1_bcm71") 14 | name = &"add_to_group" 15 | target_node_class = "" 16 | description = "Add this node into the group" 17 | category = "Communication | Groups" 18 | type = 2 19 | variant_type = 0 20 | display_template = "add to group {group: STRING}" 21 | code_template = "add_to_group({group})" 22 | defaults = { 23 | "group": SubResource("Resource_fk0wa") 24 | } 25 | signal_name = "" 26 | scope = "" 27 | extension_script = ExtResource("2_42ixf") 28 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/area2d_on_entered.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://de4k7t7uqws1j"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_xotf5"] 4 | 5 | [resource] 6 | script = ExtResource("1_xotf5") 7 | name = &"area2d_on_entered" 8 | target_node_class = "Area2D" 9 | description = "" 10 | category = "Communication | Methods" 11 | type = 1 12 | variant_type = 0 13 | display_template = "when this node collides with [something: OBJECT]" 14 | code_template = "func _on_body_entered(something: Node2D): 15 | " 16 | defaults = {} 17 | signal_name = "body_entered" 18 | scope = "" 19 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/area2d_on_exited.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://b36nq4mau6lu6"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_21qth"] 4 | 5 | [resource] 6 | script = ExtResource("1_21qth") 7 | name = &"area2d_on_exited" 8 | target_node_class = "Area2D" 9 | description = "" 10 | category = "Communication | Methods" 11 | type = 1 12 | variant_type = 0 13 | display_template = "when this node stops colliding with [something: OBJECT]" 14 | code_template = "func _on_body_exited(something: Node2D): 15 | " 16 | defaults = {} 17 | signal_name = "body_exited" 18 | scope = "" 19 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/call_method_group.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=5 format=3 uid="uid://c15vtdfihdxb8"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_3nuts"] 4 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_mlm68"] 5 | [ext_resource type="Script" path="res://addons/block_code/blocks/communication/groups.gd" id="1_of577"] 6 | 7 | [sub_resource type="Resource" id="Resource_f4ctg"] 8 | script = ExtResource("1_3nuts") 9 | selected = 0 10 | items = [] 11 | 12 | [resource] 13 | script = ExtResource("1_mlm68") 14 | name = &"call_method_group" 15 | target_node_class = "" 16 | description = "Calls the method/function on each member of the given group" 17 | category = "Communication | Methods" 18 | type = 2 19 | variant_type = 0 20 | display_template = "call method {method_name: STRING} in group {group: STRING}" 21 | code_template = "get_tree().call_group({group}, {method_name})" 22 | defaults = { 23 | "group": SubResource("Resource_f4ctg") 24 | } 25 | signal_name = "" 26 | scope = "" 27 | extension_script = ExtResource("1_of577") 28 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/call_method_node.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://c04j5flmimjvf"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_pg363"] 4 | 5 | [resource] 6 | script = ExtResource("1_pg363") 7 | name = &"call_method_node" 8 | target_node_class = "" 9 | description = "Calls the method/function of the given node" 10 | category = "Communication | Methods" 11 | type = 2 12 | variant_type = 0 13 | display_template = "call method {method_name: STRING} on node {node: OBJECT}" 14 | code_template = "{node}.call({method_name})" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/define_method.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://7r2b2griss3i"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_6e473"] 4 | 5 | [resource] 6 | script = ExtResource("1_6e473") 7 | name = &"define_method" 8 | target_node_class = "" 9 | description = "Define a method/function with following statements" 10 | category = "Communication | Methods" 11 | type = 1 12 | variant_type = 0 13 | display_template = "define method {method_name: STRING_NAME}" 14 | code_template = "func {method_name}():" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/get_node.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends BlockExtension 3 | 4 | const OptionData = preload("res://addons/block_code/code_generation/option_data.gd") 5 | const Util = preload("res://addons/block_code/ui/util.gd") 6 | 7 | 8 | func _find_paths(paths: Array[NodePath], node: Node, path_root: Node, block_parent: Node): 9 | # Add any non-BlockCode nodes that aren't the parent of the current 10 | # BlockCode node. 11 | if not node is BlockCode: 12 | var node_path: NodePath = Util.node_scene_path(node, block_parent, path_root) 13 | if not node_path in [^"", ^"."]: 14 | paths.append(node_path) 15 | 16 | for child in node.get_children(): 17 | _find_paths(paths, child, path_root, block_parent) 18 | 19 | 20 | func get_defaults_for_node(context_node: Node) -> Dictionary: 21 | # The default paths are only needed in the editor. 22 | if not Engine.is_editor_hint(): 23 | return {} 24 | 25 | var scene_root: Node = EditorInterface.get_edited_scene_root() 26 | var path_root: Node = scene_root.get_parent() 27 | var paths: Array[NodePath] 28 | _find_paths(paths, scene_root, path_root, context_node) 29 | 30 | if not paths: 31 | return {} 32 | 33 | return {"path": OptionData.new(paths)} 34 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/get_node.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=5 format=3 uid="uid://canpdkahokjqs"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_bk47y"] 4 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_d60g7"] 5 | [ext_resource type="Script" path="res://addons/block_code/blocks/communication/get_node.gd" id="1_we5wl"] 6 | 7 | [sub_resource type="Resource" id="Resource_esr4a"] 8 | script = ExtResource("1_bk47y") 9 | selected = 0 10 | items = [] 11 | 12 | [resource] 13 | script = ExtResource("1_d60g7") 14 | name = &"get_node" 15 | target_node_class = "" 16 | description = "Get the node at the given path" 17 | category = "Communication | Nodes" 18 | type = 3 19 | variant_type = 24 20 | display_template = "{path: NIL}" 21 | code_template = "get_node(\"{path}\")" 22 | defaults = { 23 | "path": SubResource("Resource_esr4a") 24 | } 25 | signal_name = "" 26 | scope = "" 27 | extension_script = ExtResource("1_we5wl") 28 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/is_in_group.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=5 format=3 uid="uid://q4cnstftvsiu"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_cla3i"] 4 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_tjyq5"] 5 | [ext_resource type="Script" path="res://addons/block_code/blocks/communication/groups.gd" id="2_o165d"] 6 | 7 | [sub_resource type="Resource" id="Resource_d0v0d"] 8 | script = ExtResource("1_cla3i") 9 | selected = 0 10 | items = [] 11 | 12 | [resource] 13 | script = ExtResource("1_tjyq5") 14 | name = &"is_in_group" 15 | target_node_class = "" 16 | description = "Is this node in the group" 17 | category = "Communication | Groups" 18 | type = 3 19 | variant_type = 1 20 | display_template = "is in group {group: STRING}" 21 | code_template = "is_in_group({group})" 22 | defaults = { 23 | "group": SubResource("Resource_d0v0d") 24 | } 25 | signal_name = "" 26 | scope = "" 27 | extension_script = ExtResource("2_o165d") 28 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/is_node_in_group.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=5 format=3 uid="uid://bbtdxeey74x67"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_5krrs"] 4 | [ext_resource type="Script" path="res://addons/block_code/blocks/communication/groups.gd" id="1_r4prw"] 5 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_y4j0k"] 6 | 7 | [sub_resource type="Resource" id="Resource_o38ym"] 8 | script = ExtResource("1_y4j0k") 9 | selected = 0 10 | items = [] 11 | 12 | [resource] 13 | script = ExtResource("1_5krrs") 14 | name = &"is_node_in_group" 15 | target_node_class = "" 16 | description = "Is the node in the group" 17 | category = "Communication | Groups" 18 | type = 3 19 | variant_type = 1 20 | display_template = "{node: OBJECT} is in group {group: STRING}" 21 | code_template = "{node}.is_in_group({group})" 22 | defaults = { 23 | "group": SubResource("Resource_o38ym") 24 | } 25 | signal_name = "" 26 | scope = "" 27 | extension_script = ExtResource("1_r4prw") 28 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/remove_from_group.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=5 format=3 uid="uid://dgenw5wyqorvq"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_cdwef"] 4 | [ext_resource type="Script" path="res://addons/block_code/blocks/communication/groups.gd" id="1_i50fw"] 5 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_mnxp7"] 6 | 7 | [sub_resource type="Resource" id="Resource_45b71"] 8 | script = ExtResource("1_mnxp7") 9 | selected = 0 10 | items = [] 11 | 12 | [resource] 13 | script = ExtResource("1_cdwef") 14 | name = &"remove_from_group" 15 | target_node_class = "" 16 | description = "Remove this node from the group" 17 | category = "Communication | Groups" 18 | type = 2 19 | variant_type = 0 20 | display_template = "remove from group {group: STRING}" 21 | code_template = "remove_from_group({group})" 22 | defaults = { 23 | "group": SubResource("Resource_45b71") 24 | } 25 | signal_name = "" 26 | scope = "" 27 | extension_script = ExtResource("1_i50fw") 28 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/remove_node_from_group.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=5 format=3 uid="uid://b2dwk77hnri8y"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_clwhe"] 4 | [ext_resource type="Script" path="res://addons/block_code/blocks/communication/groups.gd" id="1_h3lhb"] 5 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_pec24"] 6 | 7 | [sub_resource type="Resource" id="Resource_03rge"] 8 | script = ExtResource("1_clwhe") 9 | selected = 0 10 | items = [] 11 | 12 | [resource] 13 | script = ExtResource("1_pec24") 14 | name = &"remove_node_from_group" 15 | target_node_class = "" 16 | description = "Remove the node from the group" 17 | category = "Communication | Groups" 18 | type = 2 19 | variant_type = 0 20 | display_template = "remove {node: OBJECT} from group {group: NIL}" 21 | code_template = "{node}.remove_from_group(\\\"{group}\\\")" 22 | defaults = { 23 | "group": SubResource("Resource_03rge") 24 | } 25 | signal_name = "" 26 | scope = "" 27 | extension_script = ExtResource("1_h3lhb") 28 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/rigidbody2d_on_entered.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://dl1xd1jit2mlp"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_v2421"] 4 | 5 | [resource] 6 | script = ExtResource("1_v2421") 7 | name = &"rigidbody2d_on_entered" 8 | target_node_class = "RigidBody2D" 9 | description = "" 10 | category = "Communication | Methods" 11 | type = 1 12 | variant_type = 0 13 | display_template = "when this node collides with [something: OBJECT]" 14 | code_template = "func _on_body_entered(something: Node2D): 15 | " 16 | defaults = {} 17 | signal_name = "body_entered" 18 | scope = "" 19 | -------------------------------------------------------------------------------- /addons/block_code/blocks/communication/rigidbody2d_on_exited.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://c15ymi1kxb570"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_sahiu"] 4 | 5 | [resource] 6 | script = ExtResource("1_sahiu") 7 | name = &"rigidbody2d_on_exited" 8 | target_node_class = "RigidBody2D" 9 | description = "" 10 | category = "Communication | Methods" 11 | type = 1 12 | variant_type = 0 13 | display_template = "when this node stops colliding with [something: OBJECT]" 14 | code_template = "func _on_body_exited(something: Node2D): 15 | " 16 | defaults = {} 17 | signal_name = "body_exited" 18 | scope = "" 19 | -------------------------------------------------------------------------------- /addons/block_code/blocks/graphics/animationplayer_is_playing.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://mg4y3o0rsqd5"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_xr50b"] 4 | 5 | [resource] 6 | script = ExtResource("1_xr50b") 7 | name = &"animationplayer_is_playing" 8 | target_node_class = "AnimationPlayer" 9 | description = "Check if an animation is currently playing." 10 | category = "Graphics | Animation" 11 | type = 3 12 | variant_type = 1 13 | display_template = "is playing" 14 | code_template = "is_playing()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/graphics/animationplayer_pause.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://clopo7gmje5a"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_2enqv"] 4 | 5 | [resource] 6 | script = ExtResource("1_2enqv") 7 | name = &"animationplayer_pause" 8 | target_node_class = "AnimationPlayer" 9 | description = "Pause the currently playing animation." 10 | category = "Graphics | Animation" 11 | type = 2 12 | variant_type = 0 13 | display_template = "pause" 14 | code_template = "pause()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/graphics/animationplayer_play.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends BlockExtension 3 | 4 | const OptionData = preload("res://addons/block_code/code_generation/option_data.gd") 5 | 6 | 7 | func get_defaults() -> Dictionary: 8 | var animation_player = context_node as AnimationPlayer 9 | 10 | if not animation_player: 11 | return {} 12 | 13 | var animation_list = animation_player.get_animation_list() 14 | 15 | return {"animation": OptionData.new(animation_list)} 16 | 17 | 18 | func _context_node_changed(): 19 | var animation_player = context_node as AnimationPlayer 20 | 21 | if not animation_player: 22 | return 23 | 24 | animation_player.animation_list_changed.connect(_on_animation_list_changed) 25 | 26 | 27 | func _on_animation_list_changed(): 28 | _emit_changed() 29 | -------------------------------------------------------------------------------- /addons/block_code/blocks/graphics/animationplayer_play.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=7 format=3 uid="uid://c5e1byehtxwc0"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_emeuv"] 4 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_xu43h"] 5 | [ext_resource type="Script" path="res://addons/block_code/blocks/graphics/animationplayer_play.gd" id="2_7ymgi"] 6 | 7 | [sub_resource type="Resource" id="Resource_qpxn2"] 8 | script = ExtResource("1_xu43h") 9 | selected = 0 10 | items = [] 11 | 12 | [sub_resource type="Resource" id="Resource_vnp2w"] 13 | script = ExtResource("1_xu43h") 14 | selected = 0 15 | items = ["forward", "backwards"] 16 | 17 | [sub_resource type="Resource" id="Resource_17pec"] 18 | script = ExtResource("1_xu43h") 19 | selected = 0 20 | items = ["until done", "in the background"] 21 | 22 | [resource] 23 | script = ExtResource("1_emeuv") 24 | name = &"animationplayer_play" 25 | target_node_class = "AnimationPlayer" 26 | description = "Play the animation." 27 | category = "Graphics | Animation" 28 | type = 2 29 | variant_type = 0 30 | display_template = "play {animation: STRING} {direction: NIL} {wait_mode: NIL}" 31 | code_template = "if {direction} == \"forward\": 32 | play({animation}) 33 | else: 34 | play_backwards({animation}) 35 | if {wait_mode} == \"until done\": 36 | await animation_finished 37 | " 38 | defaults = { 39 | "animation": SubResource("Resource_qpxn2"), 40 | "direction": SubResource("Resource_vnp2w"), 41 | "wait_mode": SubResource("Resource_17pec") 42 | } 43 | signal_name = "" 44 | scope = "" 45 | extension_script = ExtResource("2_7ymgi") 46 | -------------------------------------------------------------------------------- /addons/block_code/blocks/graphics/animationplayer_stop.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://b4v00oxoxbfet"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_wp8gr"] 4 | 5 | [resource] 6 | script = ExtResource("1_wp8gr") 7 | name = &"animationplayer_stop" 8 | target_node_class = "AnimationPlayer" 9 | description = "Stop the currently playing animation." 10 | category = "Graphics | Animation" 11 | type = 2 12 | variant_type = 0 13 | display_template = "stop" 14 | code_template = "stop()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/graphics/viewport_center.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://1536itmdu8yo"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_rc1so"] 4 | 5 | [resource] 6 | script = ExtResource("1_rc1so") 7 | name = &"viewport_center" 8 | target_node_class = "" 9 | description = "Coordinates of the middle of the viewable screen when playing." 10 | category = "Graphics | Viewport" 11 | type = 3 12 | variant_type = 5 13 | display_template = "viewport center" 14 | code_template = "(func (): var transform: Transform2D = get_viewport_transform(); var scale: Vector2 = transform.get_scale(); return -transform.origin / scale + get_viewport_rect().size / scale / 2).call()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/graphics/viewport_height.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bdm4yr68mdf4d"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_1debb"] 4 | 5 | [resource] 6 | script = ExtResource("1_1debb") 7 | name = &"viewport_height" 8 | target_node_class = "" 9 | description = "How tall the viewable screen is when playing." 10 | category = "Graphics | Viewport" 11 | type = 3 12 | variant_type = 3 13 | display_template = "viewport height" 14 | code_template = "(func (): var transform: Transform2D = get_viewport_transform(); var scale: Vector2 = transform.get_scale(); return -transform.origin.y / scale.y + get_viewport_rect().size.y / scale.y).call()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/graphics/viewport_width.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bt78ajp56ga24"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_ll4rh"] 4 | 5 | [resource] 6 | script = ExtResource("1_ll4rh") 7 | name = &"viewport_width" 8 | target_node_class = "" 9 | description = "How wide the viewable screen is when playing." 10 | category = "Graphics | Viewport" 11 | type = 3 12 | variant_type = 3 13 | display_template = "viewport width" 14 | code_template = "(func (): var transform: Transform2D = get_viewport_transform(); var scale: Vector2 = transform.get_scale(); return -transform.origin.x / scale.x + get_viewport_rect().size.x / scale.x).call()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/input/characterbody2d_is_on_floor.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://cbpicqif1ddro"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_btxic"] 4 | 5 | [resource] 6 | script = ExtResource("1_btxic") 7 | name = &"characterbody2d_is_on_floor" 8 | target_node_class = "CharacterBody2D" 9 | description = "True if the character is on the floor." 10 | category = "Physics | Velocity" 11 | type = 3 12 | variant_type = 1 13 | display_template = "is on floor" 14 | code_template = "is_on_floor()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/input/characterbody2d_move.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://cu3ru61vg6bx5"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_btxic"] 4 | 5 | [resource] 6 | script = ExtResource("1_btxic") 7 | name = &"characterbody2d_move" 8 | target_node_class = "CharacterBody2D" 9 | description = "Move the character up, down, left, and right with the keyboard using the given keys. The speed of movement can be adjusted separately for x (left and right) and y (up and down)." 10 | category = "Input" 11 | type = 2 12 | variant_type = 0 13 | display_template = "move with keys {up: STRING} {down: STRING} {left: STRING} {right: STRING} at speed {speed: VECTOR2}" 14 | code_template = "var dir = Vector2() 15 | dir.x += float(Input.is_key_pressed(OS.find_keycode_from_string({right}))) 16 | dir.x -= float(Input.is_key_pressed(OS.find_keycode_from_string({left}))) 17 | dir.y += float(Input.is_key_pressed(OS.find_keycode_from_string({down}))) 18 | dir.y -= float(Input.is_key_pressed(OS.find_keycode_from_string({up}))) 19 | dir = dir.normalized() 20 | velocity = dir*{speed} 21 | move_and_slide() 22 | " 23 | defaults = { 24 | "down": "S", 25 | "left": "A", 26 | "right": "D", 27 | "speed": Vector2(100, 100), 28 | "up": "W" 29 | } 30 | signal_name = "" 31 | scope = "" 32 | -------------------------------------------------------------------------------- /addons/block_code/blocks/input/is_input_actioned.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends BlockExtension 3 | 4 | const OptionData = preload("res://addons/block_code/code_generation/option_data.gd") 5 | 6 | 7 | func get_defaults() -> Dictionary: 8 | var inputmap_actions = _get_inputmap_actions() 9 | return {"action_name": OptionData.new(inputmap_actions)} 10 | 11 | 12 | static func _get_inputmap_actions() -> Array[StringName]: 13 | var inputmap_actions: Array[StringName] 14 | 15 | var editor_input_actions: Dictionary = {} 16 | var editor_input_action_deadzones: Dictionary = {} 17 | if Engine.is_editor_hint(): 18 | var actions := InputMap.get_actions() 19 | for action in actions: 20 | if action.begins_with("spatial_editor"): 21 | var events := InputMap.action_get_events(action) 22 | editor_input_actions[action] = events 23 | editor_input_action_deadzones[action] = InputMap.action_get_deadzone(action) 24 | 25 | InputMap.load_from_project_settings() 26 | 27 | inputmap_actions = InputMap.get_actions() 28 | 29 | if Engine.is_editor_hint(): 30 | for action in editor_input_actions.keys(): 31 | InputMap.add_action(action, editor_input_action_deadzones[action]) 32 | for event in editor_input_actions[action]: 33 | InputMap.action_add_event(action, event) 34 | 35 | return inputmap_actions 36 | -------------------------------------------------------------------------------- /addons/block_code/blocks/input/is_input_actioned.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=5 format=3 uid="uid://86j17le5e58u"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_d8i05"] 4 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_rprh7"] 5 | [ext_resource type="Script" path="res://addons/block_code/blocks/input/is_input_actioned.gd" id="2_h11b7"] 6 | 7 | [sub_resource type="Resource" id="Resource_ai5in"] 8 | script = ExtResource("1_d8i05") 9 | selected = 0 10 | items = ["pressed", "just_pressed", "just_released"] 11 | 12 | [resource] 13 | script = ExtResource("1_rprh7") 14 | name = &"is_input_actioned" 15 | target_node_class = "" 16 | description = "True if the specified input action has been pressed or released." 17 | category = "Input" 18 | type = 3 19 | variant_type = 1 20 | display_template = "action {action_name: STRING_NAME} is {action: NIL}" 21 | code_template = "Input.is_action_{{action}}('{{action_name}}')" 22 | defaults = { 23 | "action": SubResource("Resource_ai5in") 24 | } 25 | signal_name = "" 26 | scope = "" 27 | extension_script = ExtResource("2_h11b7") 28 | -------------------------------------------------------------------------------- /addons/block_code/blocks/lifecycle/process.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://chioedvp50013"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_pmina"] 4 | 5 | [resource] 6 | script = ExtResource("1_pmina") 7 | name = &"process" 8 | target_node_class = "" 9 | description = "Attached blocks will be executed during the processing step of the main loop" 10 | category = "Lifecycle" 11 | type = 1 12 | variant_type = 0 13 | display_template = "every frame" 14 | code_template = "func _process(delta):" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/lifecycle/queue_free.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://4hj5b3xaiuy8"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_75fle"] 4 | 5 | [resource] 6 | script = ExtResource("1_75fle") 7 | name = &"queue_free" 8 | target_node_class = "" 9 | description = "Queues this node to be deleted at the end of the current frame" 10 | category = "Lifecycle" 11 | type = 2 12 | variant_type = 0 13 | display_template = "remove" 14 | code_template = "queue_free()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/lifecycle/queue_free_node.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://d31lkxkm5lww7"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_75fle"] 4 | 5 | [resource] 6 | script = ExtResource("1_75fle") 7 | name = &"queue_free_node" 8 | target_node_class = "" 9 | description = "Queues the given node to be deleted at the end of the current frame" 10 | category = "Lifecycle" 11 | type = 2 12 | variant_type = 0 13 | display_template = "remove {node: OBJECT}" 14 | code_template = "{node}.queue_free()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/lifecycle/ready.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://dgwfoepoejlom"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_vk0xk"] 4 | 5 | [resource] 6 | script = ExtResource("1_vk0xk") 7 | name = &"ready" 8 | target_node_class = "" 9 | description = "Attached blocks will be executed once when the node is \"ready\"" 10 | category = "Lifecycle" 11 | type = 1 12 | variant_type = 0 13 | display_template = "when starting" 14 | code_template = "func _ready():" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/log/breakpoint.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bddy0d4xdv20c"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_xva04"] 4 | 5 | [resource] 6 | script = ExtResource("1_xva04") 7 | name = &"breakpoint" 8 | target_node_class = "" 9 | description = "Pause execution and show the current line of code in the debugger." 10 | category = "Log" 11 | type = 2 12 | variant_type = 0 13 | display_template = "breakpoint" 14 | code_template = "breakpoint" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/log/concat.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://cb6ux0amdhhlw"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_lstbo"] 4 | 5 | [resource] 6 | script = ExtResource("1_lstbo") 7 | name = &"concat" 8 | description = "" 9 | category = "Log" 10 | type = 3 11 | variant_type = 4 12 | display_template = "{string1: STRING} + {string2: STRING}" 13 | code_template = "{string1} + {string2}" 14 | defaults = {} 15 | signal_name = "" 16 | -------------------------------------------------------------------------------- /addons/block_code/blocks/log/print.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://barxsapb8tl0r"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_0lih2"] 4 | 5 | [resource] 6 | script = ExtResource("1_0lih2") 7 | name = &"print" 8 | target_node_class = "" 9 | description = "Print the text to output" 10 | category = "Log" 11 | type = 2 12 | variant_type = 0 13 | display_template = "log text {text: STRING}" 14 | code_template = "print({text})" 15 | defaults = { 16 | "text": "Hello" 17 | } 18 | signal_name = "" 19 | scope = "" 20 | -------------------------------------------------------------------------------- /addons/block_code/blocks/logic/and.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://d0g11cp3ff81i"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="2_lxlcw"] 4 | 5 | [resource] 6 | script = ExtResource("2_lxlcw") 7 | name = &"and" 8 | description = "" 9 | category = "Logic | Boolean" 10 | type = 3 11 | variant_type = 1 12 | display_template = "{bool1: BOOL} and {bool2: BOOL}" 13 | code_template = "{bool1} and {bool2}" 14 | defaults = {} 15 | signal_name = "" 16 | scope = "" 17 | -------------------------------------------------------------------------------- /addons/block_code/blocks/logic/compare.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=4 format=3 uid="uid://pr5wnn3ltkbo"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_hcv2h"] 4 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_wp40r"] 5 | 6 | [sub_resource type="Resource" id="Resource_ie4sg"] 7 | script = ExtResource("1_hcv2h") 8 | selected = 0 9 | items = ["==", ">", "<", ">=", "<=", "!="] 10 | 11 | [resource] 12 | script = ExtResource("1_wp40r") 13 | name = &"compare" 14 | target_node_class = "" 15 | description = "" 16 | category = "Logic | Comparison" 17 | type = 3 18 | variant_type = 1 19 | display_template = "{float1: FLOAT} {op: NIL} {float2: FLOAT}" 20 | code_template = "{float1} {{op}} {float2}" 21 | defaults = { 22 | "float1": 1.0, 23 | "float2": 1.0, 24 | "op": SubResource("Resource_ie4sg") 25 | } 26 | signal_name = "" 27 | scope = "" 28 | -------------------------------------------------------------------------------- /addons/block_code/blocks/logic/else.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://dpgx8j3veifgl"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_x816c"] 4 | 5 | [resource] 6 | script = ExtResource("1_x816c") 7 | name = &"else" 8 | target_node_class = "" 9 | description = "" 10 | category = "Logic | Conditionals" 11 | type = 4 12 | variant_type = 0 13 | display_template = "else" 14 | code_template = "else:" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/logic/else_if.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://by53vmmn3wtny"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_kgjks"] 4 | 5 | [resource] 6 | script = ExtResource("1_kgjks") 7 | name = &"else_if" 8 | target_node_class = "" 9 | description = "" 10 | category = "Logic | Conditionals" 11 | type = 4 12 | variant_type = 0 13 | display_template = "else if {condition: BOOL}" 14 | code_template = "elif {condition}:" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/logic/if.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://cxvoo3jassq8c"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_c6ly3"] 4 | 5 | [resource] 6 | script = ExtResource("1_c6ly3") 7 | name = &"if" 8 | target_node_class = "" 9 | description = "" 10 | category = "Logic | Conditionals" 11 | type = 4 12 | variant_type = 0 13 | display_template = "if {condition: BOOL}" 14 | code_template = "if {condition}:" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/logic/not.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://d6asv53q6ok8"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_6igv6"] 4 | 5 | [resource] 6 | script = ExtResource("1_6igv6") 7 | name = &"not" 8 | target_node_class = "" 9 | description = "" 10 | category = "Logic | Boolean" 11 | type = 3 12 | variant_type = 1 13 | display_template = "not {bool: BOOL}" 14 | code_template = "not {bool}" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/logic/or.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://cyu2tntoqf85m"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_oets3"] 4 | 5 | [resource] 6 | script = ExtResource("1_oets3") 7 | name = &"or" 8 | description = "" 9 | category = "Logic | Boolean" 10 | type = 3 11 | variant_type = 1 12 | display_template = "{bool1: BOOL} or {bool2: BOOL}" 13 | code_template = "{bool1} or {bool2}" 14 | defaults = {} 15 | signal_name = "" 16 | scope = "" 17 | -------------------------------------------------------------------------------- /addons/block_code/blocks/loops/await_scene_ready.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bkdmiqavhqrph"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_qy2t4"] 4 | 5 | [resource] 6 | script = ExtResource("1_qy2t4") 7 | name = &"await_scene_ready" 8 | target_node_class = "" 9 | description = "" 10 | category = "Loops" 11 | type = 2 12 | variant_type = 0 13 | display_template = "wait for the scene to be ready" 14 | code_template = "if not get_tree().root.is_node_ready(): 15 | await get_tree().root.ready" 16 | defaults = {} 17 | signal_name = "" 18 | scope = "" 19 | -------------------------------------------------------------------------------- /addons/block_code/blocks/loops/break.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://dwteydig4c6hi"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_4rhsl"] 4 | 5 | [resource] 6 | script = ExtResource("1_4rhsl") 7 | name = &"break" 8 | target_node_class = "" 9 | description = "" 10 | category = "Loops" 11 | type = 2 12 | variant_type = 0 13 | display_template = "break" 14 | code_template = "break" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/loops/continue.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://srm0bee85n0d"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_junev"] 4 | 5 | [resource] 6 | script = ExtResource("1_junev") 7 | name = &"continue" 8 | target_node_class = "" 9 | description = "" 10 | category = "Loops" 11 | type = 2 12 | variant_type = 0 13 | display_template = "continue" 14 | code_template = "continue" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/loops/for.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://0g4njflvemaa"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_u01bi"] 4 | 5 | [resource] 6 | script = ExtResource("1_u01bi") 7 | name = &"for" 8 | target_node_class = "" 9 | description = "Run the connected blocks [i]number[/i] times" 10 | category = "Loops" 11 | type = 4 12 | variant_type = 0 13 | display_template = "repeat {number: INT}" 14 | code_template = "for __i in {number}:" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/loops/while.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://ccnjk5s5qb2xe"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_fxxh0"] 4 | 5 | [resource] 6 | script = ExtResource("1_fxxh0") 7 | name = &"while" 8 | target_node_class = "" 9 | description = "Run the connected blocks as long as [i]condition[/i] is true. 10 | 11 | Hint: snap a [b]Comparison[/b] block into the condition." 12 | category = "Loops" 13 | type = 4 14 | variant_type = 0 15 | display_template = "while {condition: BOOL}" 16 | code_template = "while {condition}:" 17 | defaults = {} 18 | signal_name = "" 19 | scope = "" 20 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/add.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://coy3o7q0x0y60"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_rks7c"] 4 | 5 | [resource] 6 | script = ExtResource("1_rks7c") 7 | name = &"add" 8 | target_node_class = "" 9 | description = "" 10 | category = "Math" 11 | type = 3 12 | variant_type = 3 13 | display_template = "{a: FLOAT} + {b: FLOAT}" 14 | code_template = "{a} + {b}" 15 | defaults = { 16 | "a": 1.0, 17 | "b": 1.0 18 | } 19 | signal_name = "" 20 | scope = "" 21 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/cos.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://c6g6ljp46lfrj"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_lxbvo"] 4 | 5 | [resource] 6 | script = ExtResource("1_lxbvo") 7 | name = &"cos" 8 | description = "Calculate the cosine of [i]angle[/i]" 9 | category = "Math" 10 | type = 3 11 | variant_type = 3 12 | display_template = "cos {angle: FLOAT}" 13 | code_template = "cos(deg_to_rad({angle}))" 14 | defaults = { 15 | "angle": 0.0 16 | } 17 | signal_name = "" 18 | scope = "" 19 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/divide.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://dwk6c70c4ta0"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_rhh7v"] 4 | 5 | [resource] 6 | script = ExtResource("1_rhh7v") 7 | name = &"divide" 8 | target_node_class = "" 9 | description = "" 10 | category = "Math" 11 | type = 3 12 | variant_type = 3 13 | display_template = "{a: FLOAT} / {b: FLOAT}" 14 | code_template = "{a} / {b}" 15 | defaults = { 16 | "a": 1.0, 17 | "b": 1.0 18 | } 19 | signal_name = "" 20 | scope = "" 21 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/multiply.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://yipjitb3p66q"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_c5vny"] 4 | 5 | [resource] 6 | script = ExtResource("1_c5vny") 7 | name = &"multiply" 8 | target_node_class = "" 9 | description = "" 10 | category = "Math" 11 | type = 3 12 | variant_type = 3 13 | display_template = "{a: FLOAT} * {b: FLOAT}" 14 | code_template = "{a} * {b}" 15 | defaults = { 16 | "a": 1.0, 17 | "b": 1.0 18 | } 19 | signal_name = "" 20 | scope = "" 21 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/pow.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bib11ow5t44to"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_cx5g5"] 4 | 5 | [resource] 6 | script = ExtResource("1_cx5g5") 7 | name = &"pow" 8 | target_node_class = "" 9 | description = "" 10 | category = "Math" 11 | type = 3 12 | variant_type = 3 13 | display_template = "{base: FLOAT} ^ {exp: FLOAT}" 14 | code_template = "pow({base}, {exp})" 15 | defaults = { 16 | "base": 1.0, 17 | "exp": 1.0 18 | } 19 | signal_name = "" 20 | scope = "" 21 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/randf_range.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://u35glf576fue"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_03jps"] 4 | 5 | [resource] 6 | script = ExtResource("1_03jps") 7 | name = &"randf_range" 8 | target_node_class = "" 9 | description = "Generate a random floating point number between [i]from[/i] and [i]to[/i] inclusively" 10 | category = "Math" 11 | type = 3 12 | variant_type = 3 13 | display_template = "random floating point number between {from: FLOAT} and {to: FLOAT}" 14 | code_template = "randf_range({from}, {to})" 15 | defaults = { 16 | "from": -1.0, 17 | "to": 1.0 18 | } 19 | signal_name = "" 20 | scope = "" 21 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/randi_range.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://b3b1dyarh2hmo"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_hk574"] 4 | 5 | [resource] 6 | script = ExtResource("1_hk574") 7 | name = &"randi_range" 8 | target_node_class = "" 9 | description = "Generate a random signed 32-bits integer number between [i]from[/i] and [i]to[/i] inclusively. [i]from[/i] and [i]to[/i] can be a negative or positive number" 10 | category = "Math" 11 | type = 3 12 | variant_type = 2 13 | display_template = "random integer number between {from: INT} and {to: INT}" 14 | code_template = "randi_range({from}, {to})" 15 | defaults = { 16 | "from": 0, 17 | "to": 100 18 | } 19 | signal_name = "" 20 | scope = "" 21 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/sin.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://b1r7f06rfci6o"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_dlr47"] 4 | 5 | [resource] 6 | script = ExtResource("1_dlr47") 7 | name = &"sin" 8 | description = "Calculate the sine of [i]angle[/i]" 9 | category = "Math" 10 | type = 3 11 | variant_type = 3 12 | display_template = "sin {angle: FLOAT}" 13 | code_template = "sin(deg_to_rad({angle}))" 14 | defaults = { 15 | "angle": 0.0 16 | } 17 | signal_name = "" 18 | scope = "" 19 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/subtract.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://dkt135xfcklya"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_n0dmm"] 4 | 5 | [resource] 6 | script = ExtResource("1_n0dmm") 7 | name = &"subtract" 8 | target_node_class = "" 9 | description = "" 10 | category = "Math" 11 | type = 3 12 | variant_type = 3 13 | display_template = "{a: FLOAT} - {b: FLOAT}" 14 | code_template = "{a} - {b}" 15 | defaults = { 16 | "a": 1.0, 17 | "b": 1.0 18 | } 19 | signal_name = "" 20 | scope = "" 21 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/tan.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://blpo01pjjheqb"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_e2566"] 4 | 5 | [resource] 6 | script = ExtResource("1_e2566") 7 | name = &"tan" 8 | description = "Calculate the tangent of [i]angle[/i]" 9 | category = "Math" 10 | type = 3 11 | variant_type = 3 12 | display_template = "tan {angle: FLOAT}" 13 | code_template = "tan(deg_to_rad({angle}))" 14 | defaults = { 15 | "angle": 0.0 16 | } 17 | signal_name = "" 18 | scope = "" 19 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/vector2_x.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://btsfimn63xhi2"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_dvsrc"] 4 | 5 | [resource] 6 | script = ExtResource("1_dvsrc") 7 | name = &"vector2_x" 8 | target_node_class = "" 9 | description = "Gives the x of a [i]Vector2[/i]" 10 | category = "Math" 11 | type = 3 12 | variant_type = 3 13 | display_template = "x of {vector2: VECTOR2}" 14 | code_template = "{vector2}.x" 15 | defaults = { 16 | "vector2": Vector2(0, 0) 17 | } 18 | signal_name = "" 19 | scope = "" 20 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/vector2_y.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://ccbrbp4lee3wt"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_wuold"] 4 | 5 | [resource] 6 | script = ExtResource("1_wuold") 7 | name = &"vector2_y" 8 | target_node_class = "" 9 | description = "Gives the y of a [i]Vector2[/i]" 10 | category = "Math" 11 | type = 3 12 | variant_type = 3 13 | display_template = "y of {vector2: VECTOR2}" 14 | code_template = "{vector2}.y" 15 | defaults = { 16 | "vector2": Vector2(0, 0) 17 | } 18 | signal_name = "" 19 | scope = "" 20 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/vector_from_angle.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://c7a6wnxegkfd5"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_1p1ve"] 4 | 5 | [resource] 6 | script = ExtResource("1_1p1ve") 7 | name = &"from_angle" 8 | target_node_class = "" 9 | description = "Creates a unit Vector2 rotated to the given angle in radians." 10 | category = "Math" 11 | type = 3 12 | variant_type = 5 13 | display_template = "vector from {angle: FLOAT}" 14 | code_template = "Vector2.from_angle({angle})" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/math/vector_multiply.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bff7cwmpisihj"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_52jwf"] 4 | 5 | [resource] 6 | script = ExtResource("1_52jwf") 7 | name = &"vector_multiply" 8 | target_node_class = "" 9 | description = "Multiplies a vector with a number. Use this, for example, to get a point some distance away along an angle." 10 | category = "Math" 11 | type = 3 12 | variant_type = 5 13 | display_template = "multiply {vector: VECTOR2} by {number: FLOAT}" 14 | code_template = "{vector} * {number}" 15 | defaults = { 16 | "number": 1.0, 17 | "vector": Vector2(1, 1) 18 | } 19 | signal_name = "" 20 | scope = "" 21 | -------------------------------------------------------------------------------- /addons/block_code/blocks/physics/characterbody2d_move_and_slide.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://cp6ak6wea8ogh"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_e3r2r"] 4 | 5 | [resource] 6 | script = ExtResource("1_e3r2r") 7 | name = &"characterbody2d_move_and_slide" 8 | target_node_class = "CharacterBody2D" 9 | description = "" 10 | category = "Physics | Velocity" 11 | type = 2 12 | variant_type = 0 13 | display_template = "move and slide" 14 | code_template = "move_and_slide()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/sounds/audiostreamplayer_play.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bxjjml7u3rokv"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_vyl5w"] 4 | 5 | [resource] 6 | script = ExtResource("1_vyl5w") 7 | name = &"audiostreamplayer_play" 8 | target_node_class = "AudioStreamPlayer" 9 | description = "Play the audio stream" 10 | category = "Sounds" 11 | type = 2 12 | variant_type = 0 13 | display_template = "play" 14 | code_template = "play()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/sounds/audiostreamplayer_stop.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://ib16grbtduab"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_db4g2"] 4 | 5 | [resource] 6 | script = ExtResource("1_db4g2") 7 | name = &"audiostreamplayer_stop" 8 | target_node_class = "AudioStreamPlayer" 9 | description = "Stop the audio stream" 10 | category = "Sounds" 11 | type = 2 12 | variant_type = 0 13 | display_template = "stop" 14 | code_template = "stop()" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/sounds/load_sound.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://coefocdmytg0j"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_4w4si"] 4 | 5 | [resource] 6 | script = ExtResource("1_4w4si") 7 | name = &"load_sound" 8 | target_node_class = "" 9 | description = "Load a resource file as the audio stream" 10 | category = "Sounds" 11 | type = 2 12 | variant_type = 0 13 | display_template = "load file {file_path: STRING} as sound {name: STRING}" 14 | code_template = "var __sound = AudioStreamPlayer.new() 15 | __sound.name = {name} 16 | __sound.set_stream(load({file_path})) 17 | add_child(__sound) 18 | " 19 | defaults = {} 20 | signal_name = "" 21 | scope = "" 22 | -------------------------------------------------------------------------------- /addons/block_code/blocks/sounds/pause_continue_sound.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=4 format=3 uid="uid://wpdspamg3f6g"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_ilhdq"] 4 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_q04gm"] 5 | 6 | [sub_resource type="Resource" id="Resource_lalgp"] 7 | script = ExtResource("1_ilhdq") 8 | selected = 0 9 | items = ["pause", "continue"] 10 | 11 | [resource] 12 | script = ExtResource("1_q04gm") 13 | name = &"pause_continue_sound" 14 | target_node_class = "" 15 | description = "Pause/Continue the audio stream" 16 | category = "Sounds" 17 | type = 2 18 | variant_type = 0 19 | display_template = "{pause: NIL} the sound {name: STRING}" 20 | code_template = "var __sound_node = get_node({name}) 21 | if {pause} == \"pause\": 22 | __sound_node.stream_paused = true 23 | else: 24 | __sound_node.stream_paused = false 25 | " 26 | defaults = { 27 | "pause": SubResource("Resource_lalgp") 28 | } 29 | signal_name = "" 30 | scope = "" 31 | -------------------------------------------------------------------------------- /addons/block_code/blocks/sounds/play_sound.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://dt022ilveapt5"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_llfp1"] 4 | 5 | [resource] 6 | script = ExtResource("1_llfp1") 7 | name = &"play_sound" 8 | target_node_class = "" 9 | description = "Play the audio stream with volume and pitch" 10 | category = "Sounds" 11 | type = 2 12 | variant_type = 0 13 | display_template = "play the sound {name: STRING} with volume {db: FLOAT} dB and pitch scale {pitch: FLOAT}" 14 | code_template = "var __sound_node = get_node({name}) 15 | __sound_node.volume_db = {db} 16 | __sound_node.pitch_scale = {pitch} 17 | __sound_node.play() 18 | " 19 | defaults = { 20 | "db": 0.0, 21 | "pitch": 1.0 22 | } 23 | signal_name = "" 24 | scope = "" 25 | -------------------------------------------------------------------------------- /addons/block_code/blocks/sounds/stop_sound.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://csg40u5awp1sy"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_rfujh"] 4 | 5 | [resource] 6 | script = ExtResource("1_rfujh") 7 | name = &"stop_sound" 8 | target_node_class = "" 9 | description = "Stop the audio stream" 10 | category = "Sounds" 11 | type = 2 12 | variant_type = 0 13 | display_template = "stop the sound {name: STRING}" 14 | code_template = "var __sound_node = get_node({name}) 15 | __sound_node.stop() 16 | " 17 | defaults = { 18 | "db": 0.0, 19 | "pitch": 1.0 20 | } 21 | signal_name = "" 22 | scope = "" 23 | -------------------------------------------------------------------------------- /addons/block_code/blocks/spawn/cpuparticles2d_finished.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://c188gpgf4rpns"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_pmpup"] 4 | 5 | [resource] 6 | script = ExtResource("1_pmpup") 7 | name = &"cpuparticles2d_finished" 8 | target_node_class = "CPUParticles2D" 9 | description = "Emitted when all active particles have finished processing." 10 | category = "Lifecycle | Spawn" 11 | type = 1 12 | variant_type = 0 13 | display_template = "when particles are finished" 14 | code_template = "func _on_finished():" 15 | defaults = {} 16 | signal_name = "finished" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/transform/rigidbody2d_physics_position.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://ses5486g56q"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_72i54"] 4 | 5 | [resource] 6 | script = ExtResource("1_72i54") 7 | name = &"rigidbody2d_physics_position" 8 | target_node_class = "RigidBody2D" 9 | description = "" 10 | category = "Transform | Position" 11 | type = 2 12 | variant_type = 0 13 | display_template = "set physics position {position: VECTOR2}" 14 | code_template = "PhysicsServer2D.body_set_state( 15 | get_rid(), 16 | PhysicsServer2D.BODY_STATE_TRANSFORM, 17 | Transform2D.IDENTITY.translated({position}) 18 | ) 19 | " 20 | defaults = {} 21 | signal_name = "" 22 | scope = "" 23 | -------------------------------------------------------------------------------- /addons/block_code/blocks/ui/label_set_text.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://ciqkywxdk4uht"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_bofov"] 4 | 5 | [resource] 6 | script = ExtResource("1_bofov") 7 | name = &"label_set_text" 8 | target_node_class = "Label" 9 | description = "Set the text for the label." 10 | category = "UI" 11 | type = 2 12 | variant_type = 0 13 | display_template = "set text to {text: STRING}" 14 | code_template = "text = {text}" 15 | defaults = {} 16 | signal_name = "" 17 | scope = "" 18 | -------------------------------------------------------------------------------- /addons/block_code/blocks/variables/vector2.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://ddj24k1fp0s82"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_ilw3v"] 4 | 5 | [resource] 6 | script = ExtResource("1_ilw3v") 7 | name = &"vector2" 8 | target_node_class = "" 9 | description = "" 10 | category = "Math" 11 | type = 3 12 | variant_type = 5 13 | display_template = "vector2 x: {x: FLOAT} y: {y: FLOAT}" 14 | code_template = "Vector2({x}, {y})" 15 | defaults = { 16 | "x": 0.0, 17 | "y": 0.0 18 | } 19 | signal_name = "" 20 | scope = "" 21 | -------------------------------------------------------------------------------- /addons/block_code/code_generation/ast_list.gd: -------------------------------------------------------------------------------- 1 | extends RefCounted 2 | 3 | const Types = preload("res://addons/block_code/types/types.gd") 4 | const BlockAST = preload("res://addons/block_code/code_generation/block_ast.gd") 5 | 6 | var array: Array[ASTPair] 7 | 8 | 9 | class ASTPair: 10 | var ast: BlockAST 11 | var canvas_position: Vector2 12 | 13 | func _init(p_ast: BlockAST, p_canvas_position: Vector2): 14 | ast = p_ast 15 | canvas_position = p_canvas_position 16 | 17 | 18 | func _init(): 19 | array = [] 20 | 21 | 22 | func append(ast: BlockAST, canvas_position: Vector2): 23 | array.append(ASTPair.new(ast, canvas_position)) 24 | 25 | 26 | func clear(): 27 | array.clear() 28 | 29 | 30 | func get_top_level_nodes_of_type(block_type: Types.BlockType) -> Array[BlockAST]: 31 | var asts: Array[BlockAST] = [] 32 | 33 | for ast_pair in array: 34 | if ast_pair.ast.root.data.type == block_type: 35 | asts.append(ast_pair.ast) 36 | 37 | return asts 38 | -------------------------------------------------------------------------------- /addons/block_code/code_generation/block_extension.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | ## Block extensions interface. 3 | ## 4 | ## A BlockExtension provides additional, context-sensitive information for the 5 | ## user interface of a particular type of block. An instance of BlockExtension 6 | ## belongs to a specific [Block] in the block canvas, but an extension does not 7 | ## have direct access to its block. Instead, it can use the [member context_node] 8 | ## property to draw information about the scene.[br] 9 | ## [br] 10 | ## To customize the user interface for a block, override public functions such 11 | ## as [method get_defaults].[br] 12 | ## [br] 13 | ## In some cases, an extension may need to monitor the scene to determine if it 14 | ## has changed. To achieve this, override [method _context_node_changed] to 15 | ## connect the relevant signals, and call [method _emit_changed] when a 16 | ## significant change has occurred. 17 | class_name BlockExtension 18 | extends RefCounted 19 | 20 | signal changed 21 | 22 | var context_node: Node: 23 | set(value): 24 | if context_node != value: 25 | context_node = value 26 | _context_node_changed() 27 | 28 | 29 | ## Called when the value of context_node changes. Use this for connecting 30 | ## signals to monitor for changes. 31 | func _context_node_changed(): 32 | pass 33 | 34 | 35 | ## Generate a set of defaults for this block extension based on the current 36 | ## context. The return value will be merged with the defaults specified in the 37 | ## static block definition. 38 | func get_defaults() -> Dictionary: 39 | return get_defaults_for_node(context_node) 40 | 41 | 42 | ## @deprecated: Use [method get_defaults] instead. 43 | func get_defaults_for_node(context_node: Node) -> Dictionary: 44 | return {} 45 | 46 | 47 | ## Emit the "changed" signal. Use this when an event has occurred which may 48 | ## cause [method get_defaults] to return a different value. 49 | func _emit_changed(): 50 | changed.emit() 51 | -------------------------------------------------------------------------------- /addons/block_code/code_generation/option_data.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | 3 | @export var selected: int 4 | @export var items: Array 5 | 6 | 7 | func _init(p_items: Array = [], p_selected: int = 0): 8 | items = p_items 9 | selected = p_selected 10 | -------------------------------------------------------------------------------- /addons/block_code/code_generation/util.gd: -------------------------------------------------------------------------------- 1 | extends Object 2 | 3 | 4 | static func get_files_in_dir_recursive(path: String, pattern: String) -> Array: 5 | var files = [] 6 | var dir := DirAccess.open(path) 7 | 8 | if not dir: 9 | return files 10 | 11 | dir.list_dir_begin() 12 | 13 | var file_name = dir.get_next() 14 | 15 | while file_name != "": 16 | var file_path = path + "/" + file_name 17 | if dir.current_is_dir(): 18 | files.append_array(get_files_in_dir_recursive(file_path, pattern)) 19 | elif file_name.matchn(pattern): 20 | files.append(file_path) 21 | 22 | file_name = dir.get_next() 23 | 24 | return files 25 | -------------------------------------------------------------------------------- /addons/block_code/code_generation/variable_definition.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | 3 | @export var var_name: String 4 | @export var var_type: Variant.Type 5 | 6 | 7 | func _init(p_var_name: String = "", p_var_type: Variant.Type = TYPE_NIL): 8 | var_name = p_var_name 9 | var_type = p_var_type 10 | -------------------------------------------------------------------------------- /addons/block_code/drag_manager/drag_manager.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://cph1k5cfximbf"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/drag_manager/drag_manager.gd" id="1_rif3x"] 4 | 5 | [node name="DragManager" type="Control"] 6 | layout_mode = 3 7 | anchors_preset = 0 8 | mouse_filter = 1 9 | script = ExtResource("1_rif3x") 10 | -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/addons/block_code/examples/pong_game/assets/ball.png -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/ball.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bcgr5amsq3jfl" 6 | path="res://.godot/imported/ball.png-a3f7eabf64c84da008b32e0603bb9319.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/block_code/examples/pong_game/assets/ball.png" 14 | dest_files=["res://.godot/imported/ball.png-a3f7eabf64c84da008b32e0603bb9319.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/addons/block_code/examples/pong_game/assets/line.png -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/line.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dijemw7iilr2m" 6 | path="res://.godot/imported/line.png-83090a08b4f906e6a39a1eefa8ad7e77.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/block_code/examples/pong_game/assets/line.png" 14 | dest_files=["res://.godot/imported/line.png-83090a08b4f906e6a39a1eefa8ad7e77.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/paddle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/addons/block_code/examples/pong_game/assets/paddle.png -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/paddle.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://tplpgtnfeda0" 6 | path="res://.godot/imported/paddle.png-811f90fd603b4b0034619e586f57a585.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/block_code/examples/pong_game/assets/paddle.png" 14 | dest_files=["res://.godot/imported/paddle.png-811f90fd603b4b0034619e586f57a585.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/paddle_hit.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/addons/block_code/examples/pong_game/assets/paddle_hit.ogg -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/paddle_hit.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://jk0oapxjw354" 6 | path="res://.godot/imported/paddle_hit.ogg-531002e4adc01759f28245f9d90a420e.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/block_code/examples/pong_game/assets/paddle_hit.ogg" 11 | dest_files=["res://.godot/imported/paddle_hit.ogg-531002e4adc01759f28245f9d90a420e.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/score.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/addons/block_code/examples/pong_game/assets/score.ogg -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/score.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://kr166je3cyj7" 6 | path="res://.godot/imported/score.ogg-5e8aef66830e1343841647f944c8880d.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/block_code/examples/pong_game/assets/score.ogg" 11 | dest_files=["res://.godot/imported/score.ogg-5e8aef66830e1343841647f944c8880d.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/space.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/addons/block_code/examples/pong_game/assets/space.png -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/space.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ceiq8wmlnnnif" 6 | path="res://.godot/imported/space.png-8022dfae750dab8949f3a877340ebde9.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/block_code/examples/pong_game/assets/space.png" 14 | dest_files=["res://.godot/imported/space.png-8022dfae750dab8949f3a877340ebde9.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/wall_hit.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/addons/block_code/examples/pong_game/assets/wall_hit.ogg -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/assets/wall_hit.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://bc7jd3d8m5spt" 6 | path="res://.godot/imported/wall_hit.ogg-49ced0c269405870b16a99ad868f67ce.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/block_code/examples/pong_game/assets/wall_hit.ogg" 11 | dest_files=["res://.godot/imported/wall_hit.ogg-49ced0c269405870b16a99ad868f67ce.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/ball.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=5 format=3 uid="uid://c7l70grmkauij"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://bcgr5amsq3jfl" path="res://addons/block_code/examples/pong_game/assets/ball.png" id="2_xkrmm"] 4 | 5 | [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_c3m63"] 6 | friction = 0.0 7 | bounce = 1.0 8 | 9 | [sub_resource type="CircleShape2D" id="CircleShape2D_sntrn"] 10 | radius = 64.0 11 | 12 | [node name="Ball" type="RigidBody2D" groups=["balls"]] 13 | collision_layer = 2 14 | collision_mask = 15 15 | physics_material_override = SubResource("PhysicsMaterial_c3m63") 16 | continuous_cd = 1 17 | max_contacts_reported = 1 18 | contact_monitor = true 19 | linear_velocity = Vector2(353.553, 353.553) 20 | linear_damp_mode = 1 21 | angular_damp_mode = 1 22 | 23 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 24 | unique_name_in_owner = true 25 | shape = SubResource("CircleShape2D_sntrn") 26 | 27 | [node name="Sprite2D" type="Sprite2D" parent="."] 28 | unique_name_in_owner = true 29 | texture = ExtResource("2_xkrmm") 30 | -------------------------------------------------------------------------------- /addons/block_code/examples/pong_game/goal_area.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://fhoapg3anjsu"] 2 | 3 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_8q7gx"] 4 | size = Vector2(128, 1080) 5 | 6 | [node name="GoalArea" type="Area2D"] 7 | collision_mask = 3 8 | 9 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 10 | shape = SubResource("RectangleShape2D_8q7gx") 11 | debug_color = Color(0.91772, 6.97896e-05, 0.704698, 0.42) 12 | -------------------------------------------------------------------------------- /addons/block_code/examples/spawner/ball.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://c7l70grmkauij"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://bcgr5amsq3jfl" path="res://addons/block_code/examples/pong_game/assets/ball.png" id="2_xkrmm"] 4 | 5 | [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_c3m63"] 6 | friction = 0.0 7 | bounce = 1.0 8 | 9 | [sub_resource type="CircleShape2D" id="CircleShape2D_sntrn"] 10 | radius = 64.0 11 | 12 | [node name="Ball" type="RigidBody2D" groups=["balls"]] 13 | collision_layer = 2 14 | collision_mask = 15 15 | physics_material_override = SubResource("PhysicsMaterial_c3m63") 16 | continuous_cd = 1 17 | contact_monitor = true 18 | max_contacts_reported = 1 19 | linear_velocity = Vector2(353.553, 353.553) 20 | linear_damp_mode = 1 21 | angular_damp_mode = 1 22 | 23 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 24 | unique_name_in_owner = true 25 | shape = SubResource("CircleShape2D_sntrn") 26 | 27 | [node name="Sprite2D" type="Sprite2D" parent="."] 28 | unique_name_in_owner = true 29 | texture = ExtResource("2_xkrmm") 30 | -------------------------------------------------------------------------------- /addons/block_code/inspector_plugin/block_script_inspector.gd: -------------------------------------------------------------------------------- 1 | extends EditorInspectorPlugin 2 | 3 | const BlockCodePlugin = preload("res://addons/block_code/block_code_plugin.gd") 4 | 5 | 6 | func _can_handle(object): 7 | return object is BlockCode 8 | 9 | 10 | func _parse_begin(object): 11 | var block_code := object as BlockCode 12 | 13 | var button := Button.new() 14 | button.text = "Open Block Script" 15 | button.pressed.connect(func(): BlockCodePlugin.main_panel.switch_block_code_node(block_code)) 16 | 17 | var container := MarginContainer.new() 18 | container.add_theme_constant_override("margin_bottom", 10) 19 | container.add_child(button) 20 | 21 | add_custom_control(container) 22 | -------------------------------------------------------------------------------- /addons/block_code/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="BlockCode" 4 | description="Create games using a high-level, block-based visual programming language." 5 | author="Endless" 6 | version="v0.7.1-31-g1a0cd11" 7 | script="block_code_plugin.gd" 8 | -------------------------------------------------------------------------------- /addons/block_code/serialization/block_serialization.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | 3 | const BlockSerialization = preload("res://addons/block_code/serialization/block_serialization.gd") 4 | 5 | @export var name: StringName 6 | @export var children: Array[BlockSerialization] 7 | @export var arguments: Dictionary # String, ValueBlockSerialization 8 | 9 | 10 | func _init(p_name: StringName = &"", p_children: Array[BlockSerialization] = [], p_arguments: Dictionary = {}): 11 | name = p_name 12 | children = p_children 13 | arguments = p_arguments 14 | -------------------------------------------------------------------------------- /addons/block_code/serialization/block_serialization_tree.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | 3 | const BlockSerialization = preload("res://addons/block_code/serialization/block_serialization.gd") 4 | 5 | @export var root: BlockSerialization 6 | @export var canvas_position: Vector2 7 | 8 | 9 | func _init(p_root: BlockSerialization = null, p_canvas_position: Vector2 = Vector2(0, 0)): 10 | root = p_root 11 | canvas_position = p_canvas_position 12 | 13 | 14 | func _to_string(): 15 | return to_string_recursive(root, 0) 16 | 17 | 18 | func to_string_recursive(node: BlockSerialization, depth: int) -> String: 19 | var string: String = "%s %s\n" % ["-".repeat(depth), node.block_name] 20 | 21 | for c in node.children: 22 | string += to_string_recursive(c, depth + 1) 23 | 24 | return string 25 | -------------------------------------------------------------------------------- /addons/block_code/serialization/default_block_script.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="BlockScriptSerialization" load_steps=7 format=3 uid="uid://i7adsp6x51ml"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/serialization/block_serialization_tree.gd" id="1_opywe"] 4 | [ext_resource type="Script" path="res://addons/block_code/serialization/block_serialization.gd" id="2_h8ehk"] 5 | [ext_resource type="Script" path="res://addons/block_code/serialization/block_script_serialization.gd" id="2_yjlcv"] 6 | [ext_resource type="Script" path="res://addons/block_code/code_generation/variable_definition.gd" id="3_wb2fg"] 7 | 8 | [sub_resource type="Resource" id="Resource_oalom"] 9 | script = ExtResource("2_h8ehk") 10 | name = &"ready" 11 | children = Array[ExtResource("2_h8ehk")]([]) 12 | arguments = {} 13 | 14 | [sub_resource type="Resource" id="Resource_8sqy5"] 15 | script = ExtResource("1_opywe") 16 | root = SubResource("Resource_oalom") 17 | canvas_position = Vector2(54, 47) 18 | 19 | [resource] 20 | script = ExtResource("2_yjlcv") 21 | script_inherits = "INHERIT_DEFAULT" 22 | block_serialization_trees = Array[ExtResource("1_opywe")]([SubResource("Resource_8sqy5")]) 23 | variables = Array[ExtResource("3_wb2fg")]([]) 24 | generated_script = "extends INHERIT_DEFAULT" 25 | version = 0 26 | -------------------------------------------------------------------------------- /addons/block_code/serialization/value_block_serialization.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | 3 | @export var name: StringName 4 | @export var arguments: Dictionary # String, ValueBlockSerialization 5 | 6 | 7 | func _init(p_name: StringName = &"", p_arguments: Dictionary = {}): 8 | name = p_name 9 | arguments = p_arguments 10 | -------------------------------------------------------------------------------- /addons/block_code/ui/block_editor_context.gd: -------------------------------------------------------------------------------- 1 | class_name BlockEditorContext 2 | extends Object 3 | 4 | signal changed 5 | 6 | static var _instance: BlockEditorContext 7 | 8 | var block_code_node: BlockCode: 9 | set(value): 10 | block_code_node = value 11 | changed.emit() 12 | 13 | var block_script: BlockScriptSerialization: 14 | get: 15 | if block_code_node == null: 16 | return null 17 | return block_code_node.block_script 18 | 19 | var parent_node: Node: 20 | get: 21 | if block_code_node == null: 22 | return null 23 | return block_code_node.get_parent() 24 | 25 | 26 | func force_update() -> void: 27 | changed.emit() 28 | 29 | 30 | static func get_default() -> BlockEditorContext: 31 | if _instance == null: 32 | _instance = BlockEditorContext.new() 33 | return _instance 34 | -------------------------------------------------------------------------------- /addons/block_code/ui/block_tree_util.gd: -------------------------------------------------------------------------------- 1 | extends Object 2 | 3 | 4 | ## Returns the scope of the first non-empty scope child block 5 | static func get_tree_scope(node: Node) -> String: 6 | if node is Block: 7 | if node.definition.scope != "": 8 | return node.definition.scope 9 | 10 | for c in node.get_children(): 11 | var scope := get_tree_scope(c) 12 | if scope != "": 13 | return scope 14 | return "" 15 | 16 | 17 | ## Get the nearest Block node that is a parent of the provided node. 18 | static func get_parent_block(node: Node) -> Block: 19 | var parent = node.get_parent() 20 | while parent and not parent is Block: 21 | parent = parent.get_parent() 22 | return parent as Block 23 | -------------------------------------------------------------------------------- /addons/block_code/ui/blocks/control_block/control_block.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | class_name ControlBlock 3 | extends Block 4 | 5 | const Constants = preload("res://addons/block_code/ui/constants.gd") 6 | 7 | 8 | func _ready(): 9 | super() 10 | 11 | %TopBackground.color = color 12 | %TopBackground.shift_bottom = Constants.CONTROL_MARGIN 13 | %BottomBackground.color = color 14 | %BottomBackground.shift_top = Constants.CONTROL_MARGIN 15 | %SnapPoint.add_theme_constant_override("margin_left", Constants.CONTROL_MARGIN) 16 | %SnapGutter.color = color 17 | %SnapGutter.custom_minimum_size.x = Constants.CONTROL_MARGIN 18 | 19 | 20 | func _on_drag_drop_area_drag_started(offset: Vector2) -> void: 21 | _drag_started(offset) 22 | 23 | 24 | static func get_block_class(): 25 | return "ControlBlock" 26 | 27 | 28 | static func get_scene_path(): 29 | return "res://addons/block_code/ui/blocks/control_block/control_block.tscn" 30 | -------------------------------------------------------------------------------- /addons/block_code/ui/blocks/entry_block/entry_block.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | class_name EntryBlock 3 | extends StatementBlock 4 | 5 | ## if non-empty, this block defines a callback that will be connected to the signal with this name 6 | @export var signal_name: String 7 | 8 | 9 | func _ready(): 10 | super() 11 | bottom_snap = null 12 | 13 | 14 | static func get_block_class(): 15 | return "EntryBlock" 16 | 17 | 18 | static func get_scene_path(): 19 | return "res://addons/block_code/ui/blocks/entry_block/entry_block.tscn" 20 | -------------------------------------------------------------------------------- /addons/block_code/ui/blocks/parameter_block/parameter_block.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | class_name ParameterBlock 3 | extends Block 4 | 5 | const Constants = preload("res://addons/block_code/ui/constants.gd") 6 | const Util = preload("res://addons/block_code/ui/util.gd") 7 | const ParameterOutput = preload("res://addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.gd") 8 | 9 | @onready var _panel := $Panel 10 | 11 | var args_to_add_after_format: Dictionary # Only used when loading 12 | var spawned_by: ParameterOutput 13 | 14 | var _panel_normal: StyleBox 15 | var _panel_focus: StyleBox 16 | 17 | 18 | func _ready(): 19 | super() 20 | 21 | _panel_normal = _panel.get_theme_stylebox("panel").duplicate() 22 | _panel_normal.bg_color = color 23 | _panel_normal.border_color = color.darkened(0.2) 24 | 25 | _panel_focus = _panel.get_theme_stylebox("panel").duplicate() 26 | _panel_focus.bg_color = color 27 | _panel_focus.border_color = Constants.FOCUS_BORDER_COLOR 28 | 29 | if not Util.node_is_part_of_edited_scene(self): 30 | _panel.add_theme_stylebox_override("panel", _panel_normal) 31 | 32 | 33 | func _on_drag_drop_area_drag_started(offset: Vector2) -> void: 34 | _drag_started(offset) 35 | 36 | 37 | static func get_block_class(): 38 | return "ParameterBlock" 39 | 40 | 41 | static func get_scene_path(): 42 | return "res://addons/block_code/ui/blocks/parameter_block/parameter_block.tscn" 43 | 44 | 45 | func _on_focus_entered(): 46 | _panel.add_theme_stylebox_override("panel", _panel_focus) 47 | 48 | 49 | func _on_focus_exited(): 50 | _panel.add_theme_stylebox_override("panel", _panel_normal) 51 | -------------------------------------------------------------------------------- /addons/block_code/ui/blocks/statement_block/statement_block.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | class_name StatementBlock 3 | extends Block 4 | 5 | const Types = preload("res://addons/block_code/types/types.gd") 6 | 7 | @onready var _background := %Background 8 | 9 | var arg_name_to_param_input_dict: Dictionary 10 | var args_to_add_after_format: Dictionary # Only used when loading 11 | 12 | 13 | func _ready(): 14 | super() 15 | 16 | if definition != null and definition.type != Types.BlockType.STATEMENT: 17 | _background.show_top = false 18 | _background.color = color 19 | 20 | 21 | func _on_drag_drop_area_drag_started(offset: Vector2) -> void: 22 | _drag_started(offset) 23 | 24 | 25 | static func get_block_class(): 26 | return "StatementBlock" 27 | 28 | 29 | static func get_scene_path(): 30 | return "res://addons/block_code/ui/blocks/statement_block/statement_block.tscn" 31 | -------------------------------------------------------------------------------- /addons/block_code/ui/blocks/utilities/background/gutter.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Control 3 | 4 | const BlockTreeUtil = preload("res://addons/block_code/ui/block_tree_util.gd") 5 | const Constants = preload("res://addons/block_code/ui/constants.gd") 6 | 7 | var outline_color: Color 8 | var parent_block: Block 9 | 10 | @export var color: Color: 11 | set = _set_color 12 | 13 | 14 | func _set_color(new_color): 15 | color = new_color 16 | outline_color = color.darkened(0.2) 17 | queue_redraw() 18 | 19 | 20 | func _ready(): 21 | parent_block = BlockTreeUtil.get_parent_block(self) 22 | parent_block.focus_entered.connect(queue_redraw) 23 | parent_block.focus_exited.connect(queue_redraw) 24 | 25 | 26 | func _draw(): 27 | var fill_polygon: PackedVector2Array 28 | fill_polygon.append(Vector2(0.0, 0.0)) 29 | fill_polygon.append(Vector2(size.x, 0.0)) 30 | fill_polygon.append(Vector2(size.x, size.y)) 31 | fill_polygon.append(Vector2(0.0, size.y)) 32 | fill_polygon.append(Vector2(0.0, 0.0)) 33 | 34 | var left_polygon: PackedVector2Array 35 | var right_polygon: PackedVector2Array 36 | 37 | left_polygon.append(Vector2(0.0, 0.0)) 38 | left_polygon.append(Vector2(0.0, size.y)) 39 | 40 | right_polygon.append(Vector2(size.x, 0.0)) 41 | right_polygon.append(Vector2(size.x, size.y)) 42 | 43 | draw_colored_polygon(fill_polygon, color) 44 | draw_polyline(left_polygon, Constants.FOCUS_BORDER_COLOR if parent_block.has_focus() else outline_color, Constants.OUTLINE_WIDTH) 45 | draw_polyline(right_polygon, Constants.FOCUS_BORDER_COLOR if parent_block.has_focus() else outline_color, Constants.OUTLINE_WIDTH) 46 | -------------------------------------------------------------------------------- /addons/block_code/ui/blocks/utilities/drag_drop_area/drag_drop_area.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://c7puyxpqcq6xo"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/ui/blocks/utilities/drag_drop_area/drag_drop_area.gd" id="1_5vdxp"] 4 | 5 | [node name="DragDropArea" type="Control"] 6 | layout_mode = 3 7 | anchors_preset = 15 8 | anchor_right = 1.0 9 | anchor_bottom = 1.0 10 | grow_horizontal = 2 11 | grow_vertical = 2 12 | mouse_filter = 1 13 | script = ExtResource("1_5vdxp") 14 | -------------------------------------------------------------------------------- /addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://dp01u74qkty7r"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/ui/blocks/utilities/parameter_output/parameter_output.gd" id="1_eebb2"] 4 | [ext_resource type="PackedScene" uid="uid://b1oge52xhjqnu" path="res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.tscn" id="2_ngr7c"] 5 | 6 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_tn6h4"] 7 | bg_color = Color(1, 1, 1, 1) 8 | corner_radius_top_left = 40 9 | corner_radius_top_right = 40 10 | corner_radius_bottom_right = 40 11 | corner_radius_bottom_left = 40 12 | 13 | [node name="ParameterOutput" type="MarginContainer"] 14 | anchors_preset = 15 15 | anchor_right = 1.0 16 | anchor_bottom = 1.0 17 | offset_right = -1052.0 18 | offset_bottom = -617.0 19 | grow_horizontal = 2 20 | grow_vertical = 2 21 | mouse_filter = 2 22 | script = ExtResource("1_eebb2") 23 | 24 | [node name="Panel" type="Panel" parent="."] 25 | unique_name_in_owner = true 26 | layout_mode = 2 27 | mouse_filter = 2 28 | theme_override_styles/panel = SubResource("StyleBoxFlat_tn6h4") 29 | 30 | [node name="SnapPoint" parent="." instance=ExtResource("2_ngr7c")] 31 | unique_name_in_owner = true 32 | layout_mode = 2 33 | block_type = 0 34 | variant_type = 4 35 | 36 | [connection signal="snapped_block_changed" from="SnapPoint" to="." method="_on_snap_point_snapped_block_changed"] 37 | [connection signal="snapped_block_removed" from="SnapPoint" to="." method="_on_snap_point_snapped_block_removed"] 38 | -------------------------------------------------------------------------------- /addons/block_code/ui/blocks/utilities/snap_point/snap_point.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://b1oge52xhjqnu"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/ui/blocks/utilities/snap_point/snap_point.gd" id="1_kseym"] 4 | 5 | [node name="SnapPoint" type="MarginContainer" groups=["snap_point"]] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | offset_right = -1152.0 10 | offset_bottom = -648.0 11 | grow_horizontal = 2 12 | grow_vertical = 2 13 | mouse_filter = 2 14 | script = ExtResource("1_kseym") 15 | 16 | [connection signal="child_entered_tree" from="." to="." method="_on_child_entered_tree"] 17 | [connection signal="child_exiting_tree" from="." to="." method="_on_child_exiting_tree"] 18 | -------------------------------------------------------------------------------- /addons/block_code/ui/blocks/utilities/template_editor/template_editor.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://b1xvp3u11h41s"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/ui/blocks/utilities/template_editor/template_editor.gd" id="1_7extq"] 4 | 5 | [node name="TemplateEditor" type="MarginContainer"] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | grow_horizontal = 2 10 | grow_vertical = 2 11 | mouse_filter = 2 12 | script = ExtResource("1_7extq") 13 | 14 | [node name="Container" type="HBoxContainer" parent="."] 15 | unique_name_in_owner = true 16 | layout_mode = 2 17 | mouse_filter = 2 18 | -------------------------------------------------------------------------------- /addons/block_code/ui/picker/categories/block_category.gd: -------------------------------------------------------------------------------- 1 | extends RefCounted 2 | 3 | var name: String 4 | var color: Color 5 | var order: int 6 | 7 | 8 | func _init(p_name: String = "", p_color: Color = Color.WHITE, p_order: int = 0): 9 | name = p_name 10 | color = p_color 11 | order = p_order 12 | 13 | 14 | ## Compare block categories for sorting. Compare by order then name. 15 | static func sort_by_order(a, b) -> bool: 16 | if a.order != b.order: 17 | return a.order < b.order 18 | return a.name.naturalcasecmp_to(b.name) < 0 19 | -------------------------------------------------------------------------------- /addons/block_code/ui/picker/categories/block_category_button.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends MarginContainer 3 | 4 | const BlockCategory = preload("res://addons/block_code/ui/picker/categories/block_category.gd") 5 | const Util = preload("res://addons/block_code/ui/util.gd") 6 | 7 | signal selected 8 | 9 | var category: BlockCategory 10 | 11 | @onready var _panel := %Panel 12 | @onready var _label := %Label 13 | 14 | 15 | func _ready(): 16 | if not category: 17 | category = BlockCategory.new("Example", Color.RED) 18 | 19 | if not Util.node_is_part_of_edited_scene(self): 20 | var new_stylebox: StyleBoxFlat = _panel.get_theme_stylebox("panel").duplicate() 21 | new_stylebox.bg_color = category.color 22 | _panel.add_theme_stylebox_override("panel", new_stylebox) 23 | 24 | _label.text = category.name 25 | 26 | 27 | func _on_button_pressed(): 28 | selected.emit() 29 | -------------------------------------------------------------------------------- /addons/block_code/ui/picker/categories/block_category_display.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://duhpwtfo3k0sk"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/ui/picker/categories/block_category_display.gd" id="1_wkdht"] 4 | 5 | [node name="BlockCategoryDisplay" type="MarginContainer"] 6 | anchors_preset = 15 7 | anchor_right = 1.0 8 | anchor_bottom = 1.0 9 | offset_right = -918.0 10 | offset_bottom = -246.0 11 | grow_horizontal = 2 12 | grow_vertical = 2 13 | theme_override_constants/margin_left = 4 14 | theme_override_constants/margin_bottom = 40 15 | script = ExtResource("1_wkdht") 16 | 17 | [node name="VBoxContainer" type="VBoxContainer" parent="."] 18 | layout_mode = 2 19 | 20 | [node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"] 21 | layout_mode = 2 22 | theme_override_constants/margin_bottom = 4 23 | 24 | [node name="Label" type="Label" parent="VBoxContainer/MarginContainer"] 25 | unique_name_in_owner = true 26 | layout_mode = 2 27 | theme_override_font_sizes/font_size = 18 28 | 29 | [node name="BlocksContainer" type="VBoxContainer" parent="VBoxContainer"] 30 | unique_name_in_owner = true 31 | layout_mode = 2 32 | theme_override_constants/separation = 14 33 | -------------------------------------------------------------------------------- /addons/block_code/ui/picker/categories/category_factory.gd: -------------------------------------------------------------------------------- 1 | class_name CategoryFactory 2 | extends Object 3 | 4 | const BlockCategory = preload("res://addons/block_code/ui/picker/categories/block_category.gd") 5 | const Constants = preload("res://addons/block_code/ui/constants.gd") 6 | 7 | 8 | ## Returns a list of BlockCategory instances for all block categories. 9 | static func get_all_categories(custom_categories: Array[BlockCategory] = []) -> Array[BlockCategory]: 10 | var result: Array[BlockCategory] 11 | 12 | for category_name in Constants.BUILTIN_CATEGORIES_PROPS: 13 | var props: Dictionary = Constants.BUILTIN_CATEGORIES_PROPS.get(category_name, {}) 14 | var color: Color = props.get("color", Color.SLATE_GRAY) 15 | var order: int = props.get("order", 0) 16 | result.append(BlockCategory.new(category_name, color, order)) 17 | 18 | # TODO: Should we deduplicate custom_categories here? 19 | result.append_array(custom_categories) 20 | 21 | return result 22 | -------------------------------------------------------------------------------- /addons/block_code/ui/picker/categories/variable_category/create_variable_button.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends MarginContainer 3 | 4 | signal create_variable(var_name: String, var_type: String) 5 | 6 | @onready var _create_variable_dialog := %CreateVariableDialog 7 | @onready var _create_button := %CreateButton 8 | @onready var _create_variable_icon = _create_button.get_theme_icon("Add", "EditorIcons") 9 | 10 | 11 | func _ready() -> void: 12 | _create_button.icon = _create_variable_icon 13 | 14 | 15 | func _on_create_button_pressed(): 16 | _create_variable_dialog.popup() 17 | 18 | 19 | func _on_create_variable_dialog_create_variable(var_name, var_type): 20 | create_variable.emit(var_name, var_type) 21 | -------------------------------------------------------------------------------- /addons/block_code/ui/picker/categories/variable_category/create_variable_button.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://t0eoc4ekvjr1"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/ui/picker/categories/variable_category/create_variable_button.gd" id="1_cw6c3"] 4 | [ext_resource type="PackedScene" uid="uid://dbrm7wwkao0c0" path="res://addons/block_code/ui/picker/categories/variable_category/create_variable_dialog.tscn" id="2_udpg5"] 5 | 6 | [node name="CreateVariableButton" type="MarginContainer"] 7 | size_flags_horizontal = 0 8 | theme_override_constants/margin_bottom = 12 9 | script = ExtResource("1_cw6c3") 10 | 11 | [node name="CreateButton" type="Button" parent="."] 12 | unique_name_in_owner = true 13 | layout_mode = 2 14 | theme_type_variation = &"InspectorActionButton" 15 | text = "Create New Variable" 16 | 17 | [node name="CreateVariableDialog" parent="." instance=ExtResource("2_udpg5")] 18 | unique_name_in_owner = true 19 | visible = false 20 | 21 | [connection signal="pressed" from="CreateButton" to="." method="_on_create_button_pressed"] 22 | [connection signal="create_variable" from="CreateVariableDialog" to="." method="_on_create_variable_dialog_create_variable"] 23 | -------------------------------------------------------------------------------- /addons/block_code/ui/picker/categories/variable_category/variable_category_display.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends "res://addons/block_code/ui/picker/categories/block_category_display.gd" 3 | 4 | const Types = preload("res://addons/block_code/types/types.gd") 5 | const VariableDefinition = preload("res://addons/block_code/code_generation/variable_definition.gd") 6 | 7 | @onready var h_separator := %HSeparator 8 | 9 | signal variable_created(variable: VariableDefinition) 10 | 11 | 12 | func _ready(): 13 | super() 14 | 15 | 16 | func _update_blocks(): 17 | super() 18 | 19 | if h_separator: 20 | h_separator.visible = not block_definitions.is_empty() 21 | 22 | 23 | func _on_create_variable(var_name, var_type): 24 | variable_created.emit(VariableDefinition.new(var_name, Types.STRING_TO_VARIANT_TYPE[var_type])) 25 | -------------------------------------------------------------------------------- /addons/block_code/ui/picker/categories/variable_category/variable_category_display.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=5 format=3 uid="uid://byne4g2yvdf3"] 2 | 3 | [ext_resource type="PackedScene" uid="uid://duhpwtfo3k0sk" path="res://addons/block_code/ui/picker/categories/block_category_display.tscn" id="1_vermd"] 4 | [ext_resource type="Script" path="res://addons/block_code/ui/picker/categories/variable_category/variable_category_display.gd" id="2_ggvi7"] 5 | [ext_resource type="PackedScene" uid="uid://t0eoc4ekvjr1" path="res://addons/block_code/ui/picker/categories/variable_category/create_variable_button.tscn" id="3_gjvnq"] 6 | 7 | [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_0m6vh"] 8 | 9 | [node name="VariableCategoryDisplay" instance=ExtResource("1_vermd")] 10 | script = ExtResource("2_ggvi7") 11 | 12 | [node name="BlocksContainer" parent="VBoxContainer" index="1"] 13 | visible = false 14 | 15 | [node name="HSeparator" type="HSeparator" parent="VBoxContainer" index="2"] 16 | unique_name_in_owner = true 17 | visible = false 18 | layout_mode = 2 19 | theme_override_constants/separation = 30 20 | theme_override_styles/separator = SubResource("StyleBoxEmpty_0m6vh") 21 | 22 | [node name="CreateVariableButton" parent="VBoxContainer" index="3" instance=ExtResource("3_gjvnq")] 23 | layout_mode = 2 24 | 25 | [connection signal="create_variable" from="VBoxContainer/CreateVariableButton" to="." method="_on_create_variable"] 26 | -------------------------------------------------------------------------------- /addons/block_code/ui/script_window/script_window.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Window 3 | 4 | var script_content: String = "" 5 | 6 | @onready var script_label: TextEdit = $Margin/VBox/ColorRect/Scroll/Margin/Code 7 | 8 | 9 | func _ready(): 10 | popup_centered() 11 | script_label.text = script_content.replace("\t", " ") 12 | 13 | 14 | func _on_copy_code_pressed(): 15 | DisplayServer.clipboard_set(script_content) 16 | -------------------------------------------------------------------------------- /addons/block_code/ui/title_bar/title_bar.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bm1183pm05p6a"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/ui/title_bar/title_bar.gd" id="1_hpvmt"] 4 | 5 | [node name="TitleBar" type="MarginContainer"] 6 | custom_minimum_size = Vector2(0, 40) 7 | offset_right = 1000.0 8 | offset_bottom = 40.0 9 | script = ExtResource("1_hpvmt") 10 | 11 | [node name="Panel" type="Panel" parent="."] 12 | layout_mode = 2 13 | 14 | [node name="HBoxContainer" type="HBoxContainer" parent="."] 15 | layout_mode = 2 16 | 17 | [node name="NodeOptionButton" type="OptionButton" parent="HBoxContainer"] 18 | unique_name_in_owner = true 19 | layout_mode = 2 20 | size_flags_horizontal = 3 21 | -------------------------------------------------------------------------------- /addons/block_code/ui/tooltip/tooltip.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | class_name Tooltip 3 | extends RichTextLabel 4 | ## Rich-text control for block tooltips that matches the built-in inspector's tooltips' font styles 5 | 6 | const Util = preload("res://addons/block_code/ui/util.gd") 7 | 8 | 9 | func override_font(font_name: StringName, editor_font_name: StringName) -> Font: 10 | var font = get_theme_font(editor_font_name, &"EditorFonts") 11 | add_theme_font_override(font_name, font) 12 | return font 13 | 14 | 15 | func override_fonts(): 16 | # Set fonts to match documentation tooltips in inspector 17 | override_font(&"normal_font", &"doc") 18 | override_font(&"mono_font", &"doc_source") 19 | override_font(&"bold_font", &"doc_bold") 20 | var italics = override_font(&"italics_font", &"doc_italic") 21 | 22 | # No doc_ style for bold italic; fake it by emboldening the italic style 23 | var bold_italics = FontVariation.new() 24 | bold_italics.set_base_font(italics) 25 | bold_italics.set_variation_embolden(1.2) 26 | add_theme_font_override(&"bold_italics_font", bold_italics) 27 | 28 | 29 | func _ready(): 30 | if not Util.node_is_part_of_edited_scene(self): 31 | override_fonts() 32 | -------------------------------------------------------------------------------- /addons/block_code/ui/tooltip/tooltip.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://bmxco03vqyq2t"] 2 | 3 | [ext_resource type="Script" path="res://addons/block_code/ui/tooltip/tooltip.gd" id="1_4ko6a"] 4 | 5 | [node name="Tooltip" type="RichTextLabel"] 6 | custom_minimum_size = Vector2(360, 48) 7 | anchors_preset = 15 8 | anchor_right = 1.0 9 | anchor_bottom = 1.0 10 | grow_horizontal = 2 11 | grow_vertical = 2 12 | bbcode_enabled = true 13 | fit_content = true 14 | script = ExtResource("1_4ko6a") 15 | -------------------------------------------------------------------------------- /addons/block_code/ui/util.gd: -------------------------------------------------------------------------------- 1 | extends Object 2 | 3 | 4 | ## Polyfill of Node.is_part_of_edited_scene(), available to GDScript in Godot 4.3+. 5 | static func node_is_part_of_edited_scene(node: Node) -> bool: 6 | if not Engine.is_editor_hint(): 7 | return false 8 | 9 | var tree := node.get_tree() 10 | if not tree or not tree.edited_scene_root: 11 | return false 12 | 13 | var edited_scene_parent := tree.edited_scene_root.get_parent() 14 | return edited_scene_parent and edited_scene_parent.is_ancestor_of(node) 15 | 16 | 17 | ## Get the path from [param reference] to [param node] within a scene. 18 | ## 19 | ## Returns the path from [param reference] to [param node] without referencing 20 | ## parent nodes. If [param node] is [param reference] or a child of it in the 21 | ## scene tree, a relative path is returned. If [param node] is an ancestor of 22 | ## [param reference] in the scene tree, an absolute path using [param 23 | ## path_root] is returned. 24 | ## [br] 25 | ## Both [param node] and [param reference] must be ancestors of [param 26 | ## path_root]. If [param path_root] is [constant null] 27 | ## [method EditorInterface.get_edited_scene_root().get_parent] is used. 28 | static func node_scene_path(node: Node, reference: Node, path_root: Node = null) -> NodePath: 29 | if path_root == null: 30 | path_root = EditorInterface.get_edited_scene_root().get_parent() 31 | 32 | if not path_root.is_ancestor_of(node): 33 | push_error("Node %s is not an ancestor of %s" % [path_root, node]) 34 | return NodePath() 35 | if not path_root.is_ancestor_of(reference): 36 | push_error("Node %s is not an ancestor of %s" % [path_root, reference]) 37 | return NodePath() 38 | 39 | if node.unique_name_in_owner: 40 | # With unique_name_in_owner, just use the % prefixed name. 41 | return NodePath("%%%s" % node.name) 42 | else: 43 | # The node is reference or a child of it. Use a relative path. 44 | return reference.get_path_to(node) 45 | -------------------------------------------------------------------------------- /export_presets.cfg: -------------------------------------------------------------------------------- 1 | [preset.0] 2 | 3 | name="Web" 4 | platform="Web" 5 | runnable=false 6 | advanced_options=false 7 | dedicated_server=false 8 | custom_features="" 9 | export_filter="all_resources" 10 | include_filter="" 11 | exclude_filter="" 12 | export_path="" 13 | encryption_include_filters="" 14 | encryption_exclude_filters="" 15 | encrypt_pck=false 16 | encrypt_directory=false 17 | script_export_mode=2 18 | 19 | [preset.0.options] 20 | 21 | custom_template/debug="" 22 | custom_template/release="" 23 | variant/extensions_support=false 24 | variant/thread_support=false 25 | vram_texture_compression/for_desktop=true 26 | vram_texture_compression/for_mobile=false 27 | html/export_icon=true 28 | html/custom_html_shell="" 29 | html/head_include="" 30 | html/canvas_resize_policy=2 31 | html/focus_canvas_on_start=true 32 | html/experimental_virtual_keyboard=false 33 | progressive_web_app/enabled=false 34 | progressive_web_app/ensure_cross_origin_isolation_headers=true 35 | progressive_web_app/offline_page="" 36 | progressive_web_app/display=1 37 | progressive_web_app/orientation=0 38 | progressive_web_app/icon_144x144="" 39 | progressive_web_app/icon_180x180="" 40 | progressive_web_app/icon_512x512="" 41 | progressive_web_app/background_color=Color(0, 0, 0, 1) 42 | -------------------------------------------------------------------------------- /game-02/README.md: -------------------------------------------------------------------------------- 1 | # Split-screen demo 2 | 3 | ## About 4 | 5 | This is a top-down game for 2 players. The goal is to find each other in a large 6 | maze. The main scene is showing the level in a split-screen implemented without 7 | any programming. 8 | 9 | ## Implementation 10 | 11 | The split-screen uses SubViewportContainer and Subviewport nodes with the level 12 | scene instantiated in each one. The level instances are set to "editable 13 | children" so a different camera can be attached to each one, using a 14 | RemoteTrasnsform2D node. It is a bit hacky and the game is runnig twice, but it 15 | does the job. 16 | 17 | A little intro narrative was done with AnimationPlayer. This shows potential to 18 | display dialogues when the player interacts with an object, for example. 19 | 20 | Footprints that slowly dissapear were added as hint. Implemented with particles. 21 | 22 | ## Limitations found 23 | 24 | The characters run the same animation in loop. Because we can't use the comparison block to check 25 | if the velocity is zero (can't compare Vector2, only integers). Or if it's heading left to switch to 26 | a "walk left" animation. So the assets were drawn to face the camera and have a bouncing animation 27 | that works in all cases. Initially I wanted the characters to have legs and different "idle" and 28 | "walk" animations. 29 | 30 | The particles for footprints are always being emited. So I made them of a solid color and always 31 | in the same place as workaround. Ideally there should be blocks for stopping / starting the emition 32 | if the character is moving or not. This would also require Vector2 comparison for the velocity. 33 | -------------------------------------------------------------------------------- /game-02/floor-tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-02/floor-tile.png -------------------------------------------------------------------------------- /game-02/floor-tile.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bmkupx658eth0" 6 | path="res://.godot/imported/floor-tile.png-10fa503a79b40fc1edfe08f95fe69815.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-02/floor-tile.png" 14 | dest_files=["res://.godot/imported/floor-tile.png-10fa503a79b40fc1edfe08f95fe69815.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-02/player.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-02/player.png -------------------------------------------------------------------------------- /game-02/player.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bq6eirt5xh8hn" 6 | path="res://.godot/imported/player.png-68af0d23ddb0dec01651709249e88bf8.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-02/player.png" 14 | dest_files=["res://.godot/imported/player.png-68af0d23ddb0dec01651709249e88bf8.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-02/split.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-02/split.png -------------------------------------------------------------------------------- /game-02/split.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://c6xa1rkfrh2s" 6 | path="res://.godot/imported/split.png-0d16db6fbfb1129ece67a0a330ca55a6.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-02/split.png" 14 | dest_files=["res://.godot/imported/split.png-0d16db6fbfb1129ece67a0a330ca55a6.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-02/step.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-02/step.png -------------------------------------------------------------------------------- /game-02/step.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://qlfcx8ix482v" 6 | path="res://.godot/imported/step.png-00dbcee028c18ca6b925d0aca0e4e791.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-02/step.png" 14 | dest_files=["res://.godot/imported/step.png-00dbcee028c18ca6b925d0aca0e4e791.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-02/tiles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-02/tiles.png -------------------------------------------------------------------------------- /game-02/tiles.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dxfr76nbmbvad" 6 | path="res://.godot/imported/tiles.png-f9a1b3f4f58ce60e609294b4e3cd0947.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-02/tiles.png" 14 | dest_files=["res://.godot/imported/tiles.png-f9a1b3f4f58ce60e609294b4e3cd0947.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-02/transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-02/transparent.png -------------------------------------------------------------------------------- /game-02/transparent.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cdumi6pka0m6b" 6 | path="res://.godot/imported/transparent.png-c5df62834288ea8a10501885edf3059c.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-02/transparent.png" 14 | dest_files=["res://.godot/imported/transparent.png-c5df62834288ea8a10501885edf3059c.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-03/README.md: -------------------------------------------------------------------------------- 1 | # Platformer demo 2 | 3 | ## About 4 | 5 | This is a platformer game. The goal is to stay in the level, keep alive. 6 | When the player collects enough coins and reaches the flag, then wins 7 | the game. 8 | 9 | ## Implementation 10 | 11 | The world is built with tilemap style. 12 | 13 | The player is implemented with SimpleCharacter node. So, using W, A, D to jump 14 | and move left & right. 15 | 16 | Check the player is on floor and velocity to play walk, or jump animation in the 17 | AnimationPlayer. 18 | 19 | The collected coins and the player's lives are implemented with SimpleScoring 20 | nodes. 21 | 22 | The player enters a coin to collect the coin. It increases coins' score and 23 | vanish the coin. When the player collects enough coins and enters the flag's 24 | area, shows "You Win!" label. 25 | 26 | The enemies walk back and forth by setting the enemy's terminal positions within 27 | AnimationPlayer's "move" animation and playing it automatically. 28 | 29 | The player has a HitArea at the foot. If any enemy enters into the HitArea, the 30 | enemy's vanish_enemy method will be invoked to vanish the enemy. 31 | 32 | The enemies define their HitArea, too. If the player enters into the HitArea, 33 | nodes in HUD group will invoke their own decrease_a_life method to decrease one 34 | life. 35 | 36 | When the player enters an enemy's HitArea or drops down into the Dangerzone, the 37 | lives' score decreases one. If there is no more life, shows "You Lose!" label. 38 | 39 | When the player stands on the floating platform (the player enters a thin area 40 | on top of the platform), it triggers shake platform animation and drops down. 41 | -------------------------------------------------------------------------------- /game-03/assets/background-layer-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-03/assets/background-layer-1.png -------------------------------------------------------------------------------- /game-03/assets/background-layer-1.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dw612tw7iymyb" 6 | path="res://.godot/imported/background-layer-1.png-a18f6481c90142207bfb6b3260f547ed.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-03/assets/background-layer-1.png" 14 | dest_files=["res://.godot/imported/background-layer-1.png-a18f6481c90142207bfb6b3260f547ed.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-03/assets/background-layer-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-03/assets/background-layer-2.png -------------------------------------------------------------------------------- /game-03/assets/background-layer-2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dne1wh5fsffy" 6 | path="res://.godot/imported/background-layer-2.png-2f1a1ec9f240f91dd44891f9fea5fa32.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-03/assets/background-layer-2.png" 14 | dest_files=["res://.godot/imported/background-layer-2.png-2f1a1ec9f240f91dd44891f9fea5fa32.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-03/assets/enemy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-03/assets/enemy.png -------------------------------------------------------------------------------- /game-03/assets/enemy.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dwhi5vmkbnyk4" 6 | path="res://.godot/imported/enemy.png-53f24e747da2df1ee643294d765210e9.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-03/assets/enemy.png" 14 | dest_files=["res://.godot/imported/enemy.png-53f24e747da2df1ee643294d765210e9.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-03/assets/flag.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-03/assets/flag.png -------------------------------------------------------------------------------- /game-03/assets/flag.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bwqhhtm1mdivu" 6 | path="res://.godot/imported/flag.png-a8e0c6c9f700a54542e85e8b1764768c.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-03/assets/flag.png" 14 | dest_files=["res://.godot/imported/flag.png-a8e0c6c9f700a54542e85e8b1764768c.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-03/assets/heart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-03/assets/heart.png -------------------------------------------------------------------------------- /game-03/assets/heart.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://d3um1i1lgu153" 6 | path="res://.godot/imported/heart.png-6aab58f2d08d4c39e702d2bd002ad9aa.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-03/assets/heart.png" 14 | dest_files=["res://.godot/imported/heart.png-6aab58f2d08d4c39e702d2bd002ad9aa.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-03/assets/items/crystal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-03/assets/items/crystal.png -------------------------------------------------------------------------------- /game-03/assets/items/crystal.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bjqboxowe07lw" 6 | path="res://.godot/imported/crystal.png-4574500fce423c571c263b40cf8cf30f.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-03/assets/items/crystal.png" 14 | dest_files=["res://.godot/imported/crystal.png-4574500fce423c571c263b40cf8cf30f.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-03/assets/player-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-03/assets/player-red.png -------------------------------------------------------------------------------- /game-03/assets/player-red.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://de3owpoc205t0" 6 | path="res://.godot/imported/player-red.png-924d1cf2db4f04a16da599448728a795.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-03/assets/player-red.png" 14 | dest_files=["res://.godot/imported/player-red.png-924d1cf2db4f04a16da599448728a795.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-03/assets/tiles-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-03/assets/tiles-a.png -------------------------------------------------------------------------------- /game-03/assets/tiles-a.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cnsfc4sy12ia" 6 | path="res://.godot/imported/tiles-a.png-3cd01df5a42bd6d37879e00964188f18.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-03/assets/tiles-a.png" 14 | dest_files=["res://.godot/imported/tiles-a.png-3cd01df5a42bd6d37879e00964188f18.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-03/components/flag/flag-spriteframes-green.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="SpriteFrames" load_steps=4 format=3 uid="uid://b3orjhfv6eeud"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://bwqhhtm1mdivu" path="res://game-03/assets/flag.png" id="1_v2slk"] 4 | 5 | [sub_resource type="AtlasTexture" id="AtlasTexture_7rj5q"] 6 | atlas = ExtResource("1_v2slk") 7 | region = Rect2(148, 0, 128, 128) 8 | 9 | [sub_resource type="AtlasTexture" id="AtlasTexture_wqhmt"] 10 | atlas = ExtResource("1_v2slk") 11 | region = Rect2(0, 0, 128, 128) 12 | 13 | [resource] 14 | animations = [{ 15 | "frames": [{ 16 | "duration": 1.0, 17 | "texture": SubResource("AtlasTexture_7rj5q") 18 | }], 19 | "loop": true, 20 | "name": &"down", 21 | "speed": 5.0 22 | }, { 23 | "frames": [{ 24 | "duration": 1.0, 25 | "texture": SubResource("AtlasTexture_wqhmt") 26 | }], 27 | "loop": true, 28 | "name": &"up", 29 | "speed": 5.0 30 | }] 31 | -------------------------------------------------------------------------------- /game-03/components/flag/flag-spriteframes-red.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="SpriteFrames" load_steps=4 format=3 uid="uid://bvs66x1xcm6k8"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://bwqhhtm1mdivu" path="res://game-03/assets/flag.png" id="1_agjbr"] 4 | 5 | [sub_resource type="AtlasTexture" id="AtlasTexture_aie4a"] 6 | atlas = ExtResource("1_agjbr") 7 | region = Rect2(444, 0, 128, 128) 8 | 9 | [sub_resource type="AtlasTexture" id="AtlasTexture_bkoi4"] 10 | atlas = ExtResource("1_agjbr") 11 | region = Rect2(296, 0, 128, 128) 12 | 13 | [resource] 14 | animations = [{ 15 | "frames": [{ 16 | "duration": 1.0, 17 | "texture": SubResource("AtlasTexture_aie4a") 18 | }], 19 | "loop": true, 20 | "name": &"down", 21 | "speed": 5.0 22 | }, { 23 | "frames": [{ 24 | "duration": 1.0, 25 | "texture": SubResource("AtlasTexture_bkoi4") 26 | }], 27 | "loop": true, 28 | "name": &"up", 29 | "speed": 5.0 30 | }] 31 | -------------------------------------------------------------------------------- /game-03/components/platform/platform.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://coq6d3u6wnvs2"] 2 | 3 | [ext_resource type="TileSet" uid="uid://bmkax0b814rmy" path="res://game-03/spaces/tileset-a.tres" id="1_3rwtc"] 4 | 5 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_o2vn2"] 6 | size = Vector2(256, 128) 7 | 8 | [node name="Platform" type="Node2D"] 9 | 10 | [node name="RigidBody2D" type="RigidBody2D" parent="."] 11 | unique_name_in_owner = true 12 | collision_layer = 4 13 | collision_mask = 0 14 | mass = 1000.0 15 | freeze = true 16 | 17 | [node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"] 18 | unique_name_in_owner = true 19 | position = Vector2(0, 64) 20 | shape = SubResource("RectangleShape2D_o2vn2") 21 | metadata/_edit_group_ = true 22 | 23 | [node name="TileMapLayer" type="TileMapLayer" parent="."] 24 | tile_map_data = PackedByteArray(0, 0, 255, 255, 0, 0, 0, 0, 10, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 1, 0, 0, 0) 25 | tile_set = ExtResource("1_3rwtc") 26 | 27 | [connection signal="body_entered" from="RigidBody2D" to="." method="_on_rigid_body_2d_body_entered"] 28 | -------------------------------------------------------------------------------- /game-03/icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://c5o2o6q7dn4ld" 6 | path="res://.godot/imported/icon.svg-796a1de91cc056ab44d7de84b0b5c015.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-03/icon.svg" 14 | dest_files=["res://.godot/imported/icon.svg-796a1de91cc056ab44d7de84b0b5c015.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /game-03/spaces/dangerzone.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://dthyncc3spfks"] 2 | 3 | [sub_resource type="WorldBoundaryShape2D" id="WorldBoundaryShape2D_rpdqf"] 4 | 5 | [node name="Dangerzone" type="Area2D"] 6 | 7 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 8 | unique_name_in_owner = true 9 | shape = SubResource("WorldBoundaryShape2D_rpdqf") 10 | -------------------------------------------------------------------------------- /game-03/spaces/tilemap.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://danlrmsfmsros"] 2 | 3 | [ext_resource type="TileSet" uid="uid://bmkax0b814rmy" path="res://game-03/spaces/tileset-a.tres" id="1_iow8m"] 4 | 5 | [node name="TileMap" type="TileMap"] 6 | tile_set = ExtResource("1_iow8m") 7 | format = 2 8 | -------------------------------------------------------------------------------- /game-04/Images/ball.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cj2s2swo2jwvh" 6 | path="res://.godot/imported/ball.svg-0dd8beac58224d712471da3ff8a840a5.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-04/Images/ball.svg" 14 | dest_files=["res://.godot/imported/ball.svg-0dd8beac58224d712471da3ff8a840a5.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /game-04/Images/goal.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 35 | 37 | 41 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /game-04/Images/goal.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://va6vbooexk" 6 | path="res://.godot/imported/goal.svg-1c46276dbbc4d5bc92f3c4dd30b09b05.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-04/Images/goal.svg" 14 | dest_files=["res://.godot/imported/goal.svg-1c46276dbbc4d5bc92f3c4dd30b09b05.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /game-04/Images/pin.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 35 | 37 | 42 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /game-04/Images/pin.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dv2q1pcf3cuek" 6 | path="res://.godot/imported/pin.svg-5d6128392fd5e486d745dea0a740bf1d.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-04/Images/pin.svg" 14 | dest_files=["res://.godot/imported/pin.svg-5d6128392fd5e486d745dea0a740bf1d.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /game-04/Images/wall.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 35 | 37 | 41 | 49 | 50 | 51 | -------------------------------------------------------------------------------- /game-04/Images/wall.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dmnyl2fkfvck4" 6 | path="res://.godot/imported/wall.svg-909322048e8973a4995e0cae50f3c9b4.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-04/Images/wall.svg" 14 | dest_files=["res://.godot/imported/wall.svg-909322048e8973a4995e0cae50f3c9b4.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /game-04/Sounds/Bump.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Bump.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Bump.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://b0u7rd1fbtpn6" 6 | path="res://.godot/imported/Bump.ogg-c4c10a7fc786170e291a5692625c338b.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Bump.ogg" 11 | dest_files=["res://.godot/imported/Bump.ogg-c4c10a7fc786170e291a5692625c338b.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/LICENSE.md: -------------------------------------------------------------------------------- 1 | Glass Jar Sounds by Cassidy James Blaede is marked with CC0 1.0 Universal. To view a copy of this license, visit https://creativecommons.org/publicdomain/zero/1.0/ 2 | -------------------------------------------------------------------------------- /game-04/Sounds/Muted 1.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Muted 1.flac -------------------------------------------------------------------------------- /game-04/Sounds/Muted 1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Muted 1.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Muted 1.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://bfwi8cs5olp04" 6 | path="res://.godot/imported/Muted 1.ogg-6ca03aa35088ab2e77b074706329966b.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Muted 1.ogg" 11 | dest_files=["res://.godot/imported/Muted 1.ogg-6ca03aa35088ab2e77b074706329966b.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Muted 2.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Muted 2.flac -------------------------------------------------------------------------------- /game-04/Sounds/Muted 2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Muted 2.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Muted 2.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://d22c2232ywmaj" 6 | path="res://.godot/imported/Muted 2.ogg-8e198bc826b708ee151b633e5cb3a3a5.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Muted 2.ogg" 11 | dest_files=["res://.godot/imported/Muted 2.ogg-8e198bc826b708ee151b633e5cb3a3a5.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Muted 3.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Muted 3.flac -------------------------------------------------------------------------------- /game-04/Sounds/Muted 3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Muted 3.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Muted 3.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://bdgk1artgilrd" 6 | path="res://.godot/imported/Muted 3.ogg-63f5735e1fecafa2b397c8c5d08ff41a.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Muted 3.ogg" 11 | dest_files=["res://.godot/imported/Muted 3.ogg-63f5735e1fecafa2b397c8c5d08ff41a.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Muted 4.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Muted 4.flac -------------------------------------------------------------------------------- /game-04/Sounds/Muted 4.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Muted 4.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Muted 4.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://cx2ae37ptmt4m" 6 | path="res://.godot/imported/Muted 4.ogg-da3762342ca34dc91964ad451bc693d3.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Muted 4.ogg" 11 | dest_files=["res://.godot/imported/Muted 4.ogg-da3762342ca34dc91964ad451bc693d3.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Muted 5.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Muted 5.flac -------------------------------------------------------------------------------- /game-04/Sounds/Muted 5.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Muted 5.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Muted 5.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://dbvtu6rdhpngn" 6 | path="res://.godot/imported/Muted 5.ogg-8c117b067a3efe6b8711ded2a75bda64.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Muted 5.ogg" 11 | dest_files=["res://.godot/imported/Muted 5.ogg-8c117b067a3efe6b8711ded2a75bda64.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 1.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rattle 1.flac -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rattle 1.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 1.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://dipb40ie5bwb3" 6 | path="res://.godot/imported/Rattle 1.ogg-56d590ed87f7fd3f7b47cb81328cd415.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Rattle 1.ogg" 11 | dest_files=["res://.godot/imported/Rattle 1.ogg-56d590ed87f7fd3f7b47cb81328cd415.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 2.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rattle 2.flac -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rattle 2.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 2.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://8m5j6ylmxpcm" 6 | path="res://.godot/imported/Rattle 2.ogg-69408094c9222efba8fba8d80a2f33e3.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Rattle 2.ogg" 11 | dest_files=["res://.godot/imported/Rattle 2.ogg-69408094c9222efba8fba8d80a2f33e3.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 3.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rattle 3.flac -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rattle 3.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 3.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://dp1r71i4x8kqg" 6 | path="res://.godot/imported/Rattle 3.ogg-2ed1df6e740c2f9520bcfcee21026552.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Rattle 3.ogg" 11 | dest_files=["res://.godot/imported/Rattle 3.ogg-2ed1df6e740c2f9520bcfcee21026552.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 4.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rattle 4.flac -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 4.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rattle 4.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Rattle 4.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://bonkbmmejhjf8" 6 | path="res://.godot/imported/Rattle 4.ogg-c7992c3f875ad681119e568647c605cd.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Rattle 4.ogg" 11 | dest_files=["res://.godot/imported/Rattle 4.ogg-c7992c3f875ad681119e568647c605cd.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Rim 1.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rim 1.flac -------------------------------------------------------------------------------- /game-04/Sounds/Rim 1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rim 1.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Rim 1.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://bwxfcoyujkm42" 6 | path="res://.godot/imported/Rim 1.ogg-8face72effad54e3a9758c4254e75112.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Rim 1.ogg" 11 | dest_files=["res://.godot/imported/Rim 1.ogg-8face72effad54e3a9758c4254e75112.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Rim 2.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rim 2.flac -------------------------------------------------------------------------------- /game-04/Sounds/Rim 2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rim 2.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Rim 2.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://cp8kern48k56r" 6 | path="res://.godot/imported/Rim 2.ogg-20bb2122ebe2142b0ba0ea1c941274ed.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Rim 2.ogg" 11 | dest_files=["res://.godot/imported/Rim 2.ogg-20bb2122ebe2142b0ba0ea1c941274ed.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Rim 3.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rim 3.flac -------------------------------------------------------------------------------- /game-04/Sounds/Rim 3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rim 3.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Rim 3.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://cud5i17opfnpt" 6 | path="res://.godot/imported/Rim 3.ogg-ea9b3910fdeca65ba2c6e627edd34c23.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Rim 3.ogg" 11 | dest_files=["res://.godot/imported/Rim 3.ogg-ea9b3910fdeca65ba2c6e627edd34c23.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Rim 4.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rim 4.flac -------------------------------------------------------------------------------- /game-04/Sounds/Rim 4.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Rim 4.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Rim 4.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://ie23s0vkcs0r" 6 | path="res://.godot/imported/Rim 4.ogg-c1494d1dab05e850e058624407ee44b5.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Rim 4.ogg" 11 | dest_files=["res://.godot/imported/Rim 4.ogg-c1494d1dab05e850e058624407ee44b5.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Side 1.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Side 1.flac -------------------------------------------------------------------------------- /game-04/Sounds/Side 1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Side 1.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Side 1.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://tesandvrwlmf" 6 | path="res://.godot/imported/Side 1.ogg-d73792b7e6cab52e092fc5d3ea040051.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Side 1.ogg" 11 | dest_files=["res://.godot/imported/Side 1.ogg-d73792b7e6cab52e092fc5d3ea040051.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Side 2.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Side 2.flac -------------------------------------------------------------------------------- /game-04/Sounds/Side 2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Side 2.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Side 2.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://vllaennawpnq" 6 | path="res://.godot/imported/Side 2.ogg-d5e889091dac0dd795d7fb5765173094.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Side 2.ogg" 11 | dest_files=["res://.godot/imported/Side 2.ogg-d5e889091dac0dd795d7fb5765173094.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Side 3.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Side 3.flac -------------------------------------------------------------------------------- /game-04/Sounds/Side 3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Side 3.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Side 3.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://b777fnsqtv1nb" 6 | path="res://.godot/imported/Side 3.ogg-3f5fe3f891599db4768dd8403b84a649.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Side 3.ogg" 11 | dest_files=["res://.godot/imported/Side 3.ogg-3f5fe3f891599db4768dd8403b84a649.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Side 4.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Side 4.flac -------------------------------------------------------------------------------- /game-04/Sounds/Side 4.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Side 4.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Side 4.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://dbiatjorr5x1a" 6 | path="res://.godot/imported/Side 4.ogg-6b02eddfb56c509ab92ea3972b0163cb.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Side 4.ogg" 11 | dest_files=["res://.godot/imported/Side 4.ogg-6b02eddfb56c509ab92ea3972b0163cb.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Wood 1.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 1.flac -------------------------------------------------------------------------------- /game-04/Sounds/Wood 1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 1.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Wood 1.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://buwdcc5h7pkiq" 6 | path="res://.godot/imported/Wood 1.ogg-231d19c0539ff05855c21a39ed4fc5ad.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Wood 1.ogg" 11 | dest_files=["res://.godot/imported/Wood 1.ogg-231d19c0539ff05855c21a39ed4fc5ad.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Wood 2.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 2.flac -------------------------------------------------------------------------------- /game-04/Sounds/Wood 2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 2.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Wood 2.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://d4a3chmtb6ct1" 6 | path="res://.godot/imported/Wood 2.ogg-8a2d3b6a2a4cbd366b7c89c933eb44f2.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Wood 2.ogg" 11 | dest_files=["res://.godot/imported/Wood 2.ogg-8a2d3b6a2a4cbd366b7c89c933eb44f2.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Wood 3.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 3.flac -------------------------------------------------------------------------------- /game-04/Sounds/Wood 3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 3.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Wood 3.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://d3h63d5gsec5q" 6 | path="res://.godot/imported/Wood 3.ogg-d1debdf2e2c324fd5254bbba7ae4da00.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Wood 3.ogg" 11 | dest_files=["res://.godot/imported/Wood 3.ogg-d1debdf2e2c324fd5254bbba7ae4da00.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Wood 4.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 4.flac -------------------------------------------------------------------------------- /game-04/Sounds/Wood 4.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 4.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Wood 4.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://d3s1xjfageai2" 6 | path="res://.godot/imported/Wood 4.ogg-a1005b80748ba3a29e0cd5c1dfbfbbdd.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Wood 4.ogg" 11 | dest_files=["res://.godot/imported/Wood 4.ogg-a1005b80748ba3a29e0cd5c1dfbfbbdd.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Wood 5.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 5.flac -------------------------------------------------------------------------------- /game-04/Sounds/Wood 5.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 5.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Wood 5.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://coak6lwjs3tfn" 6 | path="res://.godot/imported/Wood 5.ogg-ca8e7dfd12394963d7a316fcdc876aec.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Wood 5.ogg" 11 | dest_files=["res://.godot/imported/Wood 5.ogg-ca8e7dfd12394963d7a316fcdc876aec.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/Sounds/Wood 6.flac: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 6.flac -------------------------------------------------------------------------------- /game-04/Sounds/Wood 6.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-04/Sounds/Wood 6.ogg -------------------------------------------------------------------------------- /game-04/Sounds/Wood 6.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://chded5ri77h47" 6 | path="res://.godot/imported/Wood 6.ogg-ce1a45fdcba841cd5d8543c66c11f0c8.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-04/Sounds/Wood 6.ogg" 11 | dest_files=["res://.godot/imported/Wood 6.ogg-ce1a45fdcba841cd5d8543c66c11f0c8.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-04/ball.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=3 uid="uid://crjhuj7jjpqkg"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://cj2s2swo2jwvh" path="res://game-04/Images/ball.svg" id="1_56jee"] 4 | 5 | [sub_resource type="PhysicsMaterial" id="PhysicsMaterial_fg4es"] 6 | bounce = 0.67 7 | 8 | [sub_resource type="CircleShape2D" id="CircleShape2D_lvia1"] 9 | radius = 15.0 10 | 11 | [node name="Ball" type="RigidBody2D" groups=["Ball"]] 12 | physics_material_override = SubResource("PhysicsMaterial_fg4es") 13 | 14 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 15 | shape = SubResource("CircleShape2D_lvia1") 16 | 17 | [node name="Sprite2D" type="Sprite2D" parent="."] 18 | scale = Vector2(0.5, 0.5) 19 | texture = ExtResource("1_56jee") 20 | -------------------------------------------------------------------------------- /game-05/README.md: -------------------------------------------------------------------------------- 1 | # Spaceship demo 2 | 3 | ## About 4 | 5 | This is a top-down game featuring the "move like a spaceship" block in 6 | the SimpleCharacter node. It is a more complete game based on the 7 | knowledge gained in the previous demos. 8 | 9 | ## Implementation 10 | 11 | The inventory was done with boolean variables in the block 12 | coding. There are "has_blue_key" and a "has_blaster" in the block 13 | canvas for the ship. 14 | 15 | A couple mechanics have been implemented with basic collision 16 | detection of Area2D "on body entered/exited". For instance: 17 | - Camera zoom in and out when the player ship enter/leaves a specific 18 | zone. 19 | - Open door when the player ship gets near the door and has a key. 20 | - Change a flag like "has_blue_key" when the player ship grabs the 21 | blue key. Play an animation in that case too. 22 | - Present messages on screen. 23 | 24 | I was able to push the asteroids with the blasters by adding 25 | AnimatableBody2D nodes to them and then animating them. 26 | 27 | Aesthetics: Sprites with CanvasTextures (diffuse and normal map) are 28 | used to give a 3D look, while still being 2D. Adding PointLight2D and 29 | LightOccluder2D nodes complete the effect. Also a CanvasModulate node 30 | is used in the main scene to darken the level. 31 | 32 | ## Limitations found 33 | 34 | There is no current way of spawning objects. That's why the blasters 35 | are implemented as an animation and they are fixed to the player 36 | ship. Rotating the ship rotates the blasters which is not what I 37 | wanted. 38 | 39 | I wanted asteroids to have health and destroy with an animation, but 40 | the only option today is to use the "queue free" block on them. We 41 | need to fix the "call method in node" block to reference a node in a 42 | instantiated scene like this. 43 | -------------------------------------------------------------------------------- /game-05/asteroid-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/asteroid-normal.png -------------------------------------------------------------------------------- /game-05/asteroid-normal.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bp4cu4ttnw26s" 6 | path="res://.godot/imported/asteroid-normal.png-2954bf47f734d7779e1670d5289b32fc.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/asteroid-normal.png" 14 | dest_files=["res://.godot/imported/asteroid-normal.png-2954bf47f734d7779e1670d5289b32fc.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/asteroid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/asteroid.png -------------------------------------------------------------------------------- /game-05/asteroid.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ondtfeph0ncb" 6 | path="res://.godot/imported/asteroid.png-cdcbed49ce29ef6e9b7bf525dcd37b80.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/asteroid.png" 14 | dest_files=["res://.godot/imported/asteroid.png-cdcbed49ce29ef6e9b7bf525dcd37b80.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/ball.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/ball.png -------------------------------------------------------------------------------- /game-05/ball.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ckre7g8q0t1s1" 6 | path="res://.godot/imported/ball.png-4ba65025fbc7ce38bfa880052cfe4311.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/ball.png" 14 | dest_files=["res://.godot/imported/ball.png-4ba65025fbc7ce38bfa880052cfe4311.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/blue-key.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/blue-key.png -------------------------------------------------------------------------------- /game-05/blue-key.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://j3swxkx6wrsi" 6 | path="res://.godot/imported/blue-key.png-ae3b894cde3e3d111b7e9fe16fe5fc31.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/blue-key.png" 14 | dest_files=["res://.godot/imported/blue-key.png-ae3b894cde3e3d111b7e9fe16fe5fc31.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/floor-diff.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/floor-diff.jpg -------------------------------------------------------------------------------- /game-05/floor-diff.jpg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://wufuu5d0hsbj" 6 | path="res://.godot/imported/floor-diff.jpg-ea1964b6c99e6fd390816b9821796420.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/floor-diff.jpg" 14 | dest_files=["res://.godot/imported/floor-diff.jpg-ea1964b6c99e6fd390816b9821796420.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/floor-normal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/floor-normal.jpg -------------------------------------------------------------------------------- /game-05/floor-normal.jpg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://by2fusywh3mp8" 6 | path="res://.godot/imported/floor-normal.jpg-7d2e337649e2177ef6f467c9cff185eb.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/floor-normal.jpg" 14 | dest_files=["res://.godot/imported/floor-normal.jpg-7d2e337649e2177ef6f467c9cff185eb.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/floor-tile-2-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/floor-tile-2-normal.png -------------------------------------------------------------------------------- /game-05/floor-tile-2-normal.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dnhw82eanmupl" 6 | path="res://.godot/imported/floor-tile-2-normal.png-e639afd3c4070e885ec883626627679c.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/floor-tile-2-normal.png" 14 | dest_files=["res://.godot/imported/floor-tile-2-normal.png-e639afd3c4070e885ec883626627679c.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/floor-tile-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/floor-tile-2.png -------------------------------------------------------------------------------- /game-05/floor-tile-2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bq3a1v35hrw7q" 6 | path="res://.godot/imported/floor-tile-2.png-e613b2edb0d631c2b9bde372bd2aabd2.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/floor-tile-2.png" 14 | dest_files=["res://.godot/imported/floor-tile-2.png-e613b2edb0d631c2b9bde372bd2aabd2.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/font/Orbitron-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/font/Orbitron-Bold.ttf -------------------------------------------------------------------------------- /game-05/font/Orbitron-Bold.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://0a8howkelk56" 6 | path="res://.godot/imported/Orbitron-Bold.ttf-b2b0c9bf95ab071811949a116fc13d2a.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://game-05/font/Orbitron-Bold.ttf" 11 | dest_files=["res://.godot/imported/Orbitron-Bold.ttf-b2b0c9bf95ab071811949a116fc13d2a.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /game-05/level_part.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=5 format=3 uid="uid://bdug7kp8xxu2m"] 2 | 3 | [ext_resource type="Texture2D" uid="uid://dri83m6wlbu72" path="res://game-05/wall-tile.png" id="1_lftbc"] 4 | [ext_resource type="Texture2D" uid="uid://bumldixpo6cce" path="res://game-05/wall-tile-normal.png" id="2_d5t4c"] 5 | 6 | [sub_resource type="CanvasTexture" id="CanvasTexture_h7ee5"] 7 | diffuse_texture = ExtResource("1_lftbc") 8 | normal_texture = ExtResource("2_d5t4c") 9 | texture_repeat = 2 10 | 11 | [sub_resource type="OccluderPolygon2D" id="OccluderPolygon2D_pwpb6"] 12 | polygon = PackedVector2Array(-176, -110, -94, -104, -46, -51, 62, -59, 100, -101, 211, -104, 238, -49, 238, 98, 207, 132, -208, 125, -226, 90, -220, -69) 13 | 14 | [node name="LevelPart" type="StaticBody2D"] 15 | 16 | [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] 17 | position = Vector2(-0.400024, -15.5) 18 | polygon = PackedVector2Array(-181, -122, -87, -116, -43, -61, 56, -68, 92, -109, 218, -115, 249, -56, 250, 99, 220, 143, -217, 140, -242, 92, -233, -77) 19 | 20 | [node name="Polygon2D" type="Polygon2D" parent="."] 21 | position = Vector2(-0.399994, -15.5) 22 | texture = SubResource("CanvasTexture_h7ee5") 23 | polygon = PackedVector2Array(-181, -122, -87, -116, -43, -61, 56, -68, 92, -109, 218, -115, 249, -56, 250, 99, 220, 143, -217, 140, -242, 92, -233, -77) 24 | 25 | [node name="LightOccluder2D" type="LightOccluder2D" parent="."] 26 | position = Vector2(1, -12) 27 | occluder = SubResource("OccluderPolygon2D_pwpb6") 28 | -------------------------------------------------------------------------------- /game-05/message.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/message.png -------------------------------------------------------------------------------- /game-05/message.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://87d7l331isgd" 6 | path="res://.godot/imported/message.png-5e6ce017df32bb85ee86b9b670f23d4b.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/message.png" 14 | dest_files=["res://.godot/imported/message.png-5e6ce017df32bb85ee86b9b670f23d4b.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/player_fire.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://ce7ljhwh60jah"] 2 | 3 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_5gfue"] 4 | size = Vector2(30, 30) 5 | 6 | [node name="PlayerFire" type="AnimatableBody2D"] 7 | disable_mode = 2 8 | collision_layer = 2 9 | collision_mask = 4 10 | 11 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 12 | shape = SubResource("RectangleShape2D_5gfue") 13 | disabled = true 14 | -------------------------------------------------------------------------------- /game-05/ship-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/ship-normal.png -------------------------------------------------------------------------------- /game-05/ship-normal.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cfd4w4dctikv2" 6 | path="res://.godot/imported/ship-normal.png-29d82776e338bfdd07dd2cc37b6e7d40.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/ship-normal.png" 14 | dest_files=["res://.godot/imported/ship-normal.png-29d82776e338bfdd07dd2cc37b6e7d40.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/ship-shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/ship-shadow.png -------------------------------------------------------------------------------- /game-05/ship-shadow.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://db4ypm23310r8" 6 | path="res://.godot/imported/ship-shadow.png-cc441fed5c22f7b86e0a011e9dcede15.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/ship-shadow.png" 14 | dest_files=["res://.godot/imported/ship-shadow.png-cc441fed5c22f7b86e0a011e9dcede15.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/ship.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/ship.png -------------------------------------------------------------------------------- /game-05/ship.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://oolrngcqt3d0" 6 | path="res://.godot/imported/ship.png-2114bbb00a2be4ee9058b6f92d517f35.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/ship.png" 14 | dest_files=["res://.godot/imported/ship.png-2114bbb00a2be4ee9058b6f92d517f35.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/wall-tile-normal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/wall-tile-normal.png -------------------------------------------------------------------------------- /game-05/wall-tile-normal.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bumldixpo6cce" 6 | path="res://.godot/imported/wall-tile-normal.png-b438ed98c1b6c6302070a38085e2e3c9.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/wall-tile-normal.png" 14 | dest_files=["res://.godot/imported/wall-tile-normal.png-b438ed98c1b6c6302070a38085e2e3c9.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-05/wall-tile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-05/wall-tile.png -------------------------------------------------------------------------------- /game-05/wall-tile.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dri83m6wlbu72" 6 | path="res://.godot/imported/wall-tile.png-9a653e94f9e8b296d5f5122b1489ed18.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-05/wall-tile.png" 14 | dest_files=["res://.godot/imported/wall-tile.png-9a653e94f9e8b296d5f5122b1489ed18.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-06/README.md: -------------------------------------------------------------------------------- 1 | ## Credits 2 | 3 | ### Background music 4 | 5 | "Cyborg Ninja" Kevin MacLeod (incompetech.com) 6 | Licensed under Creative Commons: By Attribution 4.0 License 7 | http://creativecommons.org/licenses/by/4.0/ 8 | 9 | ### Background image 10 | 11 | Photo by Alan Labisch on Unsplash 12 | -------------------------------------------------------------------------------- /game-06/Sounds/Crash.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-06/Sounds/Crash.ogg -------------------------------------------------------------------------------- /game-06/Sounds/Crash.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://c1kbhp3fuf4i6" 6 | path="res://.godot/imported/Crash.ogg-b545df890eb43020a2ccc566a0e3fbc2.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-06/Sounds/Crash.ogg" 11 | dest_files=["res://.godot/imported/Crash.ogg-b545df890eb43020a2ccc566a0e3fbc2.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-06/Sounds/Cyborg Ninja.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-06/Sounds/Cyborg Ninja.mp3 -------------------------------------------------------------------------------- /game-06/Sounds/Cyborg Ninja.mp3.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="mp3" 4 | type="AudioStreamMP3" 5 | uid="uid://didvrv0ccn5f0" 6 | path="res://.godot/imported/Cyborg Ninja.mp3-c9b85cdd49aa0a4436bad73a19a2cc08.mp3str" 7 | 8 | [deps] 9 | 10 | source_file="res://game-06/Sounds/Cyborg Ninja.mp3" 11 | dest_files=["res://.godot/imported/Cyborg Ninja.mp3-c9b85cdd49aa0a4436bad73a19a2cc08.mp3str"] 12 | 13 | [params] 14 | 15 | loop=true 16 | loop_offset=0.0 17 | bpm=160.0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-06/Sounds/Ding.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-06/Sounds/Ding.ogg -------------------------------------------------------------------------------- /game-06/Sounds/Ding.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://djgw1a6o2p6o3" 6 | path="res://.godot/imported/Ding.ogg-146714875ace6ae22ab5e1a3218ce80e.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-06/Sounds/Ding.ogg" 11 | dest_files=["res://.godot/imported/Ding.ogg-146714875ace6ae22ab5e1a3218ce80e.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-06/Sounds/Engine.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-06/Sounds/Engine.ogg -------------------------------------------------------------------------------- /game-06/Sounds/Engine.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://b0i0qngq4bqm4" 6 | path="res://.godot/imported/Engine.ogg-06f41f0b0b71d18057175cc8af9ecdea.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-06/Sounds/Engine.ogg" 11 | dest_files=["res://.godot/imported/Engine.ogg-06f41f0b0b71d18057175cc8af9ecdea.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=true 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-06/Sounds/Pew.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-06/Sounds/Pew.ogg -------------------------------------------------------------------------------- /game-06/Sounds/Pew.ogg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="oggvorbisstr" 4 | type="AudioStreamOggVorbis" 5 | uid="uid://bm178yv4wvqdn" 6 | path="res://.godot/imported/Pew.ogg-a72a96a70dc979068c4ff4afab609504.oggvorbisstr" 7 | 8 | [deps] 9 | 10 | source_file="res://game-06/Sounds/Pew.ogg" 11 | dest_files=["res://.godot/imported/Pew.ogg-a72a96a70dc979068c4ff4afab609504.oggvorbisstr"] 12 | 13 | [params] 14 | 15 | loop=false 16 | loop_offset=0 17 | bpm=0 18 | beat_count=0 19 | bar_beats=4 20 | -------------------------------------------------------------------------------- /game-06/graphics/alan-labisch-NJpQ85eQJDE-unsplash.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-06/graphics/alan-labisch-NJpQ85eQJDE-unsplash.jpg -------------------------------------------------------------------------------- /game-06/graphics/alan-labisch-NJpQ85eQJDE-unsplash.jpg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dtref83nk0xpi" 6 | path="res://.godot/imported/alan-labisch-NJpQ85eQJDE-unsplash.jpg-0c0a6c14b6f1da4fa86e88c095069315.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-06/graphics/alan-labisch-NJpQ85eQJDE-unsplash.jpg" 14 | dest_files=["res://.godot/imported/alan-labisch-NJpQ85eQJDE-unsplash.jpg-0c0a6c14b6f1da4fa86e88c095069315.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-06/graphics/coin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-06/graphics/coin.png -------------------------------------------------------------------------------- /game-06/graphics/coin.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://c2kmueth1qo3q" 6 | path="res://.godot/imported/coin.png-a71eb5891d5cad3fd458d706b48f823e.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-06/graphics/coin.png" 14 | dest_files=["res://.godot/imported/coin.png-a71eb5891d5cad3fd458d706b48f823e.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-06/graphics/engine.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16 | 35 | 37 | 41 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /game-06/graphics/engine.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dqobtlpqjmouw" 6 | path="res://.godot/imported/engine.svg-4e9ee92161b1200e6237e71fcce39d15.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-06/graphics/engine.svg" 14 | dest_files=["res://.godot/imported/engine.svg-4e9ee92161b1200e6237e71fcce39d15.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /game-06/graphics/glow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-06/graphics/glow.png -------------------------------------------------------------------------------- /game-06/graphics/glow.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://djqy6w0vissy2" 6 | path="res://.godot/imported/glow.png-c66bfaf17a3799abb3d00a901dc31aa5.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-06/graphics/glow.png" 14 | dest_files=["res://.godot/imported/glow.png-c66bfaf17a3799abb3d00a901dc31aa5.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-06/graphics/graphics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-06/graphics/graphics.png -------------------------------------------------------------------------------- /game-06/graphics/graphics.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://blq8smrhpgtpj" 6 | path="res://.godot/imported/graphics.png-e3ef551ffe5df33bc183c5d8c9e26286.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-06/graphics/graphics.png" 14 | dest_files=["res://.godot/imported/graphics.png-e3ef551ffe5df33bc183c5d8c9e26286.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /game-06/graphics/obstacle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/endlessm/godot-block-coding-demos/114f69c21dbe9db4109165576fbe451d3753a153/game-06/graphics/obstacle.png -------------------------------------------------------------------------------- /game-06/graphics/obstacle.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://sfab1iwfjhyc" 6 | path="res://.godot/imported/obstacle.png-f3aca5dee9e1e8fb4914a4ba2cd4da0d.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://game-06/graphics/obstacle.png" 14 | dest_files=["res://.godot/imported/obstacle.png-f3aca5dee9e1e8fb4914a4ba2cd4da0d.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://drq1sur467qju" 6 | path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://icon.svg" 14 | dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /main-menu/global.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | const MAIN_SCENE_PATH: String = "res://main-menu/main.tscn" 4 | var current_scene: Node 5 | 6 | func _ready() -> void: 7 | var root = get_tree().root 8 | current_scene = root.get_child(root.get_child_count() - 1) 9 | 10 | 11 | func change_scene(path: String) -> void: 12 | call_deferred("_deferred_change_scene", path) 13 | 14 | 15 | func _deferred_change_scene(path: String) -> void: 16 | current_scene.free() 17 | var scene_resource: PackedScene = ResourceLoader.load(path) 18 | current_scene = scene_resource.instantiate() 19 | get_tree().root.add_child(current_scene) 20 | get_tree().current_scene = current_scene 21 | 22 | 23 | func _input(event: InputEvent) -> void: 24 | if event is not InputEventKey: 25 | return 26 | if event.physical_keycode != KEY_ESCAPE: 27 | return 28 | if not event.is_released(): 29 | return 30 | if not current_scene: 31 | return 32 | if current_scene.scene_file_path == MAIN_SCENE_PATH: 33 | return 34 | change_scene(MAIN_SCENE_PATH) 35 | -------------------------------------------------------------------------------- /main-menu/main.gd: -------------------------------------------------------------------------------- 1 | extends Control 2 | 3 | 4 | func _on_demo_02_button_pressed() -> void: 5 | Global.change_scene("res://game-02/main.tscn") 6 | 7 | 8 | func _on_demo_03_button_pressed() -> void: 9 | Global.change_scene("res://game-03/main.tscn") 10 | 11 | 12 | func _on_demo_04_button_pressed() -> void: 13 | Global.change_scene("res://game-04/main.tscn") 14 | 15 | 16 | func _on_demo_05_button_pressed() -> void: 17 | Global.change_scene("res://game-05/main.tscn") 18 | 19 | 20 | func _on_demo_06_button_pressed() -> void: 21 | Global.change_scene("res://game-06/main.tscn") 22 | --------------------------------------------------------------------------------