Skip to content

Commit

Permalink
Port game from Godot 2.1 to 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
henriiquecampos committed Feb 6, 2019
1 parent 1f6e09f commit 20584c7
Show file tree
Hide file tree
Showing 185 changed files with 7,732 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

export\.cfg
.import/
2 changes: 1 addition & 1 deletion source/Levels/level_0-0.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[ext_resource path="res://Actors/Blackhole/Blackhole.tscn" type="PackedScene" id=5]
[ext_resource path="res://Actors/Star/Star.tscn" type="PackedScene" id=6]
[ext_resource path="res://Actors/Comet/Comet.tscn" type="PackedScene" id=7]
[ext_resource path="res://Levels/Background.tscn" type="PackedScene" id=8]
[ext_resource path="res://Levels/background.tscn" type="PackedScene" id=8]

[sub_resource type="LineShape2D" id=1]

Expand Down
3 changes: 2 additions & 1 deletion source/Screens/Credits_Screen/CreditsScreen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
[ext_resource path="res://Screens/GaroaHackerClubeBold.otf" type="DynamicFontData" id=3]
[ext_resource path="res://Screens/ShaderButton.tscn" type="PackedScene" id=4]
[ext_resource path="res://Screens/Credits_Screen/pig_normal.png" type="Texture" id=5]
[ext_resource path="res://Levels/Background.tscn" type="PackedScene" id=6]
[ext_resource path="res://Screens/BackgroundComet.tscn" type="PackedScene" id=6]
[ext_resource path="res://Screens/Score_Screen/back_normal.png" type="Texture" id=7]




[sub_resource type="GDScript" id=1]

script/source = "extends \"res://Screens/abstract_screen.gd\"
Expand Down
6 changes: 4 additions & 2 deletions source/Screens/Play_Screen/PlayScreen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

[ext_resource path="res://Screens/Abstract Screen.tscn" type="PackedScene" id=1]
[ext_resource path="res://Screens/Play_Screen/play_screen.gd" type="Script" id=2]
[ext_resource path="res://Levels/Level_0-0.tscn" type="PackedScene" id=3]
[ext_resource path="res://Levels/level_0-0.tscn" type="PackedScene" id=3]
[ext_resource path="res://Screens/GaroaHackerClubeBold.otf" type="DynamicFontData" id=4]
[ext_resource path="res://GUI/Helper.tscn" type="PackedScene" id=5]
[ext_resource path="res://GUI/helper.tscn" type="PackedScene" id=5]



[sub_resource type="Animation" id=1]

Expand Down
3 changes: 2 additions & 1 deletion source/Screens/Score_Screen/ScoreScreen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@
[ext_resource path="res://Screens/GaroaHackerClubeBold.otf" type="DynamicFontData" id=4]
[ext_resource path="res://Screens/ShaderButton.tscn" type="PackedScene" id=5]
[ext_resource path="res://Screens/Score_Screen/retry_normal.png" type="Texture" id=6]
[ext_resource path="res://Levels/Background.tscn" type="PackedScene" id=7]
[ext_resource path="res://Levels/background.tscn" type="PackedScene" id=7]
[ext_resource path="res://Screens/Score_Screen/back_normal.png" type="Texture" id=8]




[sub_resource type="DynamicFont" id=1]

font/size = 80
Expand Down
2 changes: 1 addition & 1 deletion source/Screens/Title_Screen/TitleScreen.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[ext_resource path="res://Screens/Abstract Screen.tscn" type="PackedScene" id=1]
[ext_resource path="res://Screens/Title_Screen/title_screen.gd" type="Script" id=2]
[ext_resource path="res://Levels/Background.tscn" type="PackedScene" id=3]
[ext_resource path="res://Levels/background.tscn" type="PackedScene" id=3]
[ext_resource path="res://Screens/ShaderButton.tscn" type="PackedScene" id=4]
[ext_resource path="res://Screens/Title_Screen/achievement_button.png" type="Texture" id=5]
[ext_resource path="res://Screens/Title_Screen/tittle.png" type="Texture" id=6]
Expand Down
83 changes: 83 additions & 0 deletions source_3.1/Acheesements.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
[gd_scene load_steps=5 format=2]

[ext_resource path="res://acheesements.gd" type="Script" id=1]
[ext_resource path="res://Screens/popuptheme.tres" type="Theme" id=2]
[ext_resource path="res://Screens/GaroaHackerClubeBold.otf" type="DynamicFontData" id=3]

[sub_resource type="DynamicFont" id=1]

use_mipmaps = true
use_filter = true
font_data = ExtResource( 3 )

[node name="Acheesements" type="CanvasLayer"]
layer = 10
script = ExtResource( 1 )
file_path = "res://Screens/Achievements_Screen/achievements.json"

[node name="Popup" type="WindowDialog" parent="."]
margin_left = 471.0
margin_top = -408.0
margin_right = 858.0
margin_bottom = -303.0
theme = ExtResource( 2 )
window_title = "ACHEESEMENT UNLOCKED"

[node name="Label" type="Label" parent="Popup"]
margin_right = 387.0
margin_bottom = 102.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
text = "ACHIEVEMENT UNLOCKED"
align = 1
valign = 1
autowrap = true
clip_text = true

[node name="Timer" type="Timer" parent="."]
wait_time = 2.0
one_shot = true

[node name="Tween" type="Tween" parent="."]

[node name="Panel" type="Panel" parent="."]
visible = false
margin_left = 473.0
margin_top = 25.0
margin_right = 857.0
margin_bottom = 147.0
theme = ExtResource( 2 )

[node name="Title" type="Label" parent="Panel"]
margin_left = -2.0
margin_top = 12.0
margin_right = 385.0
margin_bottom = 35.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_fonts/font = SubResource( 1 )
custom_colors/font_color = Color( 1, 1, 1, 1 )
text = "ACHIEVEMENT UNLOCKED"
align = 1
valign = 1
clip_text = true

[node name="Label" type="Label" parent="Panel"]
margin_left = -2.0
margin_top = 21.0
margin_right = 385.0
margin_bottom = 123.0
mouse_filter = 1
size_flags_horizontal = 3
size_flags_vertical = 3
custom_colors/font_color = Color( 1, 0.901961, 0.501961, 1 )
text = "ACHIEVEMENT UNLOCKED"
align = 1
valign = 1
autowrap = true
clip_text = true

[connection signal="popup_hide" from="Popup" to="." method="_on_hide"]
[connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"]
Binary file added source_3.1/Actors/Astromouse/1_jump.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions source_3.1/Actors/Astromouse/1_jump.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/1_jump.wav-6956c895a12f744ff95820631e679535.sample"

[deps]

source_file="res://Actors/Astromouse/1_jump.wav"
dest_files=[ "res://.import/1_jump.wav-6956c895a12f744ff95820631e679535.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop=false
compress/mode=0
Binary file added source_3.1/Actors/Astromouse/2_falling.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions source_3.1/Actors/Astromouse/2_falling.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/2_falling.wav-04beb6fde9b8c07658e4420f9c5823ae.sample"

[deps]

source_file="res://Actors/Astromouse/2_falling.wav"
dest_files=[ "res://.import/2_falling.wav-04beb6fde9b8c07658e4420f9c5823ae.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop=false
compress/mode=0
Binary file added source_3.1/Actors/Astromouse/3_landing.wav
Binary file not shown.
21 changes: 21 additions & 0 deletions source_3.1/Actors/Astromouse/3_landing.wav.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[remap]

importer="wav"
type="AudioStreamSample"
path="res://.import/3_landing.wav-0ae06ccfb5ad9fcbd41e038e4bfabace.sample"

[deps]

source_file="res://Actors/Astromouse/3_landing.wav"
dest_files=[ "res://.import/3_landing.wav-0ae06ccfb5ad9fcbd41e038e4bfabace.sample" ]

[params]

force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=true
edit/normalize=true
edit/loop=false
compress/mode=0
123 changes: 123 additions & 0 deletions source_3.1/Actors/Astromouse/Astromouse.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
[gd_scene load_steps=11 format=2]

[ext_resource path="res://Actors/Astromouse/astromouse.gd" type="Script" id=1]
[ext_resource path="res://Actors/Astromouse/astromouse_spritesheet.png" type="Texture" id=2]
[ext_resource path="res://Actors/Astromouse/3_landing.wav" type="AudioStream" id=3]
[ext_resource path="res://Actors/Astromouse/2_falling.wav" type="AudioStream" id=4]
[ext_resource path="res://Actors/Astromouse/1_jump.wav" type="AudioStream" id=5]
[ext_resource path="res://Objects/Cheese/pickup.wav" type="AudioStream" id=6]

[sub_resource type="RectangleShape2D" id=1]

extents = Vector2( 24.8363, 35.3636 )

[sub_resource type="Animation" id=2]

tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:rotation_degrees")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ -360.0, 0.0 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Sprite:scale")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.5 ),
"transitions": PoolRealArray( 1, 1 ),
"update": 0,
"values": [ Vector2( 0.7, 0.7 ), Vector2( 1e-05, 1e-05 ) ]
}

[sub_resource type="Animation" id=3]

length = 0.5
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.3 ),
"transitions": PoolRealArray( 1, 1, 1 ),
"update": 1,
"values": [ 2, 4, 3 ]
}

[sub_resource type="Animation" id=4]

length = 0.4
loop = true
tracks/0/type = "value"
tracks/0/path = NodePath("Sprite:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.2, 0.3 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 1,
"values": [ 0, 1, 5, 4 ]
}

[node name="Astromouse" type="RigidBody2D" groups=[
"player",
]]
z_index = 3
mode = 2
gravity_scale = 12.0
contacts_reported = 4
contact_monitor = true
script = ExtResource( 1 )
jump_force = 500.0

[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0.880484, -1.02943 )
rotation = -6.28319
scale = Vector2( 0.7, 0.7 )
texture = ExtResource( 2 )
offset = Vector2( 6.51268, -9.69908 )
vframes = 4
hframes = 2

[node name="Shape" type="CollisionShape2D" parent="."]
position = Vector2( 35.6549, -6.50709 )
rotation = -1.5708
shape = SubResource( 1 )

[node name="Animator" type="AnimationPlayer" parent="."]
playback_speed = 0.9
anims/death = SubResource( 2 )
anims/jumping = SubResource( 3 )
anims/walking = SubResource( 4 )

[node name="Timer" type="Timer" parent="."]
wait_time = 1.3
one_shot = true
autostart = true

[node name="Damage" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 3 )

[node name="Finished" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 4 )

[node name="Jump" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 5 )

[node name="Pickup" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 6 )

[connection signal="body_entered" from="." to="." method="_body_enter"]
[connection signal="timeout" from="Timer" to="." method="_invulnerability"]
14 changes: 14 additions & 0 deletions source_3.1/Actors/Astromouse/SFX.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[gd_scene load_steps=2 format=2]

[sub_resource type="GDScript" id=1]

script/source = "extends AudioStreamPlayer2D

signal is_playing(what)

func _on_SFX_is_playing( what ):
play(what)"

[node name="SFX" type="AudioStreamPlayer2D"]
script = SubResource( 1 )

Loading

0 comments on commit 20584c7

Please sign in to comment.