Game1 basics

This commit is contained in:
Alice Gaudon 2020-08-17 12:15:41 +02:00
parent d20ecf9843
commit 2f06eb7f8b
21 changed files with 437 additions and 6 deletions

BIN
images/game1/Herbert-01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/menu.png-09788ebfe49b6ddbddfddd3ff6e0248b.stex"
path="res://.import/Herbert-01.png-49eaf794507be21557bb8007dd5cb5ba.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://images/menu.png"
dest_files=[ "res://.import/menu.png-09788ebfe49b6ddbddfddd3ff6e0248b.stex" ]
source_file="res://images/game1/Herbert-01.png"
dest_files=[ "res://.import/Herbert-01.png-49eaf794507be21557bb8007dd5cb5ba.stex" ]
[params]

BIN
images/game1/Herbert-02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -2,15 +2,15 @@
importer="texture"
type="StreamTexture"
path="res://.import/titleCampfire_start.png-7211507e659c115dea4e5d92c551697a.stex"
path="res://.import/Herbert-02.png-51857389c16c4c3aa8011138db769a3c.stex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://images/titleCampfire_start.png"
dest_files=[ "res://.import/titleCampfire_start.png-7211507e659c115dea4e5d92c551697a.stex" ]
source_file="res://images/game1/Herbert-02.png"
dest_files=[ "res://.import/Herbert-02.png-51857389c16c4c3aa8011138db769a3c.stex" ]
[params]

Binary file not shown.

After

Width:  |  Height:  |  Size: 344 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

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

111
images/game1/opening.tres Normal file
View File

@ -0,0 +1,111 @@
[gd_resource type="SpriteFrames" load_steps=22 format=2]
[ext_resource path="res://images/game1/Herbert-01.png" type="Texture" id=1]
[sub_resource type="AtlasTexture" id=1]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=2]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 192, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=3]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 384, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=4]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 576, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=5]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 768, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=6]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 960, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=7]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1152, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=8]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1344, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=9]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1536, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=10]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1728, 0, 192, 108 )
[sub_resource type="AtlasTexture" id=11]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 0, 108, 192, 108 )
[sub_resource type="AtlasTexture" id=12]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 192, 108, 192, 108 )
[sub_resource type="AtlasTexture" id=13]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 384, 108, 192, 108 )
[sub_resource type="AtlasTexture" id=14]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 576, 108, 192, 108 )
[sub_resource type="AtlasTexture" id=15]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 768, 108, 192, 108 )
[sub_resource type="AtlasTexture" id=16]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 960, 108, 192, 108 )
[sub_resource type="AtlasTexture" id=17]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1152, 108, 192, 108 )
[sub_resource type="AtlasTexture" id=18]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1344, 108, 192, 108 )
[sub_resource type="AtlasTexture" id=19]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1536, 108, 192, 108 )
[sub_resource type="AtlasTexture" id=20]
flags = 4
atlas = ExtResource( 1 )
region = Rect2( 1728, 108, 192, 108 )
[resource]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ), SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ), SubResource( 11 ), SubResource( 12 ), SubResource( 13 ), SubResource( 14 ), SubResource( 15 ), SubResource( 16 ), SubResource( 17 ), SubResource( 18 ), SubResource( 19 ), SubResource( 20 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]

View File

@ -0,0 +1,15 @@
[gd_resource type="SpriteFrames" load_steps=3 format=2]
[ext_resource path="res://images/game1/Herbert-02.png" type="Texture" id=1]
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 192, 108 )
[resource]
animations = [ {
"frames": [ SubResource( 1 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]

63
images/game1/player.tres Normal file
View File

@ -0,0 +1,63 @@
[gd_resource type="SpriteFrames" load_steps=14 format=2]
[ext_resource path="res://images/game1/HerbertSprite1_Still.png" type="Texture" id=1]
[ext_resource path="res://images/game1/HerbertSprite1_Left.png" type="Texture" id=2]
[ext_resource path="res://images/game1/HerbertSprite1_Right.png" type="Texture" id=3]
[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 2 )
region = Rect2( 0, 0, 24, 12 )
[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 2 )
region = Rect2( 24, 0, 24, 12 )
[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 2 )
region = Rect2( 48, 0, 24, 12 )
[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 2 )
region = Rect2( 72, 0, 24, 12 )
[sub_resource type="AtlasTexture" id=7]
atlas = ExtResource( 3 )
region = Rect2( 0, 0, 24, 12 )
[sub_resource type="AtlasTexture" id=8]
atlas = ExtResource( 3 )
region = Rect2( 24, 0, 24, 12 )
[sub_resource type="AtlasTexture" id=9]
atlas = ExtResource( 3 )
region = Rect2( 48, 0, 24, 12 )
[sub_resource type="AtlasTexture" id=10]
atlas = ExtResource( 3 )
region = Rect2( 72, 0, 24, 12 )
[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 24, 12 )
[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 24, 0, 24, 12 )
[resource]
animations = [ {
"frames": [ SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
"loop": true,
"name": "left",
"speed": 10.0
}, {
"frames": [ SubResource( 7 ), SubResource( 8 ), SubResource( 9 ), SubResource( 10 ) ],
"loop": true,
"name": "right",
"speed": 10.0
}, {
"frames": [ SubResource( 1 ), SubResource( 2 ) ],
"loop": true,
"name": "default",
"speed": 10.0
} ]

View File

@ -61,6 +61,34 @@ ui_accept={
, Object(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":0,"pressure":0.0,"pressed":false,"script":null)
]
}
right={
"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":16777233,"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(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":15,"pressure":0.0,"pressed":false,"script":null)
]
}
left={
"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":16777231,"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(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":14,"pressure":0.0,"pressed":false,"script":null)
]
}
up={
"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":16777232,"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(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":12,"pressure":0.0,"pressed":false,"script":null)
]
}
down={
"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":16777234,"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(InputEventJoypadButton,"resource_local_to_scene":false,"resource_name":"","device":-1,"button_index":13,"pressure":0.0,"pressed":false,"script":null)
]
}
[rendering]

21
scenes/game1.tscn Normal file
View File

@ -0,0 +1,21 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://images/game1/opening.tres" type="SpriteFrames" id=1]
[ext_resource path="res://images/game1/opening2bg.tres" type="SpriteFrames" id=2]
[ext_resource path="res://scripts/game1/Game1Script.gd" type="Script" id=3]
[ext_resource path="res://scenes/player.tscn" type="PackedScene" id=4]
[node name="Node2D" type="Node2D"]
script = ExtResource( 3 )
[node name="Opening2Bg" type="AnimatedSprite" parent="."]
frames = ExtResource( 2 )
centered = false
[node name="Opening" type="AnimatedSprite" parent="."]
visible = false
frames = ExtResource( 1 )
centered = false
[node name="RigidBody2D" parent="." instance=ExtResource( 4 )]
position = Vector2( -6.22136, 83.6906 )

16
scenes/player.tscn Normal file
View File

@ -0,0 +1,16 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://images/game1/player.tres" type="SpriteFrames" id=1]
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 10, 4.01179 )
[node name="Player" type="RigidBody2D"]
mode = 2
gravity_scale = 0.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
[node name="Sprite" type="AnimatedSprite" parent="."]
frames = ExtResource( 1 )

View File

@ -0,0 +1,7 @@
extends Node
func _ready():
$Opening.play('default')
yield($Opening, 'animation_finished')
$Opening.hide()