cutscenes (WIP)

This commit is contained in:
Page Asgardius 2024-04-22 15:19:53 -07:00
parent 32ec84364c
commit cf76a79628
11 changed files with 351 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 KiB

View file

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://coc14j3ju0w16"
path="res://.godot/imported/kaizoclassroom.jpg-6801ae3d9f969809a8ba50806dab5a41.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://backgounds/kaizoclassroom.jpg"
dest_files=["res://.godot/imported/kaizoclassroom.jpg-6801ae3d9f969809a8ba50806dab5a41.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

View file

@ -0,0 +1,22 @@
[gd_scene load_steps=3 format=3 uid="uid://bas0dcw1pwaxa"]
[ext_resource type="Texture2D" uid="uid://coc14j3ju0w16" path="res://backgounds/kaizoclassroom.jpg" id="1_lebbt"]
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="2_qhxdm"]
[node name="Opening" type="Node2D"]
[node name="TextureRect" type="TextureRect" parent="."]
offset_right = 40.0
offset_bottom = 40.0
texture = ExtResource("1_lebbt")
[node name="Text" type="Label" parent="."]
offset_left = 52.0
offset_top = 606.0
offset_right = 1224.0
offset_bottom = 714.0
theme_override_font_sizes/font_size = 40
text = "CUTSCENE_0_0"
horizontal_alignment = 1
[node name="Bottomhud" parent="." instance=ExtResource("2_qhxdm")]

108
levels/ui/Cutscenes.gd Normal file
View file

@ -0,0 +1,108 @@
extends Node2D
var level
var player
var music
var bgsound := AudioStreamPlayer.new()
var sfx1 := AudioStreamPlayer.new()
var musictrack
var isboss
var bhud = load("res://levels/bottomhud.tscn").instantiate()
var ishud = true
# Called when the node enters the scene tree for the first time.
func _ready():
add_child(bgsound)
add_child(sfx1)
if Global.debug:
level = load(Global.places[Global.dplace[0]][Global.dplace[1]][Global.dplace[2]][0]).instantiate()
#player = load(Global.pchars[Global.dcpchar]).instantiate()
musictrack = Global.musictracks[Global.places[Global.dplace[0]][Global.dplace[1]][Global.dplace[2]][1]]
isboss = Global.places[Global.dplace[0]][Global.dplace[1]][Global.dplace[2]][2]
else:
level = load(Global.places[Global.cplace[0]][Global.cplace[1]][Global.cplace[2]][0]).instantiate()
# player = load(Global.pchars[Global.cpchar]).instantiate()
musictrack = Global.musictracks[Global.places[Global.cplace[0]][Global.cplace[1]][Global.cplace[2]][1]]
isboss = Global.places[Global.cplace[0]][Global.cplace[1]][Global.cplace[2]][2]
#if Global.cspawnarea[0] != null && Global.cspawnarea[0] != null:
# player.position.x = Global.cspawnarea[0]
# player.position.y = Global.cspawnarea[1]
#elif Global.debug:
# player.position.x = Global.places[Global.dplace[0]][Global.dplace[1]][Global.dplace[2]][1]
# player.position.y = Global.places[Global.dplace[0]][Global.dplace[1]][Global.dplace[2]][2]
#else:
# player.position.x = Global.places[Global.cplace[0]][Global.cplace[1]][Global.cplace[2]][1]
# player.position.y = Global.places[Global.cplace[0]][Global.cplace[1]][Global.cplace[2]][2]
music = load(musictrack)
get_tree().root.add_child.call_deferred(level)
get_tree().root.add_child.call_deferred(bhud)
#get_tree().root.add_child.call_deferred(player)
bgsound.stream = music
if !isboss:
bgsound.play(0)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
Global.xm = 0
Global.ym = 0
var velocity = Vector2.ZERO
if Global.live == 1 && !Input.is_key_pressed(KEY_V) && !Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER):
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
Global.xm = Input.get_joy_axis(0,JOY_AXIS_LEFT_X)
Global.ym = Input.get_joy_axis(0,JOY_AXIS_LEFT_Y)
else:
if Input.is_action_pressed("ui_left"):
Global.xm = -1
if Input.is_action_pressed("ui_right"):
Global.xm = 1
if Input.is_action_pressed("ui_up"):
Global.ym = -1
if Input.is_action_pressed("ui_down"):
Global.ym = 1
#velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta
func _input(event):
if (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_BACK)) && Global.cdialog == []:
Global.live = 0
Global.bossready = false
get_tree().root.remove_child(bhud)
get_tree().root.remove_child(player)
get_tree().root.remove_child(level)
if Global.debug:
get_tree().change_scene_to_file("res://levels/ui/scene.tscn")
else:
get_tree().change_scene_to_file("res://title.tscn")
if (Global.live == 1 && (Input.is_key_pressed(KEY_V) && Input.is_key_pressed(KEY_UP)) ||(Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) && Input.is_joy_button_pressed(0,JOY_BUTTON_DPAD_UP))):
if Global.debug:
if Global.dparty[0][0] != null:
Global.dcpchar = 0
else:
if Global.party[0][0] != null:
Global.cpchar = 0
elif (Global.live == 1 && (Input.is_key_pressed(KEY_V) && Input.is_key_pressed(KEY_RIGHT)) ||(Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) && Input.is_joy_button_pressed(0,JOY_BUTTON_DPAD_RIGHT))):
if Global.debug:
if Global.dparty[1][0] != null:
Global.dcpchar = 1
else:
if Global.party[1][0] != null:
Global.cpchar = 1
elif (Global.live == 1 && (Input.is_key_pressed(KEY_V) && Input.is_key_pressed(KEY_DOWN)) ||(Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) && Input.is_joy_button_pressed(0,JOY_BUTTON_DPAD_DOWN))):
if Global.debug:
if Global.dparty[2][0] != null:
Global.dcpchar = 2
else:
if Global.party[2][0] != null:
Global.cpchar = 2
elif (Global.live == 1 && (Input.is_key_pressed(KEY_V) && Input.is_key_pressed(KEY_LEFT)) ||(Input.is_joy_button_pressed(0,JOY_BUTTON_RIGHT_SHOULDER) && Input.is_joy_button_pressed(0,JOY_BUTTON_DPAD_LEFT))):
if Global.debug:
if Global.dparty[3][0] != null:
Global.dcpchar = 3
else:
if Global.party[3][0] != null:
Global.cpchar = 3
if Global.bossready:
Global.bossready = false
sfx1.stream = load(Global.sfxtracks[1])
sfx1.play(0)
bgsound.play(0)

6
levels/ui/Cutscenes.tscn Normal file
View file

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://u41wdqnqka86"]
[ext_resource type="Script" path="res://levels/ui/Cutscenes.gd" id="1_oqyxp"]
[node name="Cutscenes" type="Node2D"]
script = ExtResource("1_oqyxp")

61
levels/ui/newgame.gd Normal file
View file

@ -0,0 +1,61 @@
extends Control
func _ready():
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
$VBoxContainer/Thisfirst.grab_focus()
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _level():
# This is like autoloading the scene, only
# it happens after already loading the main scene.
get_tree().change_scene_to_file("res://backgounds/wip.tscn")
#Global.live = 1
#Global.gamelevel = randi() % 3
#if Global.gamelevel == 0:
# get_tree().change_scene_to_file("res://backgounds/galaxy.tscn")
#elif Global.gamelevel == 1:
# get_tree().change_scene_to_file("res://backgounds/wormhole.tscn")
#else:
# get_tree().change_scene_to_file("res://backgounds/abstract.tscn")
#get_tree().root.add_child(title)
#get_tree().root.remove_child(boot)
#boot.queue_free()
func _input(event):
if Input.is_action_just_pressed("ui_cancel"):
get_tree().change_scene_to_file("res://levels/ui/tmenu.tscn")
# Mouse in viewport coordinates.
# if Input.is_key_pressed(KEY_ENTER) || Input.is_joy_button_pressed(0,JOY_BUTTON_B):
#print("Mouse Click/Unclick at: ", event.position)
# if highlighted == 1:
# _on_debug_pressed()
# if highlighted == 2:
# _on_exit_pressed()
# else:
# _on_start_pressed()
# elif Input.is_action_pressed("ui_up"):
# focus_next
func _on_exit_pressed():
get_tree().change_scene_to_file("res://levels/ui/tmenu.tscn")
#pass # Replace with function body.
func _on_noob_pressed():
pass # Replace with function body.
func _on_thisfirst_pressed():
pass # Replace with function body.
func _on_challenge_pressed():
pass # Replace with function body.
func _on_maniac_pressed():
pass # Replace with function body.

91
levels/ui/newgame.tscn Normal file
View file

@ -0,0 +1,91 @@
[gd_scene load_steps=7 format=3 uid="uid://bpotg1c8rsa8f"]
[ext_resource type="Script" path="res://levels/ui/newgame.gd" id="1_b1c5v"]
[ext_resource type="Texture2D" uid="uid://bxa27c7gnivwx" path="res://backgounds/night-sky-at-ceres.jpg" id="2_p7hqh"]
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_3l41g"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_821nm"]
bg_color = Color(0, 0.8, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6u0xs"]
bg_color = Color(0, 0.8, 0, 1)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_r2qrn"]
bg_color = Color(0, 0.8, 0, 1)
[node name="Tmenu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_b1c5v")
[node name="Night Sky" type="TextureRect" parent="."]
layout_mode = 0
offset_right = 1280.0
offset_bottom = 720.0
texture = ExtResource("2_p7hqh")
[node name="Game name" type="Label" parent="."]
layout_mode = 0
offset_left = 31.0
offset_top = -5.0
offset_right = 1237.0
offset_bottom = 125.0
theme_override_font_sizes/font_size = 95
text = "BUTTON_START"
horizontal_alignment = 1
[node name="Bottomhud" parent="." instance=ExtResource("3_3l41g")]
layout_mode = 1
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 7
anchor_left = 0.5
anchor_top = 1.0
anchor_right = 0.5
anchor_bottom = 1.0
offset_left = -322.0
offset_top = -362.0
offset_right = 322.0
grow_horizontal = 2
grow_vertical = 0
[node name="Noob" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 80
theme_override_styles/focus = SubResource("StyleBoxFlat_821nm")
text = "START_NOOB"
[node name="Thisfirst" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 80
theme_override_styles/focus = SubResource("StyleBoxFlat_6u0xs")
text = "START_THISFIRST"
[node name="Challenge" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 80
theme_override_styles/focus = SubResource("StyleBoxFlat_821nm")
text = "START_CHALLENGE"
[node name="Maniac" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 80
theme_override_styles/focus = SubResource("StyleBoxFlat_6u0xs")
text = "START_MANIAC"
[node name="Exit" type="Button" parent="VBoxContainer"]
layout_mode = 2
theme_override_font_sizes/font_size = 80
theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn")
text = "BUTTON_RETURN"
[connection signal="pressed" from="VBoxContainer/Noob" to="." method="_on_noob_pressed"]
[connection signal="pressed" from="VBoxContainer/Thisfirst" to="." method="_on_thisfirst_pressed"]
[connection signal="pressed" from="VBoxContainer/Challenge" to="." method="_on_challenge_pressed"]
[connection signal="pressed" from="VBoxContainer/Maniac" to="." method="_on_maniac_pressed"]
[connection signal="pressed" from="VBoxContainer/Exit" to="." method="_on_exit_pressed"]

View file

@ -29,7 +29,13 @@ func _physics_process(delta):
func _on_body_entered(body): func _on_body_entered(body):
if !body.is_in_group(btype): if !body.is_in_group(btype):
if body.is_in_group("players") || body.is_in_group("boss") || body.is_in_group("enemies"): if body.is_in_group("players"):
if body.weakness == speciality:
print("weakness")
Input.start_joy_vibration(0,0,1,3)
else:
Input.start_joy_vibration(0,1,0,2)
elif body.is_in_group("boss") || body.is_in_group("enemies"):
if body.weakness == speciality: if body.weakness == speciality:
print("weakness") print("weakness")
#if body.is_in_group("players"): #if body.is_in_group("players"):

View file

@ -25,9 +25,15 @@ func _physics_process(delta):
func _on_body_entered(body): func _on_body_entered(body):
if !body.is_in_group(btype): if !body.is_in_group(btype):
if body.is_in_group("players") || body.is_in_group("boss") || body.is_in_group("enemies"): if body.is_in_group("players"):
if body.weakness == 3: if body.weakness == 3:
print("weak to fire") print("weakness")
Input.start_joy_vibration(0,0,1,3)
else:
Input.start_joy_vibration(0,1,0,2)
elif body.is_in_group("boss") || body.is_in_group("enemies"):
if body.weakness == 3:
print("weakness")
#if body.is_in_group("players"): #if body.is_in_group("players"):
# Global.live = 2 # Global.live = 2
#elif body.is_in_group("enemies"): #elif body.is_in_group("enemies"):

View file

@ -24,10 +24,16 @@ func _physics_process(delta):
func _on_body_entered(body): func _on_body_entered(body):
if !body.is_in_group(btype): if !body.is_in_group(btype) && Global.live == 1:
if body.is_in_group("players") || body.is_in_group("boss") || body.is_in_group("enemies"): if body.is_in_group("players"):
if body.weakness == 0: if body.weakness == 0:
print("weak to ice") print("weakness")
Input.start_joy_vibration(0,0,1,3)
else:
Input.start_joy_vibration(0,1,0,2)
elif body.is_in_group("boss") || body.is_in_group("enemies"):
if body.weakness == 0:
print("weakness")
#if body.is_in_group("players"): #if body.is_in_group("players"):
# Global.live = 2 # Global.live = 2
#elif body.is_in_group("enemies"): #elif body.is_in_group("enemies"):

View file

@ -7,6 +7,10 @@ BUTTON_START;Start;Iniciar;始める
BUTTON_DEBUG;Debug;Depurar;デバッグ BUTTON_DEBUG;Debug;Depurar;デバッグ
MENU_DEBUG;Debug Menu;Menú de Depuración;デバッグメニュー MENU_DEBUG;Debug Menu;Menú de Depuración;デバッグメニュー
BUTTON_EXIT;Exit;Salir;このゲームを終了する BUTTON_EXIT;Exit;Salir;このゲームを終了する
START_NOOB;Coward;Cobarde;腰抜け
START_THISFIRST;Try this First;Prueba Esto Primero;まずはこれを試してください
START_CHALLENGE;True Challenge;Reto Verdadero;真の挑戦
START_MANIAC;Madness;Locura;弾幕
BUTTON_RETURN;Return;Atrás;戻る BUTTON_RETURN;Return;Atrás;戻る
BUTTON_GAMEPADTEST;Gamepad Test;Prueba de mando;ゲームパッドテスト BUTTON_GAMEPADTEST;Gamepad Test;Prueba de mando;ゲームパッドテスト
BUTTON_SCENESELECT;Scene Selector;Selector de escena;シーンセレクター BUTTON_SCENESELECT;Scene Selector;Selector de escena;シーンセレクター
@ -60,4 +64,4 @@ DIALOG_CERES_L20_0;I wont be a healer;No seré una sanadora;私はヒーラ
DIALOG_CERES_L20_1;I want a friendly challenge, loser will obey the winner;Haremos un reto amistoso, El perdedor obedecerá al ganador;友好的な挑戦をしたい、負けた者は勝者に従う DIALOG_CERES_L20_1;I want a friendly challenge, loser will obey the winner;Haremos un reto amistoso, El perdedor obedecerá al ganador;友好的な挑戦をしたい、負けた者は勝者に従う
DIALOG_CERES_L20_2;My magic wand VS your bow;Mi vara mágica contra tu arco;私の魔法の杖 VS あなたの弓 DIALOG_CERES_L20_2;My magic wand VS your bow;Mi vara mágica contra tu arco;私の魔法の杖 VS あなたの弓
CERES_L20_DESC;Kimberlys Challenge;Reto de Kimberly;キンバリーの挑戦 CERES_L20_DESC;Kimberlys Challenge;Reto de Kimberly;キンバリーの挑戦
CUTSCENE_0_0;most underrated children will be the best magicians - Falcighol Arch, Kaizo Magic School founder;Los niños más subestimados serán los mejores magos - Falcighol Arch, fundador de la Escuela de Magia Kaizo;最も過小評価されている子供たちが最高のマジシャンになるだろう - ファルシゴール・アーチ、カイゾー・マジック・スクール創設者 CUTSCENE_0_0;most underrated children will be the best magicians\nFalcighol Arch, Kaizo Magic School founder;Los niños más subestimados serán los mejores magos\nFalcighol Arch, fundador de la Escuela de Magia Kaizo;最も過小評価されている子供たちが最高のマジシャンになるだろう\nファルシゴール・アーチ、カイゾー・マジック・スクール創設者

1 en es ja
7 BUTTON_DEBUG Debug Depurar デバッグ
8 MENU_DEBUG Debug Menu Menú de Depuración デバッグメニュー
9 BUTTON_EXIT Exit Salir このゲームを終了する
10 START_NOOB Coward Cobarde 腰抜け
11 START_THISFIRST Try this First Prueba Esto Primero まずはこれを試してください
12 START_CHALLENGE True Challenge Reto Verdadero 真の挑戦
13 START_MANIAC Madness Locura 弾幕
14 BUTTON_RETURN Return Atrás 戻る
15 BUTTON_GAMEPADTEST Gamepad Test Prueba de mando ゲームパッドテスト
16 BUTTON_SCENESELECT Scene Selector Selector de escena シーンセレクター
64 DIALOG_CERES_L20_1 I want a friendly challenge, loser will obey the winner Haremos un reto amistoso, El perdedor obedecerá al ganador 友好的な挑戦をしたい、負けた者は勝者に従う
65 DIALOG_CERES_L20_2 My magic wand VS your bow Mi vara mágica contra tu arco 私の魔法の杖 VS あなたの弓
66 CERES_L20_DESC Kimberly’s Challenge Reto de Kimberly キンバリーの挑戦
67 CUTSCENE_0_0 most underrated children will be the best magicians - Falcighol Arch, Kaizo Magic School founder most underrated children will be the best magicians\nFalcighol Arch, Kaizo Magic School founder Los niños más subestimados serán los mejores magos - Falcighol Arch, fundador de la Escuela de Magia Kaizo Los niños más subestimados serán los mejores magos\nFalcighol Arch, fundador de la Escuela de Magia Kaizo 最も過小評価されている子供たちが最高のマジシャンになるだろう - ファルシゴール・アーチ、カイゾー・マジック・スクール創設者 最も過小評価されている子供たちが最高のマジシャンになるだろう\nファルシゴール・アーチ、カイゾー・マジック・スクール創設者