completely rewritten with godot 4 beta

This commit is contained in:
2022-11-25 00:31:57 +01:00
parent 42d11b7fb3
commit 2e97d1fec7
38 changed files with 375 additions and 632 deletions

2
.gitattributes vendored Normal file
View File

@@ -0,0 +1,2 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf

View File

@@ -1,32 +0,0 @@
name: "godot-ci export"
on: push
env:
GODOT_VERSION: mono-3.5.1
EXPORT_NAME: RPG-Test
jobs:
export-windows:
name: Windows Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:mono-3.5.1
steps:
- name: Checkout
uses: actions/checkout@v2
with:
lfs: true
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
- name: Windows Build
run: |
mkdir -v -p build/windows
cd $EXPORT_NAME
godot -v --export "Windows Desktop" ../build/windows/$EXPORT_NAME.exe
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: windows
path: build/windows

12
.gitignore vendored
View File

@@ -1,12 +1,4 @@
# Godot 4+ specific ignores
# Godot-specific ignores .godot/
.import/
export.cfg
export_presets.cfg
# Mono-specific ignores
.mono/
data_*/
#custom #custom
.vs/ .vs/

7
RPG Test gd4.csproj Normal file
View File

@@ -0,0 +1,7 @@
<Project Sdk="Godot.NET.Sdk/4.0.0-beta.4">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<EnableDynamicLoading>true</EnableDynamicLoading>
<RootNamespace>RPGTestgd4</RootNamespace>
</PropertyGroup>
</Project>

View File

@@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012 # Visual Studio 2012
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RPG-Test", "RPG-Test.csproj", "{03530658-9683-4AB8-AC24-354105EBCCDD}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RPG Test gd4", "RPG Test gd4.csproj", "{27424726-AFC3-4E97-8F36-EB38E4D2768D}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -9,11 +9,11 @@ Global
ExportRelease|Any CPU = ExportRelease|Any CPU ExportRelease|Any CPU = ExportRelease|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{03530658-9683-4AB8-AC24-354105EBCCDD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {27424726-AFC3-4E97-8F36-EB38E4D2768D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03530658-9683-4AB8-AC24-354105EBCCDD}.Debug|Any CPU.Build.0 = Debug|Any CPU {27424726-AFC3-4E97-8F36-EB38E4D2768D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03530658-9683-4AB8-AC24-354105EBCCDD}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU {27424726-AFC3-4E97-8F36-EB38E4D2768D}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU
{03530658-9683-4AB8-AC24-354105EBCCDD}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU {27424726-AFC3-4E97-8F36-EB38E4D2768D}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU
{03530658-9683-4AB8-AC24-354105EBCCDD}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU {27424726-AFC3-4E97-8F36-EB38E4D2768D}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU
{03530658-9683-4AB8-AC24-354105EBCCDD}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU {27424726-AFC3-4E97-8F36-EB38E4D2768D}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU
EndGlobalSection EndGlobalSection
EndGlobal EndGlobal

View File

@@ -1,6 +0,0 @@
<Project Sdk="Godot.NET.Sdk/3.3.0">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<RootNamespace>RPGTest</RootNamespace>
</PropertyGroup>
</Project>

View File

@@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/banana.png-b266be96b0846753aedd2f84866d07bc.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/banana.png"
dest_files=[ "res://.import/banana.png-b266be96b0846753aedd2f84866d07bc.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cupcake.png-93ee0951f9b3ff6300047d14826a099b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/cupcake.png"
dest_files=[ "res://.import/cupcake.png-93ee0951f9b3ff6300047d14826a099b.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ciidukjv5k6oa"
path="res://.godot/imported/banana.png-50380ed0796f86b0b05039176725d8eb.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/debug/banana.png"
dest_files=["res://.godot/imported/banana.png-50380ed0796f86b0b05039176725d8eb.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://p5ubildre2tg"
path="res://.godot/imported/cupcake.png-e641a112586eeca5f723ee6aa32d7f28.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/debug/cupcake.png"
dest_files=["res://.godot/imported/cupcake.png-e641a112586eeca5f723ee6aa32d7f28.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://diwxy1fl5m02y"
path="res://.godot/imported/debugitem_one64.png-7941e59d1b01f784439647bcf9741e7c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/debug/debugitem_one64.png"
dest_files=["res://.godot/imported/debugitem_one64.png-7941e59d1b01f784439647bcf9741e7c.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 148 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://drlpbd1b7lthg"
path="res://.godot/imported/test_background_tileset.png-a216d835e6ee8bee229573fc1a969d27.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/debug/test_background_tileset.png"
dest_files=["res://.godot/imported/test_background_tileset.png-a216d835e6ee8bee229573fc1a969d27.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View File

@@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/debugitem_one64.png-1ec80dd262e8a6ed96484253d42fdc95.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/debugitem_one64.png"
dest_files=[ "res://.import/debugitem_one64.png-1ec80dd262e8a6ed96484253d42fdc95.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/test_background_tileset.png-6a994978cefc6df9f5920903f59e7192.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/textures/test_background_tileset.png"
dest_files=[ "res://.import/test_background_tileset.png-6a994978cefc6df9f5920903f59e7192.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -1,7 +0,0 @@
[gd_resource type="Environment" load_steps=2 format=2]
[sub_resource type="ProceduralSky" id=1]
[resource]
background_mode = 2
background_sky = SubResource( 1 )

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

View File

@@ -1,35 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.png"
dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
flags/mipmaps=false
flags/anisotropic=false
flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

1
icon.svg Normal file
View File

@@ -0,0 +1 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><g transform="translate(32 32)"><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99z" fill="#363d52"/><path d="m-16-32c-8.86 0-16 7.13-16 15.99v95.98c0 8.86 7.13 15.99 16 15.99h96c8.86 0 16-7.13 16-15.99v-95.98c0-8.85-7.14-15.99-16-15.99zm0 4h96c6.64 0 12 5.35 12 11.99v95.98c0 6.64-5.35 11.99-12 11.99h-96c-6.64 0-12-5.35-12-11.99v-95.98c0-6.64 5.36-11.99 12-11.99z" fill-opacity=".4"/></g><g stroke-width="9.92746" transform="matrix(.10073078 0 0 .10073078 12.425923 2.256365)"><path d="m0 0s-.325 1.994-.515 1.976l-36.182-3.491c-2.879-.278-5.115-2.574-5.317-5.459l-.994-14.247-27.992-1.997-1.904 12.912c-.424 2.872-2.932 5.037-5.835 5.037h-38.188c-2.902 0-5.41-2.165-5.834-5.037l-1.905-12.912-27.992 1.997-.994 14.247c-.202 2.886-2.438 5.182-5.317 5.46l-36.2 3.49c-.187.018-.324-1.978-.511-1.978l-.049-7.83 30.658-4.944 1.004-14.374c.203-2.91 2.551-5.263 5.463-5.472l38.551-2.75c.146-.01.29-.016.434-.016 2.897 0 5.401 2.166 5.825 5.038l1.959 13.286h28.005l1.959-13.286c.423-2.871 2.93-5.037 5.831-5.037.142 0 .284.005.423.015l38.556 2.75c2.911.209 5.26 2.562 5.463 5.472l1.003 14.374 30.645 4.966z" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 919.24059 771.67186)"/><path d="m0 0v-47.514-6.035-5.492c.108-.001.216-.005.323-.015l36.196-3.49c1.896-.183 3.382-1.709 3.514-3.609l1.116-15.978 31.574-2.253 2.175 14.747c.282 1.912 1.922 3.329 3.856 3.329h38.188c1.933 0 3.573-1.417 3.855-3.329l2.175-14.747 31.575 2.253 1.115 15.978c.133 1.9 1.618 3.425 3.514 3.609l36.182 3.49c.107.01.214.014.322.015v4.711l.015.005v54.325c5.09692 6.4164715 9.92323 13.494208 13.621 19.449-5.651 9.62-12.575 18.217-19.976 26.182-6.864-3.455-13.531-7.369-19.828-11.534-3.151 3.132-6.7 5.694-10.186 8.372-3.425 2.751-7.285 4.768-10.946 7.118 1.09 8.117 1.629 16.108 1.846 24.448-9.446 4.754-19.519 7.906-29.708 10.17-4.068-6.837-7.788-14.241-11.028-21.479-3.842.642-7.702.88-11.567.926v.006c-.027 0-.052-.006-.075-.006-.024 0-.049.006-.073.006v-.006c-3.872-.046-7.729-.284-11.572-.926-3.238 7.238-6.956 14.642-11.03 21.479-10.184-2.264-20.258-5.416-29.703-10.17.216-8.34.755-16.331 1.848-24.448-3.668-2.35-7.523-4.367-10.949-7.118-3.481-2.678-7.036-5.24-10.188-8.372-6.297 4.165-12.962 8.079-19.828 11.534-7.401-7.965-14.321-16.562-19.974-26.182 4.4426579-6.973692 9.2079702-13.9828876 13.621-19.449z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 104.69892 525.90697)"/><path d="m0 0-1.121-16.063c-.135-1.936-1.675-3.477-3.611-3.616l-38.555-2.751c-.094-.007-.188-.01-.281-.01-1.916 0-3.569 1.406-3.852 3.33l-2.211 14.994h-31.459l-2.211-14.994c-.297-2.018-2.101-3.469-4.133-3.32l-38.555 2.751c-1.936.139-3.476 1.68-3.611 3.616l-1.121 16.063-32.547 3.138c.015-3.498.06-7.33.06-8.093 0-34.374 43.605-50.896 97.781-51.086h.066.067c54.176.19 97.766 16.712 97.766 51.086 0 .777.047 4.593.063 8.093z" fill="#478cbf" transform="matrix(4.162611 0 0 -4.162611 784.07144 817.24284)"/><path d="m0 0c0-12.052-9.765-21.815-21.813-21.815-12.042 0-21.81 9.763-21.81 21.815 0 12.044 9.768 21.802 21.81 21.802 12.048 0 21.813-9.758 21.813-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 389.21484 625.67104)"/><path d="m0 0c0-7.994-6.479-14.473-14.479-14.473-7.996 0-14.479 6.479-14.479 14.473s6.483 14.479 14.479 14.479c8 0 14.479-6.485 14.479-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 367.36686 631.05679)"/><path d="m0 0c-3.878 0-7.021 2.858-7.021 6.381v20.081c0 3.52 3.143 6.381 7.021 6.381s7.028-2.861 7.028-6.381v-20.081c0-3.523-3.15-6.381-7.028-6.381" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 511.99336 724.73954)"/><path d="m0 0c0-12.052 9.765-21.815 21.815-21.815 12.041 0 21.808 9.763 21.808 21.815 0 12.044-9.767 21.802-21.808 21.802-12.05 0-21.815-9.758-21.815-21.802" fill="#fff" transform="matrix(4.162611 0 0 -4.162611 634.78706 625.67104)"/><path d="m0 0c0-7.994 6.477-14.473 14.471-14.473 8.002 0 14.479 6.479 14.479 14.473s-6.477 14.479-14.479 14.479c-7.994 0-14.471-6.485-14.471-14.479" fill="#414042" transform="matrix(4.162611 0 0 -4.162611 656.64056 631.05679)"/></g></svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

37
icon.svg.import Normal file
View File

@@ -0,0 +1,37 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c31svbjao0smt"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/bptc_ldr=0
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false

View File

@@ -6,80 +6,42 @@
; [section] ; section goes between [] ; [section] ; section goes between []
; param=value ; assign values to parameters ; param=value ; assign values to parameters
config_version=4 config_version=5
[application] [application]
config/name="RPG-Test" config/name="RPG Test gd4"
run/main_scene="res://scenes/maps/main.tscn" run/main_scene="res://scenes/main.tscn"
boot_splash/show_image=false config/features=PackedStringArray("4.0", "C#", "Forward Plus")
boot_splash/bg_color=Color( 0.141176, 0.141176, 0.141176, 1 ) config/icon="res://icon.svg"
config/icon="res://icon.png"
[display] [dotnet]
window/size/height=640 project/assembly_name="RPG Test gd4"
window/stretch/aspect="keep"
[gui]
common/drop_mouse_on_gui_input_disabled=true
[input] [input]
fullscreen={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777254,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
move_left={ move_left={
"deadzone": 0.5, "deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":65,"physical_scancode":0,"unicode":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":65,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":-1.0,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":14,"pressure":0.0,"pressed":false,"script":null) ]
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777231,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
} }
move_right={ move_right={
"deadzone": 0.5, "deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":68,"physical_scancode":0,"unicode":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":68,"physical_keycode":0,"unicode":100,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":0,"axis_value":1.0,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":15,"pressure":0.0,"pressed":false,"script":null) ]
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777233,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
} }
move_up={ move_up={
"deadzone": 0.5, "deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":87,"physical_scancode":0,"unicode":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":87,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":-1.0,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":12,"pressure":0.0,"pressed":false,"script":null) ]
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777232,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
} }
move_down={ move_down={
"deadzone": 0.5, "deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":83,"physical_scancode":0,"unicode":0,"echo":false,"script":null) "events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":83,"physical_keycode":0,"unicode":0,"echo":false,"script":null)
, Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null) , Object(InputEventJoypadMotion,"resource_local_to_scene":false,"resource_name":"","device":0,"axis":1,"axis_value":1.0,"script":null)
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":0,"button_index":13,"pressure":0.0,"pressed":false,"script":null) ]
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
} }
debug={
"deadzone": 0.5,
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777246,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
]
}
[mono]
project/assembly_name="RPG-Test"
[physics]
common/enable_pause_aware_picking=true
[rendering]
2d/snapping/use_gpu_pixel_snap=true
environment/default_environment="res://default_env.tres"

View File

@@ -1,19 +0,0 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://assets/textures/debugitem_one64.png" type="Texture" id=1]
[sub_resource type="CircleShape2D" id=1]
radius = 31.0
[node name="debug_tile_one" type="Node2D"]
[node name="RigidBody2D" type="RigidBody2D" parent="."]
gravity_scale = 0.0
[node name="Sprite" type="Sprite" parent="RigidBody2D"]
texture = ExtResource( 1 )
centered = false
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
position = Vector2( 31, 34 )
shape = SubResource( 1 )

10
scenes/main.tscn Normal file
View File

@@ -0,0 +1,10 @@
[gd_scene load_steps=3 format=3 uid="uid://2867aayx0skw"]
[ext_resource type="PackedScene" uid="uid://d4any5ht61f31" path="res://scenes/player.tscn" id="1_p5d84"]
[ext_resource type="PackedScene" uid="uid://c2eoq4srb238n" path="res://scenes/worlds/first_world.tscn" id="2_x8nyb"]
[node name="Main" type="Node2D"]
[node name="first_world" parent="." instance=ExtResource("2_x8nyb")]
[node name="player" parent="." instance=ExtResource("1_p5d84")]

View File

@@ -1,16 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/maps/tilemaps/world.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/player.tscn" type="PackedScene" id=2]
[ext_resource path="res://src/main.cs" type="Script" id=3]
[node name="Main" type="Node2D"]
position = Vector2( 4, 0 )
scale = Vector2( 1, 1.00619 )
script = ExtResource( 3 )
[node name="World" parent="." instance=ExtResource( 1 )]
tile_data = PoolIntArray( -196612, 0, 0, -196611, 0, 1, -196610, 0, 1, -196609, 0, 1, -262144, 0, 1, -262143, 0, 1, -262142, 0, 1, -262141, 0, 2, -131076, 0, 65536, -131075, 0, 65537, -131074, 0, 131073, -131073, 0, 131073, -196608, 0, 131073, -196607, 0, 131073, -196606, 0, 65537, -196605, 0, 65538, -65540, 0, 65536, -65539, 0, 65538, -131070, 0, 65536, -131069, 0, 65538, -4, 0, 65536, -3, 0, 65537, -2, 0, 1, -1, 0, 1, -65536, 0, 1, -65535, 0, 1, -65534, 0, 65537, -65533, 0, 65538, 65532, 0, 65536, 65533, 0, 65537, 65534, 0, 65537, 65535, 0, 65537, 0, 0, 65537, 1, 0, 65537, 2, 0, 65537, 3, 0, 65538, 131068, 0, 65536, 131069, 0, 65537, 131070, 0, 65537, 131071, 0, 65537, 65536, 0, 65537, 65537, 0, 65537, 65538, 0, 65537, 65539, 0, 65538, 196604, 0, 131072, 196605, 0, 131073, 196606, 0, 131073, 196607, 0, 131073, 131072, 0, 131073, 131073, 0, 131073, 131074, 0, 131073, 131075, 0, 131074 )
[node name="Player" parent="." instance=ExtResource( 2 )]
speed = 600

View File

@@ -1,19 +0,0 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://tilesets/Background.tres" type="TileSet" id=1]
[ext_resource path="res://tilesets/foreground_test.tres" type="TileSet" id=2]
[ext_resource path="res://src/tilemap_foreground.cs" type="Script" id=3]
[node name="World" type="TileMap"]
tile_set = ExtResource( 1 )
cell_size = Vector2( 512, 512 )
cell_quadrant_size = 128
format = 1
tile_data = PoolIntArray( -196612, 0, 0, -196611, 0, 1, -196610, 0, 1, -196609, 0, 1, -262144, 0, 1, -262143, 0, 1, -262142, 0, 1, -262141, 0, 2, -131076, 0, 65536, -131075, 0, 65537, -131074, 0, 131073, -131073, 0, 131073, -196608, 0, 131073, -196607, 0, 131073, -196606, 0, 65537, -196605, 0, 65538, -65540, 0, 65536, -65539, 0, 65538, -131070, 0, 65536, -131069, 0, 65538, -4, 0, 65536, -3, 0, 65537, -2, 0, 1, -1, 0, 1, -65536, 536870912, 1, -65535, 0, 1, -65534, 0, 65537, -65533, 0, 65538, 65532, 0, 65536, 65533, 0, 65537, 65534, 0, 65537, 65535, 0, 65537, 0, 0, 65537, 1, 0, 65537, 2, 0, 65537, 3, 0, 65538, 131068, 0, 65536, 131069, 0, 65537, 131070, 0, 65537, 131071, 0, 65537, 65536, 0, 65537, 65537, 0, 65537, 65538, 0, 65537, 65539, 0, 65538, 196604, 0, 131072, 196605, 0, 131073, 196606, 0, 131073, 196607, 0, 131073, 131072, 0, 131073, 131073, 0, 131073, 131074, 0, 131073, 131075, 0, 131074 )
[node name="Foreground" type="TileMap" parent="."]
tile_set = ExtResource( 2 )
format = 1
tile_data = PoolIntArray( -1900525, 1, 0, -1769494, 0, 0, -1769493, 0, 0, -1834990, 1, 0, -1834989, 1, 0, -1834986, 1, 0, -1834980, 1, 0, -1703959, 0, 0, -1703958, 0, 0, -1703957, 0, 0, -1703956, 0, 0, -1769454, 1, 0, -1769453, 1, 0, -1769452, 1, 0, -1769450, 1, 0, -1638426, 0, 0, -1638425, 0, 0, -1638424, 0, 0, -1638423, 0, 0, -1638420, 0, 0, -1703919, 1, 0, -1703918, 1, 0, -1703916, 1, 0, -1703915, 1, 0, -1703914, 1, 0, -1703909, 1, 0, -1572891, 0, 0, -1572890, 0, 0, -1572888, 0, 0, -1572884, 0, 0, -1638379, 1, 0, -1638373, 1, 0, -1507355, 0, 0, -1507349, 0, 0, -1507348, 0, 0, -1572843, 1, 0, -1572838, 1, 0, -1572837, 1, 0, -1441819, 0, 0, -1441814, 0, 0, -1441813, 0, 0, -1507302, 1, 0, -1376283, 0, 0, -1376282, 0, 0, -1376278, 0, 0, -1441789, 1, 0, -1441788, 1, 0, -1441787, 1, 0, -1441786, 1, 0, -1441785, 1, 0, -1441784, 1, 0, -1310746, 0, 0, -1310745, 0, 0, -1310743, 0, 0, -1310742, 0, 0, -1376251, 1, 0, -1376250, 1, 0, -1376249, 1, 0, -1245209, 0, 0, -1245208, 0, 0, -1245207, 0, 0, -1310715, 1, 0, -1310714, 1, 0, -1245179, 1, 0, -458775, 0, 0, -393239, 0, 0, -393235, 0, 0, -327708, 0, 0, -327707, 0, 0, -327700, 0, 0, -327699, 0, 0, -262168, 0, 0, -262167, 0, 0, -262165, 0, 0, -262164, 0, 0, -196633, 0, 0, -196632, 0, 0, -196631, 0, 0, -196615, 1, 0, -196614, 1, 0, -196611, 1, 0, -196610, 1, 0, -131097, 0, 0, -131096, 0, 0, -131095, 0, 0, -131094, 0, 0, -131079, 1, 0, -131078, 1, 0, -131075, 1, 0, -131074, 1, 0, -196595, 0, 0, -196586, 0, 0, -65561, 0, 0, -65560, 0, 0, -65559, 0, 0, -65558, 0, 0, -131059, 0, 0, -131056, 0, 0, -131055, 0, 0, -131050, 0, 0, -29, 0, 0, -28, 0, 0, -27, 0, 0, -20, 0, 0, -8, 1, 0, -1, 1, 0, -65524, 0, 0, -65520, 0, 0, 65507, 0, 0, 65511, 0, 0, 65516, 0, 0, 65517, 0, 0, 65528, 1, 0, 65529, 1, 0, 65534, 1, 0, 65535, 1, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 21, 0, 0, 131047, 0, 0, 131048, 0, 0, 131053, 0, 0, 131065, 1, 0, 131066, 1, 0, 131067, 1, 0, 131068, 1, 0, 131069, 1, 0, 131070, 1, 0, 65547, 0, 0, 65548, 0, 0, 65550, 0, 0, 65551, 0, 0, 65557, 0, 0, 131083, 0, 0, 131085, 0, 0, 131092, 0, 0, 262141, 1, 0, 262142, 1, 0, 262143, 1, 0, 196608, 1, 0, 196609, 1, 0, 196610, 1, 0, 196627, 0, 0, 196628, 0, 0, 327676, 1, 0, 327677, 1, 0, 327678, 0, 0, 327679, 0, 0, 262144, 0, 0, 262145, 0, 0, 262146, 1, 0, 262147, 1, 0, 393193, 0, 0, 393194, 0, 0, 393212, 1, 0, 393213, 1, 0, 393214, 0, 0, 327680, 0, 0, 327681, 0, 0, 327682, 0, 0, 327683, 1, 0, 327684, 1, 0, 458729, 0, 0, 458730, 0, 0, 458734, 0, 0, 458735, 0, 0, 458736, 0, 0, 458749, 1, 0, 458750, 0, 0, 458751, 0, 0, 393216, 0, 0, 393217, 0, 0, 393218, 0, 0, 393220, 1, 0, 524265, 0, 0, 524266, 0, 0, 524269, 0, 0, 524270, 0, 0, 524271, 0, 0, 524272, 0, 0, 524273, 0, 0, 524285, 1, 0, 524286, 0, 0, 524287, 1, 0, 458752, 1, 0, 458753, 0, 0, 458754, 0, 0, 458756, 1, 0, 589805, 0, 0, 589806, 0, 0, 589807, 0, 0, 589808, 0, 0, 589809, 0, 0, 589821, 1, 0, 589822, 0, 0, 589823, 1, 0, 524288, 1, 0, 524289, 0, 0, 524292, 1, 0, 655342, 0, 0, 655343, 0, 0, 655344, 0, 0, 655357, 1, 0, 655358, 1, 0, 655359, 1, 0, 589824, 1, 0, 589825, 1, 0, 589827, 1, 0, 655360, 1, 0, 655361, 1, 0, 655362, 1, 0, 655363, 1, 0, 786408, 0, 0, 851943, 0, 0, 851944, 0, 0, 851951, 0, 0, 851952, 0, 0, 851962, 1, 0, 917478, 0, 0, 917479, 0, 0, 917480, 0, 0, 917486, 0, 0, 917487, 0, 0, 917488, 0, 0, 917500, 1, 0, 851983, 0, 0, 851984, 0, 0, 851985, 0, 0, 851986, 0, 0, 851987, 0, 0, 851988, 0, 0, 851989, 0, 0, 851990, 0, 0, 851991, 0, 0, 851992, 0, 0, 851993, 0, 0, 851994, 0, 0, 983015, 0, 0, 983016, 0, 0, 983017, 0, 0, 983018, 0, 0, 983019, 0, 0, 983020, 0, 0, 983021, 0, 0, 983022, 0, 0, 917518, 0, 0, 917521, 0, 0, 917522, 0, 0, 917524, 0, 0, 917525, 0, 0, 917527, 0, 0, 917528, 0, 0, 917530, 0, 0, 1048552, 0, 0, 1048553, 0, 0, 1048554, 0, 0, 1048555, 0, 0, 983047, 0, 0, 983048, 0, 0, 983049, 0, 0, 983050, 0, 0, 983051, 0, 0, 983052, 0, 0, 983053, 0, 0, 983054, 0, 0, 983055, 0, 0, 983056, 0, 0, 983057, 0, 0, 983058, 0, 0, 983060, 0, 0, 983061, 0, 0, 983063, 0, 0, 983064, 0, 0, 983065, 0, 0, 983066, 0, 0, 983067, 0, 0, 1048582, 0, 0, 1048583, 0, 0, 1048584, 0, 0, 1048585, 0, 0, 1048586, 0, 0, 1048587, 0, 0, 1048588, 0, 0, 1048590, 0, 0, 1048592, 0, 0, 1048593, 0, 0, 1048594, 0, 0, 1048599, 0, 0, 1048600, 0, 0, 1048601, 0, 0, 1048602, 0, 0, 1048603, 0, 0, 1114117, 0, 0, 1114118, 0, 0, 1114120, 0, 0, 1114121, 0, 0, 1114122, 0, 0, 1114123, 0, 0, 1114124, 0, 0, 1114126, 0, 0, 1114127, 0, 0, 1179656, 0, 0, 1179657, 0, 0, 1179658, 0, 0, 1179659, 0, 0, 1179660, 0, 0 )
script = ExtResource( 3 )
array2D = PoolIntArray( )

View File

@@ -1,28 +1,28 @@
[gd_scene load_steps=5 format=2] [gd_scene load_steps=5 format=3 uid="uid://d4any5ht61f31"]
[ext_resource path="res://assets/textures/banana.png" type="Texture" id=1] [ext_resource type="Script" path="res://src/player.cs" id="1_qehox"]
[ext_resource path="res://src/player.cs" type="Script" id=2] [ext_resource type="Texture2D" uid="uid://ciidukjv5k6oa" path="res://assets/textures/debug/banana.png" id="2_1l1co"]
[sub_resource type="SpriteFrames" id=1] [sub_resource type="SpriteFrames" id="SpriteFrames_2x1cy"]
animations = [ { animations = [{
"frames": [ ExtResource( 1 ) ], "frames": [ExtResource("2_1l1co")],
"loop": true, "loop": true,
"name": "default", "name": &"default",
"speed": 5.0 "speed": 5.0
} ] }]
[sub_resource type="RectangleShape2D" id=2] [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_38v5o"]
extents = Vector2( 19, 29 ) radius = 21.0
height = 66.0
[node name="Player" type="KinematicBody2D"] [node name="player" type="CharacterBody2D"]
script = ExtResource( 2 ) script = ExtResource("1_qehox")
[node name="AnimatedSprite" type="AnimatedSprite" parent="."] [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
frames = SubResource( 1 ) frames = SubResource("SpriteFrames_2x1cy")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."] [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2( 0, 2 ) shape = SubResource("CapsuleShape2D_38v5o")
shape = SubResource( 2 )
[node name="Camera2D" type="Camera2D" parent="."] [node name="Camera2D" type="Camera2D" parent="."]
current = true current = true

View File

@@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=3 uid="uid://dk7fqaw2b3w1k"]
[ext_resource type="Texture2D" uid="uid://diwxy1fl5m02y" path="res://assets/textures/debug/debugitem_one64.png" id="1_2m632"]
[sub_resource type="CircleShape2D" id="CircleShape2D_2d5dy"]
radius = 30.8058
[node name="first_debug_tile" type="RigidBody2D"]
gravity_scale = 0.0
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("1_2m632")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(-1, 4)
shape = SubResource("CircleShape2D_2d5dy")

View File

@@ -0,0 +1,18 @@
[gd_scene load_steps=3 format=3 uid="uid://c2eoq4srb238n"]
[ext_resource type="TileSet" uid="uid://bduttqwwbt6lq" path="res://tiilesets/main_background.tres" id="1_71wsi"]
[ext_resource type="TileSet" uid="uid://txl24cadn8t4" path="res://tiilesets/main_foreground.tres" id="2_v3ju2"]
[node name="first_world" type="Node2D"]
[node name="background" type="TileMap" parent="."]
tile_set = ExtResource("1_71wsi")
format = 2
layer_0/tile_data = PackedInt32Array(-65535, 65536, 1, -131071, 65536, 0, -65536, 65536, 1, -131072, 65536, 0, -1, 65536, 1, -65537, 65536, 0, 3, 131072, 2, -65533, 131072, 1, -131069, 131072, 0, 2, 65536, 2, -65534, 65536, 1, -131070, 65536, 0, 1, 65536, 2, 0, 65536, 2, 65535, 65536, 2, 65534, 0, 2, -2, 0, 1, -65538, 0, 0)
[node name="foreground" type="TileMap" parent="."]
tile_set = ExtResource("2_v3ju2")
cell_quadrant_size = 64
format = 2
layer_0/z_index = 1
layer_0/tile_data = PackedInt32Array(65535, 0, 0, 0, 0, 0, 1, 0, 0, 65534, 0, 0, 65533, 0, 0, -3, 0, 0, -2, 0, 0, -1, 0, 0, -65536, 0, 0, -65535, 0, 0)

View File

@@ -1,19 +0,0 @@
using Godot;
using System;
public class main : Node2D
{
public override void _Ready()
{
}
public override void _Process(float delta)
{
if (Input.IsActionJustReleased("fullscreen"))
{
OS.WindowFullscreen = !OS.WindowFullscreen;
}
}
}

View File

@@ -1,12 +1,17 @@
using Godot; using Godot;
using System; using System;
public partial class player : CharacterBody2D
public class player : KinematicBody2D
{ {
[Export] [Export]
public int speed = 400; public int speed = 400;
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
public override void _PhysicsProcess(float delta) }
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _PhysicsProcess(double delta)
{ {
MoveAndCollide(new Vector2 MoveAndCollide(new Vector2
( (
@@ -15,31 +20,7 @@ public class player : KinematicBody2D
Input.GetActionStrength("move_down") Input.GetActionStrength("move_down")
- Input.GetActionStrength("move_up") - Input.GetActionStrength("move_up")
).LimitLength(1) ).LimitLength(1)
* speed * delta * speed * (float)delta
); );
} }
public override void _Process(float delta)
{
//debug the grid
int currentCellID = 1;
var tilemap = GetNode<TileMap>("/root/Main/World/Foreground");
Vector2 coordinates = tilemap.WorldToMap(Position);
if (Input.IsActionJustReleased("debug"))
{
GD.Print("All Number 1 tiles: " + tilemap.GetUsedCellsById(1));
GD.Print("Player coordinate: " + coordinates);
}
if (Input.IsKeyPressed((int)KeyList.F1))
{
tilemap.SetCell((int)coordinates.x, (int)coordinates.y, -1);
}
if (Input.IsKeyPressed((int)KeyList.F2))
{
if(tilemap.GetCell((int)coordinates.x, (int)coordinates.y) == -1)
{
tilemap.SetCell((int)coordinates.x, (int)coordinates.y, currentCellID); //place offset coordinates += offset = build coordinates
}
}
}
} }

View File

@@ -1,27 +0,0 @@
using Godot;
using System;
using System.Linq;
public class tilemap_foreground : TileMap
{
public override void _Process(float delta)
{
ReplaceStaticTiles(1, "debug_tile_one");
}
public void ReplaceStaticTiles(int CellID, string sceneName)
{
Vector2[] allCells = GetUsedCellsById(CellID).OfType<Vector2>().ToArray();
for(int i = 0; i < allCells.Length; i++)
{
GD.Print(allCells[i]);
SetCell((int)allCells[i].x, (int)allCells[i].y, -1);
var scene = GD.Load<PackedScene>("res://scenes/interactable_tiles/" + sceneName + ".tscn");
var instance = scene.Instance();
AddChild(instance);
var node = GetNode<Node2D>(instance.GetPath());
node.Position = allCells[i] * CellSize; //node has to be Node2D and can't be centered
GD.Print(node);
}
}
}

View File

@@ -0,0 +1,81 @@
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://bduttqwwbt6lq"]
[ext_resource type="Texture2D" uid="uid://drlpbd1b7lthg" path="res://assets/textures/debug/test_background_tileset.png" id="1_l8p16"]
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_mfja2"]
texture = ExtResource("1_l8p16")
texture_region_size = Vector2i(512, 512)
0:0/0 = 0
0:0/0/terrain_set = 0
0:0/0/terrain = 0
0:0/0/terrains_peering_bit/right_side = 0
0:0/0/terrains_peering_bit/bottom_right_corner = 0
0:0/0/terrains_peering_bit/bottom_side = 0
1:0/0 = 0
1:0/0/terrain_set = 0
1:0/0/terrain = 0
1:0/0/terrains_peering_bit/right_side = 0
1:0/0/terrains_peering_bit/bottom_right_corner = 0
1:0/0/terrains_peering_bit/bottom_side = 0
1:0/0/terrains_peering_bit/bottom_left_corner = 0
1:0/0/terrains_peering_bit/left_side = 0
2:0/0 = 0
2:0/0/terrain_set = 0
2:0/0/terrain = 0
2:0/0/terrains_peering_bit/bottom_side = 0
2:0/0/terrains_peering_bit/bottom_left_corner = 0
2:0/0/terrains_peering_bit/left_side = 0
0:1/0 = 0
0:1/0/terrain_set = 0
0:1/0/terrain = 0
0:1/0/terrains_peering_bit/right_side = 0
0:1/0/terrains_peering_bit/bottom_right_corner = 0
0:1/0/terrains_peering_bit/bottom_side = 0
0:1/0/terrains_peering_bit/top_side = 0
0:1/0/terrains_peering_bit/top_right_corner = 0
1:1/0 = 0
1:1/0/terrain_set = 0
1:1/0/terrain = 0
1:1/0/terrains_peering_bit/right_side = 0
1:1/0/terrains_peering_bit/bottom_right_corner = 0
1:1/0/terrains_peering_bit/bottom_side = 0
1:1/0/terrains_peering_bit/bottom_left_corner = 0
1:1/0/terrains_peering_bit/left_side = 0
1:1/0/terrains_peering_bit/top_left_corner = 0
1:1/0/terrains_peering_bit/top_side = 0
1:1/0/terrains_peering_bit/top_right_corner = 0
2:1/0 = 0
2:1/0/terrain_set = 0
2:1/0/terrain = 0
2:1/0/terrains_peering_bit/bottom_side = 0
2:1/0/terrains_peering_bit/bottom_left_corner = 0
2:1/0/terrains_peering_bit/left_side = 0
2:1/0/terrains_peering_bit/top_left_corner = 0
2:1/0/terrains_peering_bit/top_side = 0
0:2/0 = 0
0:2/0/terrain_set = 0
0:2/0/terrain = 0
0:2/0/terrains_peering_bit/right_side = 0
0:2/0/terrains_peering_bit/top_side = 0
0:2/0/terrains_peering_bit/top_right_corner = 0
1:2/0 = 0
1:2/0/terrain_set = 0
1:2/0/terrain = 0
1:2/0/terrains_peering_bit/right_side = 0
1:2/0/terrains_peering_bit/left_side = 0
1:2/0/terrains_peering_bit/top_left_corner = 0
1:2/0/terrains_peering_bit/top_side = 0
1:2/0/terrains_peering_bit/top_right_corner = 0
2:2/0 = 0
2:2/0/terrain_set = 0
2:2/0/terrain = 0
2:2/0/terrains_peering_bit/left_side = 0
2:2/0/terrains_peering_bit/top_left_corner = 0
2:2/0/terrains_peering_bit/top_side = 0
[resource]
tile_size = Vector2i(512, 512)
terrain_set_0/mode = 0
terrain_set_0/terrain_0/name = "Grass"
terrain_set_0/terrain_0/color = Color(0, 0.509804, 0, 1)
sources/0 = SubResource("TileSetAtlasSource_mfja2")

View File

@@ -0,0 +1,11 @@
[gd_resource type="TileSet" load_steps=3 format=3 uid="uid://txl24cadn8t4"]
[ext_resource type="PackedScene" uid="uid://dk7fqaw2b3w1k" path="res://scenes/tiles/first_debug_tile.tscn" id="1_uxmn6"]
[sub_resource type="TileSetScenesCollectionSource" id="TileSetScenesCollectionSource_h5u31"]
resource_name = "test"
scenes/0/scene = ExtResource("1_uxmn6")
[resource]
tile_size = Vector2i(64, 64)
sources/0 = SubResource("TileSetScenesCollectionSource_h5u31")

View File

@@ -1,137 +0,0 @@
[gd_resource type="TileSet" load_steps=14 format=2]
[ext_resource path="res://assets/textures/test_background_tileset.png" type="Texture" id=1]
[sub_resource type="ConvexPolygonShape2D" id=1]
points = PoolVector2Array( 512, 512, 448, 512, 448, 0, 512, 0 )
[sub_resource type="ConvexPolygonShape2D" id=3]
points = PoolVector2Array( 512, 64, 0, 64, 0, 0, 512, 0 )
[sub_resource type="ConvexPolygonShape2D" id=4]
points = PoolVector2Array( 512, 64, 0, 64, 0, 0, 512, 0 )
[sub_resource type="ConvexPolygonShape2D" id=6]
points = PoolVector2Array( 0, 0, 64, 0, 64, 512, 0, 512 )
[sub_resource type="ConvexPolygonShape2D" id=7]
points = PoolVector2Array( 64, 512, 0, 512, 0, 0, 64, 0 )
[sub_resource type="ConvexPolygonShape2D" id=8]
points = PoolVector2Array( 512, 512, 0, 512, 0, 448, 512, 448 )
[sub_resource type="ConvexPolygonShape2D" id=10]
points = PoolVector2Array( 0, 448, 512, 448, 512, 512, 0, 512 )
[sub_resource type="ConvexPolygonShape2D" id=12]
points = PoolVector2Array( 512, 512, 0, 512, 0, 448, 512, 448 )
[sub_resource type="ConvexPolygonShape2D" id=13]
points = PoolVector2Array( 512, 512, 448, 512, 448, 64, 512, 64 )
[sub_resource type="ConvexPolygonShape2D" id=14]
points = PoolVector2Array( 512, 64, 64, 64, 64, 0, 512, 0 )
[sub_resource type="ConvexPolygonShape2D" id=15]
points = PoolVector2Array( 64, 448, 0, 448, 0, 0, 64, 0 )
[sub_resource type="ConvexPolygonShape2D" id=16]
points = PoolVector2Array( 512, 448, 448, 448, 448, 0, 512, 0 )
[resource]
0/name = "test_background_tileset.png 0"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 0, 0, 1536, 1536 )
0/tile_mode = 1
0/autotile/bitmask_mode = 0
0/autotile/bitmask_flags = [ Vector2( 0, 0 ), 256, Vector2( 0, 1 ), 260, Vector2( 0, 2 ), 4, Vector2( 1, 0 ), 320, Vector2( 1, 1 ), 325, Vector2( 1, 2 ), 5, Vector2( 2, 0 ), 64, Vector2( 2, 1 ), 65, Vector2( 2, 2 ), 1 ]
0/autotile/icon_coordinate = Vector2( 1, 1 )
0/autotile/tile_size = Vector2( 512, 512 )
0/autotile/spacing = 0
0/autotile/occluder_map = [ ]
0/autotile/navpoly_map = [ ]
0/autotile/priority_map = [ Vector3( 0, 0, 9 ), Vector3( 0, 1, 6 ), Vector3( 0, 2, 3 ), Vector3( 1, 0, 8 ), Vector3( 1, 1, 5 ), Vector3( 1, 2, 2 ), Vector3( 2, 0, 7 ), Vector3( 2, 1, 4 ) ]
0/autotile/z_index_map = [ ]
0/occluder_offset = Vector2( 0, 0 )
0/navigation_offset = Vector2( 0, 0 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape = SubResource( 1 )
0/shape_one_way = false
0/shape_one_way_margin = 1.0
0/shapes = [ {
"autotile_coord": Vector2( 2, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 1 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 3 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 1, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 4 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 6 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 1 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 7 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 1, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 8 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 10 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 12 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 13 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 14 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 0, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 15 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
}, {
"autotile_coord": Vector2( 2, 2 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 16 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
0/z_index = 0

View File

@@ -1,54 +0,0 @@
[gd_resource type="TileSet" load_steps=7 format=2]
[ext_resource path="res://assets/textures/cupcake.png" type="Texture" id=1]
[ext_resource path="res://assets/textures/debugitem_one64.png" type="Texture" id=2]
[sub_resource type="NavigationPolygon" id=1]
vertices = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ) ]
outlines = [ PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 ) ]
[sub_resource type="OccluderPolygon2D" id=2]
polygon = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
[sub_resource type="NavigationPolygon" id=6]
vertices = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ) ]
outlines = [ PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 ) ]
[sub_resource type="OccluderPolygon2D" id=7]
polygon = PoolVector2Array( 0, 0, 64, 0, 64, 64, 0, 64 )
[resource]
0/name = "cupcake.png 0"
0/texture = ExtResource( 1 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 0, 0, 64, 64 )
0/tile_mode = 0
0/occluder_offset = Vector2( 0, 0 )
0/occluder = SubResource( 2 )
0/navigation_offset = Vector2( 0, 0 )
0/navigation = SubResource( 1 )
0/shape_offset = Vector2( 0, 0 )
0/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
0/shape_one_way = false
0/shape_one_way_margin = 0.0
0/shapes = [ ]
0/z_index = 0
1/name = "debugitem_one64.png 1"
1/texture = ExtResource( 2 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 0, 0, 64, 64 )
1/tile_mode = 0
1/occluder_offset = Vector2( 0, 0 )
1/occluder = SubResource( 7 )
1/navigation_offset = Vector2( 0, 0 )
1/navigation = SubResource( 6 )
1/shape_offset = Vector2( 0, 0 )
1/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
1/shape_one_way = false
1/shape_one_way_margin = 0.0
1/shapes = [ ]
1/z_index = 0