Organize 3D platformer demo files

This commit is contained in:
Aaron Franke
2020-02-19 19:09:55 -05:00
parent 486d582802
commit 399de3e954
49 changed files with 408 additions and 448 deletions

View File

@@ -3,6 +3,6 @@ extends Area
var taken = false
func _on_coin_body_enter(body):
if not taken and body is preload("res://player.gd"):
if not taken and body is preload("res://player/player.gd"):
get_node("Animation").play("take")
taken = true

View File

@@ -1,8 +1,8 @@
[gd_scene load_steps=14 format=2]
[ext_resource path="res://coin.gd" type="Script" id=1]
[ext_resource path="res://sound_coin.wav" type="AudioStream" id=2]
[ext_resource path="res://shine.png" type="Texture" id=3]
[ext_resource path="res://coin/coin.gd" type="Script" id=1]
[ext_resource path="res://coin/sound_coin.wav" type="AudioStream" id=2]
[ext_resource path="res://enemy/shine.png" type="Texture" id=3]
[sub_resource type="SpatialMaterial" id=1]
albedo_color = Color( 1, 0.837686, 0, 1 )

View File

@@ -2,12 +2,12 @@
importer="wav"
type="AudioStreamSample"
path="res://.import/sound_coin.wav-b4defacd1a1eab95585c7b5095506878.sample"
path="res://.import/sound_coin.wav-5f523c825e94d407ed9e355cbe69ab46.sample"
[deps]
source_file="res://sound_coin.wav"
dest_files=[ "res://.import/sound_coin.wav-b4defacd1a1eab95585c7b5095506878.sample" ]
source_file="res://coin/sound_coin.wav"
dest_files=[ "res://.import/sound_coin.wav-5f523c825e94d407ed9e355cbe69ab46.sample" ]
[params]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/cutout.png-8aacc6c936bf12e889c8e11f6c4eb91c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://cutout.png"
dest_files=[ "res://.import/cutout.png-8aacc6c936bf12e889c8e11f6c4eb91c.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=true
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0

View File

@@ -34,7 +34,7 @@ func _integrate_forces(state):
var dp = state.get_contact_local_normal(i)
if cc:
if cc is preload("res://bullet.gd") and cc.enabled:
if cc is preload("res://player/bullet/bullet.gd") and cc.enabled:
set_mode(MODE_RIGID)
dying = true
state.set_angular_velocity(-dp.cross(up).normalized() * 33.0)

View File

@@ -1,10 +1,10 @@
[gd_scene load_steps=25 format=2]
[ext_resource path="res://enemy.gd" type="Script" id=1]
[ext_resource path="res://robot_walk.wav" type="AudioStream" id=2]
[ext_resource path="res://sound_hit.wav" type="AudioStream" id=3]
[ext_resource path="res://sound_explode.wav" type="AudioStream" id=4]
[ext_resource path="res://shine.png" type="Texture" id=5]
[ext_resource path="res://enemy/enemy.gd" type="Script" id=1]
[ext_resource path="res://enemy/robot_walk.wav" type="AudioStream" id=2]
[ext_resource path="res://enemy/sound_hit.wav" type="AudioStream" id=3]
[ext_resource path="res://enemy/sound_explode.wav" type="AudioStream" id=4]
[ext_resource path="res://enemy/shine.png" type="Texture" id=5]
[sub_resource type="PhysicsMaterial" id=1]
friction = 0.0

View File

@@ -2,12 +2,12 @@
importer="wav"
type="AudioStreamSample"
path="res://.import/robot_walk.wav-4313e7d5f563e62e3923080b14a79c15.sample"
path="res://.import/robot_walk.wav-e477aac8926497af29eed244f64833e8.sample"
[deps]
source_file="res://robot_walk.wav"
dest_files=[ "res://.import/robot_walk.wav-4313e7d5f563e62e3923080b14a79c15.sample" ]
source_file="res://enemy/robot_walk.wav"
dest_files=[ "res://.import/robot_walk.wav-e477aac8926497af29eed244f64833e8.sample" ]
[params]

View File

Before

Width:  |  Height:  |  Size: 211 B

After

Width:  |  Height:  |  Size: 211 B

View File

@@ -2,8 +2,8 @@
importer="texture"
type="StreamTexture"
path.s3tc="res://.import/shine.png-a8253c1d2dc8acbf187823f695c13207.s3tc.stex"
path.etc2="res://.import/shine.png-a8253c1d2dc8acbf187823f695c13207.etc2.stex"
path.s3tc="res://.import/shine.png-4170bd0cee6f5d251a3f551d4acf3e6c.s3tc.stex"
path.etc2="res://.import/shine.png-4170bd0cee6f5d251a3f551d4acf3e6c.etc2.stex"
metadata={
"imported_formats": [ "s3tc", "etc2" ],
"vram_texture": true
@@ -11,8 +11,8 @@ metadata={
[deps]
source_file="res://shine.png"
dest_files=[ "res://.import/shine.png-a8253c1d2dc8acbf187823f695c13207.s3tc.stex", "res://.import/shine.png-a8253c1d2dc8acbf187823f695c13207.etc2.stex" ]
source_file="res://enemy/shine.png"
dest_files=[ "res://.import/shine.png-4170bd0cee6f5d251a3f551d4acf3e6c.s3tc.stex", "res://.import/shine.png-4170bd0cee6f5d251a3f551d4acf3e6c.etc2.stex" ]
[params]

View File

@@ -2,12 +2,12 @@
importer="wav"
type="AudioStreamSample"
path="res://.import/sound_explode.wav-23e94be75a4346bffb517c7e07035977.sample"
path="res://.import/sound_explode.wav-38875bfce76147e228902e26b716f579.sample"
[deps]
source_file="res://sound_explode.wav"
dest_files=[ "res://.import/sound_explode.wav-23e94be75a4346bffb517c7e07035977.sample" ]
source_file="res://enemy/sound_explode.wav"
dest_files=[ "res://.import/sound_explode.wav-38875bfce76147e228902e26b716f579.sample" ]
[params]

View File

@@ -2,12 +2,12 @@
importer="wav"
type="AudioStreamSample"
path="res://.import/sound_hit.wav-d8455980ada2d4a9a73508948d7317cc.sample"
path="res://.import/sound_hit.wav-954732368f39d5a47e196d428c1ff53a.sample"
[deps]
source_file="res://sound_hit.wav"
dest_files=[ "res://.import/sound_hit.wav-d8455980ada2d4a9a73508948d7317cc.sample" ]
source_file="res://enemy/sound_hit.wav"
dest_files=[ "res://.import/sound_hit.wav-954732368f39d5a47e196d428c1ff53a.sample" ]
[params]

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=10 format=2]
[ext_resource path="res://bullet.gd" type="Script" id=1]
[ext_resource path="res://player/bullet/bullet.gd" type="Script" id=1]
[sub_resource type="SpatialMaterial" id=1]
flags_transparent = true

View File

Before

Width:  |  Height:  |  Size: 815 B

After

Width:  |  Height:  |  Size: 815 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/osb_down.png-4a1ab934f787719766862b499528d054.stex"
path="res://.import/osb_down.png-3bcabfc1fcfaeeccc61e2e829d6554c4.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://osb_down.png"
dest_files=[ "res://.import/osb_down.png-4a1ab934f787719766862b499528d054.stex" ]
source_file="res://player/controls/osb_down.png"
dest_files=[ "res://.import/osb_down.png-3bcabfc1fcfaeeccc61e2e829d6554c4.stex" ]
[params]

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/osb_fire.png-e657a73546eb75918e9d9a3fea15cf70.stex"
path="res://.import/osb_fire.png-2e93a3da4bfeb57477fca7905c0173a4.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://osb_fire.png"
dest_files=[ "res://.import/osb_fire.png-e657a73546eb75918e9d9a3fea15cf70.stex" ]
source_file="res://player/controls/osb_fire.png"
dest_files=[ "res://.import/osb_fire.png-2e93a3da4bfeb57477fca7905c0173a4.stex" ]
[params]

View File

Before

Width:  |  Height:  |  Size: 836 B

After

Width:  |  Height:  |  Size: 836 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/osb_jump.png-dbbef3b47abbb562ce6c81a9701121c6.stex"
path="res://.import/osb_jump.png-aa75300abbd0a7d9e9bc4796371c64a3.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://osb_jump.png"
dest_files=[ "res://.import/osb_jump.png-dbbef3b47abbb562ce6c81a9701121c6.stex" ]
source_file="res://player/controls/osb_jump.png"
dest_files=[ "res://.import/osb_jump.png-aa75300abbd0a7d9e9bc4796371c64a3.stex" ]
[params]

View File

Before

Width:  |  Height:  |  Size: 819 B

After

Width:  |  Height:  |  Size: 819 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/osb_left.png-fc7230aeb0eec74933ed08f89b893288.stex"
path="res://.import/osb_left.png-10e92e56ebe36a5205968909dc4b286b.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://osb_left.png"
dest_files=[ "res://.import/osb_left.png-fc7230aeb0eec74933ed08f89b893288.stex" ]
source_file="res://player/controls/osb_left.png"
dest_files=[ "res://.import/osb_left.png-10e92e56ebe36a5205968909dc4b286b.stex" ]
[params]

View File

Before

Width:  |  Height:  |  Size: 819 B

After

Width:  |  Height:  |  Size: 819 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/osb_right.png-5cf5add2dbc1c8dde17173ac56f3a004.stex"
path="res://.import/osb_right.png-fb8adc0d65f2da35441a371b0865044c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://osb_right.png"
dest_files=[ "res://.import/osb_right.png-5cf5add2dbc1c8dde17173ac56f3a004.stex" ]
source_file="res://player/controls/osb_right.png"
dest_files=[ "res://.import/osb_right.png-fb8adc0d65f2da35441a371b0865044c.stex" ]
[params]

View File

Before

Width:  |  Height:  |  Size: 842 B

After

Width:  |  Height:  |  Size: 842 B

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/osb_up.png-6a05b6a7bf0ede3756308a5cffdd2b9a.stex"
path="res://.import/osb_up.png-03a826da4884734d6f66c813539bfce8.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://osb_up.png"
dest_files=[ "res://.import/osb_up.png-6a05b6a7bf0ede3756308a5cffdd2b9a.stex" ]
source_file="res://player/controls/osb_up.png"
dest_files=[ "res://.import/osb_up.png-03a826da4884734d6f66c813539bfce8.stex" ]
[params]

View File

@@ -113,7 +113,7 @@ func _physics_process(delta):
if shoot_attempt and not prev_shoot:
shoot_blend = SHOOT_TIME
var bullet = preload("res://bullet.tscn").instance()
var bullet = preload("res://player/bullet/bullet.tscn").instance()
bullet.set_transform(get_node("Armature/Bullet").get_global_transform().orthonormalized())
get_parent().add_child(bullet)
bullet.set_linear_velocity(get_node("Armature/Bullet").get_global_transform().basis[2].normalized() * 20)

View File

@@ -1,13 +1,13 @@
[gd_scene load_steps=32 format=2]
[ext_resource path="res://player.gd" type="Script" id=1]
[ext_resource path="res://follow_camera.gd" type="Script" id=2]
[ext_resource path="res://osb_up.png" type="Texture" id=3]
[ext_resource path="res://osb_down.png" type="Texture" id=4]
[ext_resource path="res://osb_left.png" type="Texture" id=5]
[ext_resource path="res://osb_right.png" type="Texture" id=6]
[ext_resource path="res://sound_shoot.wav" type="AudioStream" id=7]
[ext_resource path="res://sound_jump.wav" type="AudioStream" id=8]
[ext_resource path="res://player/player.gd" type="Script" id=1]
[ext_resource path="res://player/follow_camera.gd" type="Script" id=2]
[ext_resource path="res://player/controls/osb_up.png" type="Texture" id=3]
[ext_resource path="res://player/controls/osb_down.png" type="Texture" id=4]
[ext_resource path="res://player/controls/osb_left.png" type="Texture" id=5]
[ext_resource path="res://player/controls/osb_right.png" type="Texture" id=6]
[ext_resource path="res://player/sound_shoot.wav" type="AudioStream" id=7]
[ext_resource path="res://player/sound_jump.wav" type="AudioStream" id=8]
[sub_resource type="CapsuleShape" id=1]
radius = 0.4
@@ -1603,60 +1603,60 @@ tracks/26/imported = false
tracks/26/enabled = true
tracks/26/keys = PoolRealArray( 0, 1, 5.17831e-08, 0.00292331, 0.204329, 3.25963e-09, -2.17324e-11, 3.00563e-10, 1, 1, 1, 1, 1.25, 1, 5.17831e-08, 0.00292331, 0.204329, 3.25963e-09, -2.17324e-11, 3.00563e-10, 1, 1, 1, 1 )
[sub_resource type="AnimationNodeAnimation" id=15]
[sub_resource type="AnimationNodeAnimation" id=13]
animation = "walk-cycle"
[sub_resource type="AnimationNodeAnimation" id=16]
[sub_resource type="AnimationNodeAnimation" id=14]
animation = "jump-up-cycle"
[sub_resource type="AnimationNodeAnimation" id=17]
[sub_resource type="AnimationNodeAnimation" id=15]
animation = "falling-cycle"
[sub_resource type="AnimationNodeAnimation" id=18]
[sub_resource type="AnimationNodeAnimation" id=16]
animation = "shooting_standing"
[sub_resource type="AnimationNodeAnimation" id=13]
[sub_resource type="AnimationNodeAnimation" id=17]
animation = "idle"
[sub_resource type="AnimationNodeBlend2" id=23]
[sub_resource type="AnimationNodeBlend2" id=18]
[sub_resource type="AnimationNodeBlend2" id=19]
[sub_resource type="AnimationNodeTimeScale" id=21]
[sub_resource type="AnimationNodeTimeScale" id=20]
[sub_resource type="AnimationNodeTransition" id=22]
[sub_resource type="AnimationNodeTransition" id=21]
input_count = 2
input_0/name = "on floor"
input_0/auto_advance = false
input_1/name = "in air"
input_1/auto_advance = false
[sub_resource type="AnimationNodeBlend2" id=20]
[sub_resource type="AnimationNodeBlend2" id=22]
[sub_resource type="AnimationNodeBlendTree" id=14]
[sub_resource type="AnimationNodeBlendTree" id=23]
graph_offset = Vector2( -294.243, -77.71 )
nodes/Animation/node = SubResource( 13 )
nodes/Animation/node = SubResource( 17 )
nodes/Animation/position = Vector2( -260, -280 )
"nodes/Animation 2/node" = SubResource( 15 )
"nodes/Animation 2/node" = SubResource( 13 )
"nodes/Animation 2/position" = Vector2( -260, -160 )
"nodes/Animation 3/node" = SubResource( 16 )
"nodes/Animation 3/node" = SubResource( 14 )
"nodes/Animation 3/position" = Vector2( -260, -40 )
"nodes/Animation 4/node" = SubResource( 17 )
"nodes/Animation 4/node" = SubResource( 15 )
"nodes/Animation 4/position" = Vector2( -260, 80 )
"nodes/Animation 5/node" = SubResource( 18 )
"nodes/Animation 5/node" = SubResource( 16 )
"nodes/Animation 5/position" = Vector2( -260, 200 )
nodes/air_dir/node = SubResource( 23 )
nodes/air_dir/node = SubResource( 18 )
nodes/air_dir/position = Vector2( 140, 20 )
nodes/gun/node = SubResource( 19 )
nodes/gun/position = Vector2( 680, 140 )
nodes/output/position = Vector2( 880, 140 )
nodes/scale/node = SubResource( 21 )
nodes/scale/node = SubResource( 20 )
nodes/scale/position = Vector2( 180, -120 )
nodes/state/node = SubResource( 22 )
nodes/state/node = SubResource( 21 )
nodes/state/position = Vector2( 440, 0 )
nodes/walk/node = SubResource( 20 )
nodes/walk/node = SubResource( 22 )
nodes/walk/position = Vector2( -40, -240 )
node_connections = [ "scale", 0, "walk", "output", 0, "gun", "state", 0, "scale", "state", 1, "air_dir", "gun", 0, "state", "gun", 1, "Animation 5", "walk", 0, "Animation", "walk", 1, "Animation 2", "air_dir", 0, "Animation 3", "air_dir", 1, "Animation 4" ]
node_connections = [ "scale", 0, "walk", "output", 0, "gun", "state", 0, "scale", "state", 1, "air_dir", "air_dir", 0, "Animation 3", "air_dir", 1, "Animation 4", "gun", 0, "state", "gun", 1, "Animation 5", "walk", 0, "Animation", "walk", 1, "Animation 2" ]
[node name="Player" type="KinematicBody"]
script = ExtResource( 1 )
@@ -1837,7 +1837,7 @@ anims/shooting_standing = SubResource( 11 )
anims/walk-cycle = SubResource( 12 )
[node name="AnimationTree" type="AnimationTree" parent="."]
tree_root = SubResource( 14 )
tree_root = SubResource( 23 )
anim_player = NodePath("../AnimationPlayer")
parameters/air_dir/blend_amount = 0.0
parameters/gun/blend_amount = 0

View File

@@ -2,12 +2,12 @@
importer="wav"
type="AudioStreamSample"
path="res://.import/sound_jump.wav-4966d1f327e26a176b56ab335c03b5e1.sample"
path="res://.import/sound_jump.wav-2a6db8acfd21d20a55b2f160c322e83f.sample"
[deps]
source_file="res://sound_jump.wav"
dest_files=[ "res://.import/sound_jump.wav-4966d1f327e26a176b56ab335c03b5e1.sample" ]
source_file="res://player/sound_jump.wav"
dest_files=[ "res://.import/sound_jump.wav-2a6db8acfd21d20a55b2f160c322e83f.sample" ]
[params]

View File

@@ -2,12 +2,12 @@
importer="wav"
type="AudioStreamSample"
path="res://.import/sound_shoot.wav-f0f26619cba21d411b53ad23b8788116.sample"
path="res://.import/sound_shoot.wav-1364cf87a9be9d98fd06fa6e8c50c93c.sample"
[deps]
source_file="res://sound_shoot.wav"
dest_files=[ "res://.import/sound_shoot.wav-f0f26619cba21d411b53ad23b8788116.sample" ]
source_file="res://player/sound_shoot.wav"
dest_files=[ "res://.import/sound_shoot.wav-1364cf87a9be9d98fd06fa6e8c50c93c.sample" ]
[params]

View File

@@ -16,7 +16,7 @@ _global_script_class_icons={
[application]
config/name="Platformer 3D"
run/main_scene="res://stage.tscn"
run/main_scene="res://stage/stage.tscn"
config/icon="res://icon.png"
[gdnative]

View File

@@ -1,7 +0,0 @@
sb_left.png
sb_right.png
sb_bottom.png
sb_top.png
sb_back.png
sb_front.png

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 302 KiB

After

Width:  |  Height:  |  Size: 302 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/panorama.png-e05131d3dca9fd5b03101f18fbe08995.stex"
path="res://.import/panorama.png-831ab5eba634fd570693d2002d1da17a.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://panorama.png"
dest_files=[ "res://.import/panorama.png-e05131d3dca9fd5b03101f18fbe08995.stex" ]
source_file="res://stage/panorama.png"
dest_files=[ "res://.import/panorama.png-831ab5eba634fd570693d2002d1da17a.stex" ]
[params]

File diff suppressed because one or more lines are too long

View File

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

View File

@@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/texture.png-77dc6ecaf884a35cd9dbaf886cacc46d.stex"
path="res://.import/texture.png-d5a77cb2808c1bf5b0612979ad94fbdb.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://texture.png"
dest_files=[ "res://.import/texture.png-77dc6ecaf884a35cd9dbaf886cacc46d.stex" ]
source_file="res://stage/texture.png"
dest_files=[ "res://.import/texture.png-d5a77cb2808c1bf5b0612979ad94fbdb.stex" ]
[params]

View File

Before

Width:  |  Height:  |  Size: 737 B

After

Width:  |  Height:  |  Size: 737 B

View File

@@ -2,8 +2,8 @@
importer="texture"
type="StreamTexture"
path.s3tc="res://.import/texturemr.png-0568a8b09834741143da53ce460e36f1.s3tc.stex"
path.etc2="res://.import/texturemr.png-0568a8b09834741143da53ce460e36f1.etc2.stex"
path.s3tc="res://.import/texturemr.png-93ff7bda7acbc5334b4181300007df27.s3tc.stex"
path.etc2="res://.import/texturemr.png-93ff7bda7acbc5334b4181300007df27.etc2.stex"
metadata={
"imported_formats": [ "s3tc", "etc2" ],
"vram_texture": true
@@ -11,8 +11,8 @@ metadata={
[deps]
source_file="res://texturemr.png"
dest_files=[ "res://.import/texturemr.png-0568a8b09834741143da53ce460e36f1.s3tc.stex", "res://.import/texturemr.png-0568a8b09834741143da53ce460e36f1.etc2.stex" ]
source_file="res://stage/texturemr.png"
dest_files=[ "res://.import/texturemr.png-93ff7bda7acbc5334b4181300007df27.s3tc.stex", "res://.import/texturemr.png-93ff7bda7acbc5334b4181300007df27.etc2.stex" ]
[params]

View File

@@ -1,7 +1,7 @@
[gd_resource type="MeshLibrary" load_steps=76 format=2]
[ext_resource path="res://texture.png" type="Texture" id=1]
[ext_resource path="res://texturemr.png" type="Texture" id=2]
[ext_resource path="res://stage/texture.png" type="Texture" id=1]
[ext_resource path="res://stage/texturemr.png" type="Texture" id=2]
[sub_resource type="SpatialMaterial" id=1]
albedo_texture = ExtResource( 1 )

View File

@@ -1,6 +1,7 @@
[gd_scene load_steps=22 format=2]
[ext_resource path="res://texture.png" type="Texture" id=1]
[ext_resource path="res://stage/texture.png" type="Texture" id=1]
[sub_resource type="SpatialMaterial" id=1]
params_diffuse_mode = 1