summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenrique Alves <henriquelalves@gmail.com>2022-07-15 23:41:15 -0300
committerHenrique Alves <henriquelalves@gmail.com>2022-07-15 23:41:15 -0300
commit49661ab3216933659d7a878ff71b5498a4ebbb14 (patch)
treec2d2f6816a6e8c176c87616e6f534f0f43229207
parent85c76d146775a5495585584925397828d12bc840 (diff)
downloadgamejam-gmtk-2022-49661ab3216933659d7a878ff71b5498a4ebbb14.tar.gz
gamejam-gmtk-2022-49661ab3216933659d7a878ff71b5498a4ebbb14.tar.bz2
gamejam-gmtk-2022-49661ab3216933659d7a878ff71b5498a4ebbb14.zip
add player dice faces
-rw-r--r--Assets/1_dot.pngbin0 -> 6057 bytes
-rw-r--r--Assets/1_dot.png.import37
-rw-r--r--Assets/2_dots.pngbin0 -> 5914 bytes
-rw-r--r--Assets/2_dots.png.import37
-rw-r--r--Assets/3_dots.pngbin0 -> 6608 bytes
-rw-r--r--Assets/3_dots.png.import37
-rw-r--r--Assets/4_dots.pngbin0 -> 7360 bytes
-rw-r--r--Assets/4_dots.png.import37
-rw-r--r--Assets/5_dots.pngbin0 -> 7601 bytes
-rw-r--r--Assets/5_dots.png.import37
-rw-r--r--Assets/6_dots.pngbin0 -> 8376 bytes
-rw-r--r--Assets/6_dots.png.import37
-rw-r--r--Assets/DiceFaceMaterial.tres6
-rw-r--r--Scenes/Dungeon.gd1
-rw-r--r--Scenes/Mesh.gd2
-rw-r--r--Scenes/Player.gd2
-rw-r--r--Scenes/Player.tscn63
17 files changed, 285 insertions, 11 deletions
diff --git a/Assets/1_dot.png b/Assets/1_dot.png
new file mode 100644
index 0000000..7be1320
--- /dev/null
+++ b/Assets/1_dot.png
Binary files differ
diff --git a/Assets/1_dot.png.import b/Assets/1_dot.png.import
new file mode 100644
index 0000000..6cf3f7d
--- /dev/null
+++ b/Assets/1_dot.png.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path.s3tc="res://.import/1_dot.png-53bcce870dedb12a716c2fe391cc9f3d.s3tc.stex"
+path.etc="res://.import/1_dot.png-53bcce870dedb12a716c2fe391cc9f3d.etc.stex"
+metadata={
+"imported_formats": [ "s3tc", "etc" ],
+"vram_texture": true
+}
+
+[deps]
+
+source_file="res://Assets/1_dot.png"
+dest_files=[ "res://.import/1_dot.png-53bcce870dedb12a716c2fe391cc9f3d.s3tc.stex", "res://.import/1_dot.png-53bcce870dedb12a716c2fe391cc9f3d.etc.stex" ]
+
+[params]
+
+compress/mode=2
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=true
+flags/filter=true
+flags/mipmaps=true
+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=false
+svg/scale=1.0
diff --git a/Assets/2_dots.png b/Assets/2_dots.png
new file mode 100644
index 0000000..aa7af8a
--- /dev/null
+++ b/Assets/2_dots.png
Binary files differ
diff --git a/Assets/2_dots.png.import b/Assets/2_dots.png.import
new file mode 100644
index 0000000..4ceae56
--- /dev/null
+++ b/Assets/2_dots.png.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path.s3tc="res://.import/2_dots.png-85980243c99e1e6f9c9057b8b8e230ab.s3tc.stex"
+path.etc="res://.import/2_dots.png-85980243c99e1e6f9c9057b8b8e230ab.etc.stex"
+metadata={
+"imported_formats": [ "s3tc", "etc" ],
+"vram_texture": true
+}
+
+[deps]
+
+source_file="res://Assets/2_dots.png"
+dest_files=[ "res://.import/2_dots.png-85980243c99e1e6f9c9057b8b8e230ab.s3tc.stex", "res://.import/2_dots.png-85980243c99e1e6f9c9057b8b8e230ab.etc.stex" ]
+
+[params]
+
+compress/mode=2
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=true
+flags/filter=true
+flags/mipmaps=true
+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=false
+svg/scale=1.0
diff --git a/Assets/3_dots.png b/Assets/3_dots.png
new file mode 100644
index 0000000..29f3a79
--- /dev/null
+++ b/Assets/3_dots.png
Binary files differ
diff --git a/Assets/3_dots.png.import b/Assets/3_dots.png.import
new file mode 100644
index 0000000..30c9b6c
--- /dev/null
+++ b/Assets/3_dots.png.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path.s3tc="res://.import/3_dots.png-53bdbbe14c72fea0214b646501e67cd3.s3tc.stex"
+path.etc="res://.import/3_dots.png-53bdbbe14c72fea0214b646501e67cd3.etc.stex"
+metadata={
+"imported_formats": [ "s3tc", "etc" ],
+"vram_texture": true
+}
+
+[deps]
+
+source_file="res://Assets/3_dots.png"
+dest_files=[ "res://.import/3_dots.png-53bdbbe14c72fea0214b646501e67cd3.s3tc.stex", "res://.import/3_dots.png-53bdbbe14c72fea0214b646501e67cd3.etc.stex" ]
+
+[params]
+
+compress/mode=2
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=true
+flags/filter=true
+flags/mipmaps=true
+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=false
+svg/scale=1.0
diff --git a/Assets/4_dots.png b/Assets/4_dots.png
new file mode 100644
index 0000000..949852d
--- /dev/null
+++ b/Assets/4_dots.png
Binary files differ
diff --git a/Assets/4_dots.png.import b/Assets/4_dots.png.import
new file mode 100644
index 0000000..6679d36
--- /dev/null
+++ b/Assets/4_dots.png.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path.s3tc="res://.import/4_dots.png-6e9030721c208236ce17ba7233974610.s3tc.stex"
+path.etc="res://.import/4_dots.png-6e9030721c208236ce17ba7233974610.etc.stex"
+metadata={
+"imported_formats": [ "s3tc", "etc" ],
+"vram_texture": true
+}
+
+[deps]
+
+source_file="res://Assets/4_dots.png"
+dest_files=[ "res://.import/4_dots.png-6e9030721c208236ce17ba7233974610.s3tc.stex", "res://.import/4_dots.png-6e9030721c208236ce17ba7233974610.etc.stex" ]
+
+[params]
+
+compress/mode=2
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=true
+flags/filter=true
+flags/mipmaps=true
+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=false
+svg/scale=1.0
diff --git a/Assets/5_dots.png b/Assets/5_dots.png
new file mode 100644
index 0000000..ae8769e
--- /dev/null
+++ b/Assets/5_dots.png
Binary files differ
diff --git a/Assets/5_dots.png.import b/Assets/5_dots.png.import
new file mode 100644
index 0000000..f682a9f
--- /dev/null
+++ b/Assets/5_dots.png.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path.s3tc="res://.import/5_dots.png-29f4bfab3951494deed1940d43d50fa0.s3tc.stex"
+path.etc="res://.import/5_dots.png-29f4bfab3951494deed1940d43d50fa0.etc.stex"
+metadata={
+"imported_formats": [ "s3tc", "etc" ],
+"vram_texture": true
+}
+
+[deps]
+
+source_file="res://Assets/5_dots.png"
+dest_files=[ "res://.import/5_dots.png-29f4bfab3951494deed1940d43d50fa0.s3tc.stex", "res://.import/5_dots.png-29f4bfab3951494deed1940d43d50fa0.etc.stex" ]
+
+[params]
+
+compress/mode=2
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=true
+flags/filter=true
+flags/mipmaps=true
+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=false
+svg/scale=1.0
diff --git a/Assets/6_dots.png b/Assets/6_dots.png
new file mode 100644
index 0000000..744f0a8
--- /dev/null
+++ b/Assets/6_dots.png
Binary files differ
diff --git a/Assets/6_dots.png.import b/Assets/6_dots.png.import
new file mode 100644
index 0000000..cd182e0
--- /dev/null
+++ b/Assets/6_dots.png.import
@@ -0,0 +1,37 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path.s3tc="res://.import/6_dots.png-c81b1ffce354c83b483d79e649ceadbc.s3tc.stex"
+path.etc="res://.import/6_dots.png-c81b1ffce354c83b483d79e649ceadbc.etc.stex"
+metadata={
+"imported_formats": [ "s3tc", "etc" ],
+"vram_texture": true
+}
+
+[deps]
+
+source_file="res://Assets/6_dots.png"
+dest_files=[ "res://.import/6_dots.png-c81b1ffce354c83b483d79e649ceadbc.s3tc.stex", "res://.import/6_dots.png-c81b1ffce354c83b483d79e649ceadbc.etc.stex" ]
+
+[params]
+
+compress/mode=2
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=true
+flags/filter=true
+flags/mipmaps=true
+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=false
+svg/scale=1.0
diff --git a/Assets/DiceFaceMaterial.tres b/Assets/DiceFaceMaterial.tres
new file mode 100644
index 0000000..c09595a
--- /dev/null
+++ b/Assets/DiceFaceMaterial.tres
@@ -0,0 +1,6 @@
+[gd_resource type="SpatialMaterial" load_steps=2 format=2]
+
+[ext_resource path="res://Assets/1_dot.png" type="Texture" id=1]
+
+[resource]
+albedo_texture = ExtResource( 1 )
diff --git a/Scenes/Dungeon.gd b/Scenes/Dungeon.gd
index 00cee84..3c9da26 100644
--- a/Scenes/Dungeon.gd
+++ b/Scenes/Dungeon.gd
@@ -106,6 +106,7 @@ func move_player(dir : Vector2):
player.add_action("cor_move", [tile_to_pos(new_tile)])
player.roll(dir)
+ print(player.get_upper_face())
func tile_to_pos(tile : Vector2):
return Vector3(tile.x, 0, -tile.y)
diff --git a/Scenes/Mesh.gd b/Scenes/Mesh.gd
index d58d74c..e450780 100644
--- a/Scenes/Mesh.gd
+++ b/Scenes/Mesh.gd
@@ -1,4 +1,4 @@
-extends MeshInstance
+extends Spatial
var target_basis : Basis
diff --git a/Scenes/Player.gd b/Scenes/Player.gd
index 1666ba2..057a198 100644
--- a/Scenes/Player.gd
+++ b/Scenes/Player.gd
@@ -30,7 +30,7 @@ const chart_spin = [
[0, 2, 3, 0],
]
-var symbols = ['1', '2', '3', '4', '5', '6']
+var symbols = ['1', '3', '5', '2', '4', '6']
var side = 0
var spin = 0
diff --git a/Scenes/Player.tscn b/Scenes/Player.tscn
index 1bc335f..17684fe 100644
--- a/Scenes/Player.tscn
+++ b/Scenes/Player.tscn
@@ -1,21 +1,66 @@
-[gd_scene load_steps=5 format=2]
+[gd_scene load_steps=15 format=2]
[ext_resource path="res://Scenes/Player.gd" type="Script" id=1]
[ext_resource path="res://Scenes/Mesh.gd" type="Script" id=2]
+[ext_resource path="res://Assets/5_dots.png" type="Texture" id=3]
+[ext_resource path="res://Assets/DiceFaceMaterial.tres" type="Material" id=4]
+[ext_resource path="res://Assets/3_dots.png" type="Texture" id=5]
+[ext_resource path="res://Assets/4_dots.png" type="Texture" id=6]
+[ext_resource path="res://Assets/2_dots.png" type="Texture" id=7]
+[ext_resource path="res://Assets/6_dots.png" type="Texture" id=8]
-[sub_resource type="CubeMesh" id=2]
-size = Vector3( 1, 1, 1 )
+[sub_resource type="QuadMesh" id=5]
-[sub_resource type="SpatialMaterial" id=4]
-albedo_color = Color( 0.403922, 0.729412, 0.427451, 1 )
+[sub_resource type="SpatialMaterial" id=6]
+albedo_texture = ExtResource( 8 )
+
+[sub_resource type="SpatialMaterial" id=7]
+albedo_texture = ExtResource( 7 )
+
+[sub_resource type="SpatialMaterial" id=8]
+albedo_texture = ExtResource( 3 )
+
+[sub_resource type="SpatialMaterial" id=9]
+albedo_texture = ExtResource( 5 )
+
+[sub_resource type="SpatialMaterial" id=10]
+albedo_texture = ExtResource( 6 )
[node name="Player" type="Spatial"]
script = ExtResource( 1 )
actionable = true
-[node name="Mesh" type="MeshInstance" parent="."]
+[node name="Mesh" type="Spatial" parent="."]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0 )
-mesh = SubResource( 2 )
-skeleton = NodePath("../..")
-material/0 = SubResource( 4 )
script = ExtResource( 2 )
+
+[node name="FaceUp" type="MeshInstance" parent="Mesh"]
+transform = Transform( 1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0.5, 0 )
+material_override = ExtResource( 4 )
+mesh = SubResource( 5 )
+material/0 = null
+
+[node name="FaceDown" type="MeshInstance" parent="Mesh"]
+transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, -0.5, 0 )
+mesh = SubResource( 5 )
+material/0 = SubResource( 6 )
+
+[node name="FaceRight" type="MeshInstance" parent="Mesh"]
+transform = Transform( -4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0.5, 0, 0 )
+mesh = SubResource( 5 )
+material/0 = SubResource( 7 )
+
+[node name="FaceLeft" type="MeshInstance" parent="Mesh"]
+transform = Transform( -4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -0.5, 0, 0 )
+mesh = SubResource( 5 )
+material/0 = SubResource( 8 )
+
+[node name="FaceForward" type="MeshInstance" parent="Mesh"]
+transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0.5 )
+mesh = SubResource( 5 )
+material/0 = SubResource( 9 )
+
+[node name="FaceBackward" type="MeshInstance" parent="Mesh"]
+transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, -0.5 )
+mesh = SubResource( 5 )
+material/0 = SubResource( 10 )