Tutorial level

This commit is contained in:
Beric 2022-08-04 17:56:22 -06:00
parent 417044bfda
commit 88bc593642
13 changed files with 754 additions and 125 deletions

View File

@ -0,0 +1,15 @@
[remap]
importer="mp3"
type="AudioStreamMP3"
path="res://.import/Y2Mate.is - Won't You Be My Neighbor [8 Bit Tribute to Mr. Rogers] - 8 Bit Universe-8f3BEcQp1Q4-48k-1659646018463.mp3-ec05d1cb585d9c3c75ba836c4aa3888d.mp3str"
[deps]
source_file="res://Y2Mate.is - Won't You Be My Neighbor [8 Bit Tribute to Mr. Rogers] - 8 Bit Universe-8f3BEcQp1Q4-48k-1659646018463.mp3"
dest_files=[ "res://.import/Y2Mate.is - Won't You Be My Neighbor [8 Bit Tribute to Mr. Rogers] - 8 Bit Universe-8f3BEcQp1Q4-48k-1659646018463.mp3-ec05d1cb585d9c3c75ba836c4aa3888d.mp3str" ]
[params]
loop=true
loop_offset=0

View File

@ -41,6 +41,37 @@ config/icon="res://icon.png"
window/size/width=1280 window/size/width=1280
window/size/height=960 window/size/height=960
[input]
ui_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,"physical_scancode":0,"unicode":0,"echo":false,"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":0,"physical_scancode":65,"unicode":0,"echo":false,"script":null)
]
}
ui_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,"physical_scancode":0,"unicode":0,"echo":false,"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":0,"physical_scancode":68,"unicode":0,"echo":false,"script":null)
]
}
ui_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,"physical_scancode":0,"unicode":0,"echo":false,"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":0,"physical_scancode":87,"unicode":0,"echo":false,"script":null)
]
}
ui_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,"physical_scancode":0,"unicode":0,"echo":false,"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":0,"physical_scancode":83,"unicode":0,"echo":false,"script":null)
]
}
[layer_names] [layer_names]
2d_physics/layer_1="player" 2d_physics/layer_1="player"

1
roger-roger Submodule

@ -0,0 +1 @@
Subproject commit fe23545db0535165166c54f6ee6c31d5345b6f7c

11
scenes/Bush1.tscn Normal file
View File

@ -0,0 +1,11 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://roger-roger/bush2.png" type="Texture" id=1]
[node name="Bush1" type="Node2D"]
position = Vector2( -527, 252 )
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -2.99988 )
scale = Vector2( 5, 5 )
texture = ExtResource( 1 )

9
scenes/Bush2.tscn Normal file
View File

@ -0,0 +1,9 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://roger-roger/bush1.png" type="Texture" id=1]
[node name="Bush2" type="Node2D"]
[node name="Sprite" type="Sprite" parent="."]
scale = Vector2( 5, 5 )
texture = ExtResource( 1 )

51
scenes/Clouds.gd Normal file
View File

@ -0,0 +1,51 @@
extends Node2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
onready var cloud1 = $Sprite
onready var cloud2 = $Sprite2
onready var cloud3 = $Sprite3
onready var cloud4 = $Sprite4
onready var topBorder = $TopBorder
onready var bottomBorder = $BottomBorder
onready var leftBorder = $LeftBorder
onready var rightBorder = $RightBorder
var clouds = []
var rng = RandomNumberGenerator.new()
var xSpeed = 0
# Called when the node enters the scene tree for the first time.
func _ready():
rng.randomize()
xSpeed = rng.randf_range(0.5,2)
clouds = [cloud1, cloud2, cloud3, cloud4]
_start_position()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
print(xSpeed)
for cloud in clouds:
if cloud.global_position.x + xSpeed < rightBorder.global_position.x:
cloud.global_position.x = cloud.global_position.x + xSpeed
else:
cloud.global_position.x = leftBorder.global_position.x
func _start_position():
rng.randomize()
for cloud in clouds:
var y = rng.randi_range(topBorder.global_position.y, bottomBorder.global_position.y)
var x = rng.randi_range(leftBorder.global_position.x, rightBorder.global_position.x)
cloud.global_position = Vector2(x, y)

251
scenes/TileMap.tscn Normal file
View File

@ -0,0 +1,251 @@
[gd_scene load_steps=20 format=2]
[ext_resource path="res://roger-roger/tilemap/streetSideTop.png" type="Texture" id=1]
[ext_resource path="res://roger-roger/tilemap/StreetVerticalLeft.png" type="Texture" id=2]
[ext_resource path="res://roger-roger/tilemap/streetSideBottom.png" type="Texture" id=3]
[ext_resource path="res://roger-roger/tilemap/sidewalk.png" type="Texture" id=4]
[ext_resource path="res://roger-roger/tilemap/StreetVerticalRight.png" type="Texture" id=5]
[ext_resource path="res://roger-roger/tilemap/grass1.png" type="Texture" id=6]
[ext_resource path="res://roger-roger/tilemap/justRoad.png" type="Texture" id=7]
[ext_resource path="res://roger-roger/tilemap/sandbar2.png" type="Texture" id=8]
[ext_resource path="res://roger-roger/tilemap/railroad.png" type="Texture" id=9]
[ext_resource path="res://roger-roger/tilemap/ocean1.png" type="Texture" id=10]
[ext_resource path="res://roger-roger/tilemap/ocean2.png" type="Texture" id=11]
[ext_resource path="res://roger-roger/tilemap/sandbar1.png" type="Texture" id=12]
[sub_resource type="ConvexPolygonShape2D" id=4]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=5]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=6]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=7]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=3]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="ConvexPolygonShape2D" id=8]
points = PoolVector2Array( 0, 0, 16, 0, 16, 16, 0, 16 )
[sub_resource type="TileSet" id=2]
0/name = "StreetVerticalRight.png 0"
0/texture = ExtResource( 5 )
0/tex_offset = Vector2( 0, 0 )
0/modulate = Color( 1, 1, 1, 1 )
0/region = Rect2( 0, 0, 16, 16 )
0/tile_mode = 0
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_one_way = false
0/shape_one_way_margin = 0.0
0/shapes = [ ]
0/z_index = 0
1/name = "StreetVerticalLeft.png 1"
1/texture = ExtResource( 2 )
1/tex_offset = Vector2( 0, 0 )
1/modulate = Color( 1, 1, 1, 1 )
1/region = Rect2( 0, 0, 16, 16 )
1/tile_mode = 0
1/occluder_offset = Vector2( 0, 0 )
1/navigation_offset = Vector2( 0, 0 )
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
3/name = "sidewalk.png 3"
3/texture = ExtResource( 4 )
3/tex_offset = Vector2( 0, 0 )
3/modulate = Color( 1, 1, 1, 1 )
3/region = Rect2( 0, 0, 16, 16 )
3/tile_mode = 0
3/occluder_offset = Vector2( 0, 0 )
3/navigation_offset = Vector2( 0, 0 )
3/shape_offset = Vector2( 0, 0 )
3/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
3/shape_one_way = false
3/shape_one_way_margin = 0.0
3/shapes = [ ]
3/z_index = 0
5/name = "streetSideBottom.png 5"
5/texture = ExtResource( 3 )
5/tex_offset = Vector2( 0, 0 )
5/modulate = Color( 1, 1, 1, 1 )
5/region = Rect2( 0, 0, 16, 16 )
5/tile_mode = 0
5/occluder_offset = Vector2( 0, 0 )
5/navigation_offset = Vector2( 0, 0 )
5/shape_offset = Vector2( 0, 0 )
5/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
5/shape_one_way = false
5/shape_one_way_margin = 0.0
5/shapes = [ ]
5/z_index = 0
6/name = "streetSideTop.png 6"
6/texture = ExtResource( 1 )
6/tex_offset = Vector2( 0, 0 )
6/modulate = Color( 1, 1, 1, 1 )
6/region = Rect2( 0, 0, 16, 16 )
6/tile_mode = 0
6/occluder_offset = Vector2( 0, 0 )
6/navigation_offset = Vector2( 0, 0 )
6/shape_offset = Vector2( 0, 0 )
6/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
6/shape_one_way = false
6/shape_one_way_margin = 0.0
6/shapes = [ ]
6/z_index = 0
7/name = "grass1.png 7"
7/texture = ExtResource( 6 )
7/tex_offset = Vector2( 0, 0 )
7/modulate = Color( 1, 1, 1, 1 )
7/region = Rect2( 0, 0, 16, 16 )
7/tile_mode = 0
7/occluder_offset = Vector2( 0, 0 )
7/navigation_offset = Vector2( 0, 0 )
7/shape_offset = Vector2( 0, 0 )
7/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
7/shape = SubResource( 3 )
7/shape_one_way = false
7/shape_one_way_margin = 1.0
7/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 3 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
7/z_index = 0
8/name = "justRoad.png 8"
8/texture = ExtResource( 7 )
8/tex_offset = Vector2( 0, 0 )
8/modulate = Color( 1, 1, 1, 1 )
8/region = Rect2( 0, 0, 16, 16 )
8/tile_mode = 0
8/occluder_offset = Vector2( 0, 0 )
8/navigation_offset = Vector2( 0, 0 )
8/shape_offset = Vector2( 0, 0 )
8/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
8/shape_one_way = false
8/shape_one_way_margin = 0.0
8/shapes = [ ]
8/z_index = 0
9/name = "sandbar1.png 9"
9/texture = ExtResource( 12 )
9/tex_offset = Vector2( 0, 0 )
9/modulate = Color( 1, 1, 1, 1 )
9/region = Rect2( 0, 0, 16, 16 )
9/tile_mode = 0
9/occluder_offset = Vector2( 0, 0 )
9/navigation_offset = Vector2( 0, 0 )
9/shape_offset = Vector2( 0, 0 )
9/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
9/shape = SubResource( 8 )
9/shape_one_way = false
9/shape_one_way_margin = 1.0
9/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 8 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
9/z_index = 0
10/name = "sandbar2.png 10"
10/texture = ExtResource( 8 )
10/tex_offset = Vector2( 0, 0 )
10/modulate = Color( 1, 1, 1, 1 )
10/region = Rect2( 0, 0, 16, 16 )
10/tile_mode = 0
10/occluder_offset = Vector2( 0, 0 )
10/navigation_offset = Vector2( 0, 0 )
10/shape_offset = Vector2( 0, 0 )
10/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
10/shape = SubResource( 4 )
10/shape_one_way = false
10/shape_one_way_margin = 1.0
10/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 4 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
10/z_index = 0
11/name = "railroad.png 11"
11/texture = ExtResource( 9 )
11/tex_offset = Vector2( 0, 0 )
11/modulate = Color( 1, 1, 1, 1 )
11/region = Rect2( 0, 0, 16, 16 )
11/tile_mode = 0
11/occluder_offset = Vector2( 0, 0 )
11/navigation_offset = Vector2( 0, 0 )
11/shape_offset = Vector2( 0, 0 )
11/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
11/shape = SubResource( 5 )
11/shape_one_way = false
11/shape_one_way_margin = 1.0
11/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 5 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
11/z_index = 0
12/name = "ocean1.png 12"
12/texture = ExtResource( 10 )
12/tex_offset = Vector2( 0, 0 )
12/modulate = Color( 1, 1, 1, 1 )
12/region = Rect2( 0, 0, 16, 16 )
12/tile_mode = 0
12/occluder_offset = Vector2( 0, 0 )
12/navigation_offset = Vector2( 0, 0 )
12/shape_offset = Vector2( 0, 0 )
12/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
12/shape = SubResource( 6 )
12/shape_one_way = false
12/shape_one_way_margin = 1.0
12/shapes = [ {
"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 )
} ]
12/z_index = 0
13/name = "ocean2.png 13"
13/texture = ExtResource( 11 )
13/tex_offset = Vector2( 0, 0 )
13/modulate = Color( 1, 1, 1, 1 )
13/region = Rect2( 0, 0, 16, 16 )
13/tile_mode = 0
13/occluder_offset = Vector2( 0, 0 )
13/navigation_offset = Vector2( 0, 0 )
13/shape_offset = Vector2( 0, 0 )
13/shape_transform = Transform2D( 1, 0, 0, 1, 0, 0 )
13/shape = SubResource( 7 )
13/shape_one_way = false
13/shape_one_way_margin = 1.0
13/shapes = [ {
"autotile_coord": Vector2( 0, 0 ),
"one_way": false,
"one_way_margin": 1.0,
"shape": SubResource( 7 ),
"shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
} ]
13/z_index = 0
[node name="TileMap" type="TileMap"]
scale = Vector2( 5, 5 )
tile_set = SubResource( 2 )
cell_size = Vector2( 16, 16 )
show_collision = true
format = 1

14
scenes/bushes.tscn Normal file
View File

@ -0,0 +1,14 @@
[gd_scene load_steps=4 format=2]
[ext_resource path="res://scenes/Bush2.tscn" type="PackedScene" id=1]
[ext_resource path="res://scenes/Bush1.tscn" type="PackedScene" id=2]
[ext_resource path="res://scripts/bushes.gd" type="Script" id=3]
[node name="Node2D" type="Node2D"]
script = ExtResource( 3 )
[node name="Bush1" parent="." instance=ExtResource( 2 )]
position = Vector2( 31, 4 )
[node name="Bush4" parent="." instance=ExtResource( 1 )]
position = Vector2( -35, -4 )

333
scenes/level2.tscn Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

16
scripts/Sprite.gd Normal file
View File

@ -0,0 +1,16 @@
extends Sprite
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass

19
scripts/bushes.gd Normal file
View File

@ -0,0 +1,19 @@
extends Node2D
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
onready var bush1 = $Bush1/Sprite
onready var bush2 = $Bush4/Sprite
# Called when the node enters the scene tree for the first time.
func _ready():
bush1.set_modulate(Color(0.75, 0.75, 0.75))
bush2.set_modulate(Color(0.75, 0.75, 0.75))
# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass