Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert to gridmap #12

Open
wants to merge 6 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/blend/floor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions assets/blend/floor.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://cwwu663kgfamg"
path.s3tc="res://.godot/imported/floor.png-1e805a70f6dfcea19bafe3002402dd5d.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}

[deps]

source_file="res://assets/blend/floor.png"
dest_files=["res://.godot/imported/floor.png-1e805a70f6dfcea19bafe3002402dd5d.s3tc.ctex"]

[params]

compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
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=0
Binary file added assets/blend/mesh_library.blend
Binary file not shown.
50 changes: 50 additions & 0 deletions assets/blend/mesh_library.blend.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[remap]

importer="scene"
importer_version=1
type="PackedScene"
uid="uid://cml38jfxdmyp5"
path="res://.godot/imported/mesh_library.blend-b4b2cd07f79eb14a474f482f997a7821.scn"

[deps]

source_file="res://assets/blend/mesh_library.blend"
dest_files=["res://.godot/imported/mesh_library.blend-b4b2cd07f79eb14a474f482f997a7821.scn"]

[params]

nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/naming_version=0
gltf/embedded_image_handling=1
blender/nodes/visible=0
blender/nodes/punctual_lights=true
blender/nodes/cameras=true
blender/nodes/custom_properties=true
blender/nodes/modifiers=1
blender/meshes/colors=false
blender/meshes/uvs=true
blender/meshes/normals=true
blender/meshes/tangents=true
blender/meshes/skins=2
blender/meshes/export_bones_deforming_mesh_only=false
blender/materials/unpack_enabled=true
blender/materials/export_materials=1
blender/animation/limit_playback=true
blender/animation/always_sample=true
blender/animation/group_tracks=true
Binary file added assets/blend/mesh_library.blend1
Binary file not shown.
Binary file added assets/blend/reftex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions assets/blend/reftex.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bgs5c74av2cdy"
path="res://.godot/imported/reftex.png-ba1f77459f6d575e745e953fb5236b9f.ctex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/blend/reftex.png"
dest_files=["res://.godot/imported/reftex.png-ba1f77459f6d575e745e953fb5236b9f.ctex"]

[params]

compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
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
Binary file added assets/blend/wall.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions assets/blend/wall.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="CompressedTexture2D"
uid="uid://bmrn5bihmtpmn"
path.s3tc="res://.godot/imported/wall.png-e5d141c9fbd95ead8d86d20d4a4bbd93.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}

[deps]

source_file="res://assets/blend/wall.png"
dest_files=["res://.godot/imported/wall.png-e5d141c9fbd95ead8d86d20d4a4bbd93.s3tc.ctex"]

[params]

compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
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=0
562 changes: 562 additions & 0 deletions assets/mesh_library/mesh_library.tres

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions assets/sprites/characters/chr_pawn_archer.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://cjkpd4x507ra2"
path.etc2="res://.godot/imported/chr_pawn_archer.png-5b344ef7a373376638b1716671d15ca2.etc2.ctex"
path.s3tc="res://.godot/imported/chr_pawn_archer.png-5b344ef7a373376638b1716671d15ca2.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}

[deps]

source_file="res://assets/sprites/characters/chr_pawn_archer.png"
dest_files=["res://.godot/imported/chr_pawn_archer.png-5b344ef7a373376638b1716671d15ca2.etc2.ctex"]
dest_files=["res://.godot/imported/chr_pawn_archer.png-5b344ef7a373376638b1716671d15ca2.s3tc.ctex"]

[params]

Expand Down
6 changes: 3 additions & 3 deletions assets/sprites/characters/chr_pawn_chemist.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://brgrjjiidgxun"
path.etc2="res://.godot/imported/chr_pawn_chemist.png-9a30b9cb683733355e4ca530a1a2f3c8.etc2.ctex"
path.s3tc="res://.godot/imported/chr_pawn_chemist.png-9a30b9cb683733355e4ca530a1a2f3c8.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}

[deps]

source_file="res://assets/sprites/characters/chr_pawn_chemist.png"
dest_files=["res://.godot/imported/chr_pawn_chemist.png-9a30b9cb683733355e4ca530a1a2f3c8.etc2.ctex"]
dest_files=["res://.godot/imported/chr_pawn_chemist.png-9a30b9cb683733355e4ca530a1a2f3c8.s3tc.ctex"]

[params]

Expand Down
6 changes: 3 additions & 3 deletions assets/sprites/characters/chr_pawn_knight.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://ewitxujpa3p3"
path.etc2="res://.godot/imported/chr_pawn_knight.png-622d737eb704ae4753cf69084d8a5a9f.etc2.ctex"
path.s3tc="res://.godot/imported/chr_pawn_knight.png-622d737eb704ae4753cf69084d8a5a9f.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}

[deps]

source_file="res://assets/sprites/characters/chr_pawn_knight.png"
dest_files=["res://.godot/imported/chr_pawn_knight.png-622d737eb704ae4753cf69084d8a5a9f.etc2.ctex"]
dest_files=["res://.godot/imported/chr_pawn_knight.png-622d737eb704ae4753cf69084d8a5a9f.s3tc.ctex"]

[params]

Expand Down
6 changes: 3 additions & 3 deletions assets/sprites/characters/chr_pawn_mage.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://dtnp3dsqu2yy6"
path.etc2="res://.godot/imported/chr_pawn_mage.png-a242cd7466699ab6c12bda79a3fe25d2.etc2.ctex"
path.s3tc="res://.godot/imported/chr_pawn_mage.png-a242cd7466699ab6c12bda79a3fe25d2.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}

[deps]

source_file="res://assets/sprites/characters/chr_pawn_mage.png"
dest_files=["res://.godot/imported/chr_pawn_mage.png-a242cd7466699ab6c12bda79a3fe25d2.etc2.ctex"]
dest_files=["res://.godot/imported/chr_pawn_mage.png-a242cd7466699ab6c12bda79a3fe25d2.s3tc.ctex"]

[params]

Expand Down
6 changes: 3 additions & 3 deletions assets/sprites/characters/chr_pawn_placeholder.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://bob12its3i651"
path.etc2="res://.godot/imported/chr_pawn_placeholder.png-f962d0d4aae444ea7a2403f9b6f5323e.etc2.ctex"
path.s3tc="res://.godot/imported/chr_pawn_placeholder.png-f962d0d4aae444ea7a2403f9b6f5323e.s3tc.ctex"
metadata={
"imported_formats": ["etc2_astc"],
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}

[deps]

source_file="res://assets/sprites/characters/chr_pawn_placeholder.png"
dest_files=["res://.godot/imported/chr_pawn_placeholder.png-f962d0d4aae444ea7a2403f9b6f5323e.etc2.ctex"]
dest_files=["res://.godot/imported/chr_pawn_placeholder.png-f962d0d4aae444ea7a2403f9b6f5323e.s3tc.ctex"]

[params]

Expand Down
27 changes: 27 additions & 0 deletions assets/tiles/slope_meshinstance.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
@tool
extends MeshInstance3D

const Y_OFFSET = 0.01
const TILE_EXTENT = 0.5
const HEIGHT_EXTENT = 0.25

func _ready():
if !mesh:
mesh = ArrayMesh.new()

var surface_array = []
surface_array.resize(mesh.ARRAY_MAX)

surface_array[Mesh.ARRAY_VERTEX] = PackedVector3Array([
Vector3(-TILE_EXTENT, Y_OFFSET + HEIGHT_EXTENT, -TILE_EXTENT),
Vector3(TILE_EXTENT, Y_OFFSET + HEIGHT_EXTENT, -TILE_EXTENT),
Vector3(TILE_EXTENT, Y_OFFSET - HEIGHT_EXTENT, TILE_EXTENT),
Vector3(-TILE_EXTENT, Y_OFFSET - HEIGHT_EXTENT, TILE_EXTENT),
])

surface_array[Mesh.ARRAY_INDEX] = PackedInt32Array([
0, 1, 2,
2, 3, 0,
])

mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, surface_array)
19 changes: 19 additions & 0 deletions assets/tiles/slope_meshinstance.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[gd_scene load_steps=3 format=3 uid="uid://cbn5bgvv0jhi5"]

[ext_resource type="Script" path="res://assets/tiles/slope_meshinstance.gd" id="1_8vy2s"]

[sub_resource type="ArrayMesh" id="ArrayMesh_3512a"]
_surfaces = [{
"aabb": AABB(-0.5, -0.24, -0.5, 1, 0.50001, 1),
"format": 34359742465,
"index_count": 6,
"index_data": PackedByteArray(0, 0, 1, 0, 2, 0, 2, 0, 3, 0, 0, 0),
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 4,
"vertex_data": PackedByteArray(0, 0, 0, 191, 184, 30, 133, 62, 0, 0, 0, 191, 0, 0, 0, 63, 184, 30, 133, 62, 0, 0, 0, 191, 0, 0, 0, 63, 143, 194, 117, 190, 0, 0, 0, 63, 0, 0, 0, 191, 143, 194, 117, 190, 0, 0, 0, 63)
}]

[node name="MeshInstance3D" type="MeshInstance3D"]
mesh = SubResource("ArrayMesh_3512a")
script = ExtResource("1_8vy2s")
8 changes: 8 additions & 0 deletions assets/tiles/tile_meshinstance.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=3 uid="uid://d2im4mntomt2x"]

[sub_resource type="PlaneMesh" id="PlaneMesh_gei5j"]
size = Vector2(1, 1)
center_offset = Vector3(0, -0.249, 0)

[node name="MeshInstance3D" type="MeshInstance3D"]
mesh = SubResource("PlaneMesh_gei5j")
12 changes: 5 additions & 7 deletions assets/tscn/pawn.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=18 format=3 uid="uid://6eofg7n4asn5"]
[gd_scene load_steps=17 format=3 uid="uid://6eofg7n4asn5"]

[ext_resource type="Script" path="res://src/pawn.gd" id="1"]
[ext_resource type="Texture2D" uid="uid://bob12its3i651" path="res://assets/sprites/characters/chr_pawn_placeholder.png" id="2"]
Expand Down Expand Up @@ -76,13 +76,11 @@ animation = &"JUMP"

[sub_resource type="AnimationNodeStateMachineTransition" id="12"]
switch_mode = 2
auto_advance = true

[sub_resource type="AnimationNodeStateMachineTransition" id="19"]

[sub_resource type="AnimationNodeStateMachineTransition" id="20"]
switch_mode = 2
auto_advance = true

[sub_resource type="AnimationNodeStateMachine" id="7"]
states/DAMAGE/node = SubResource("18")
Expand All @@ -93,8 +91,6 @@ states/JUMP/node = SubResource("10")
states/JUMP/position = Vector2(512, 133.312)
transitions = ["IDLE", "JUMP", SubResource("11"), "JUMP", "IDLE", SubResource("12"), "IDLE", "DAMAGE", SubResource("19"), "DAMAGE", "IDLE", SubResource("20")]

[sub_resource type="AnimationNodeStateMachinePlayback" id="8"]

[node name="Pawn" type="CharacterBody3D"]
collision_layer = 2
collision_mask = 0
Expand All @@ -105,7 +101,7 @@ transform = Transform3D(0.2, 0, 0, 0, -8.74228e-09, -0.4, 0, 0.2, -1.74846e-08,
shape = SubResource("13")

[node name="Tile" type="RayCast3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0)
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)

[node name="Character" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.602, 0)
Expand All @@ -121,9 +117,11 @@ libraries = {
}

[node name="AnimationTree" type="AnimationTree" parent="Character"]
libraries = {
"": SubResource("AnimationLibrary_4xm2j")
}
tree_root = SubResource("7")
anim_player = NodePath("../AnimationPlayer")
parameters/playback = SubResource("8")

[node name="CharacterStats" type="Node3D" parent="."]
visible = false
Expand Down
Loading