Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Add Kaizo level and added reset to normal background music

The kaizo level can be done with a triple jump.
Used the oh goodness in .asset_donations
Don't really know how to

* Added Spike png

* added spikes to kaizo_lvl

* HalveBaseBlox

* Added spikes to kaizo level

* moved it into the music folder
  • Loading branch information
Elmar-Wiese authored Apr 18, 2022
1 parent 839c441 commit 1afcba1
Show file tree
Hide file tree
Showing 11 changed files with 200 additions and 5 deletions.
File renamed without changes.
15 changes: 15 additions & 0 deletions audio/music/oh goodness.mp3.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[remap]

importer="mp3"
type="AudioStreamMP3"
path="res://.import/oh goodness.mp3-cd2ba01ebb3e0c6a69a177f535ad8b80.mp3str"

[deps]

source_file="res://audio/music/oh goodness.mp3"
dest_files=[ "res://.import/oh goodness.mp3-cd2ba01ebb3e0c6a69a177f535ad8b80.mp3str" ]

[params]

loop=true
loop_offset=0
48 changes: 48 additions & 0 deletions scenes/boxes/HalveBaseBox.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
[gd_scene load_steps=6 format=2]

[ext_resource path="res://sprites/Spikes.png" type="Texture" id=1]
[ext_resource path="res://audio/sfx/meow.wav" type="AudioStream" id=2]
[ext_resource path="res://scripts/boxes/BaseBox.gd" type="Script" id=3]

[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 32, 14.75 )

[sub_resource type="RectangleShape2D" id=2]
extents = Vector2( 32, 4 )

[node name="halveBaseBox" type="Node2D"]
script = ExtResource( 3 )

[node name="box" type="Area2D" parent="."]
position = Vector2( 0, -17 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="box"]
shape = SubResource( 1 )
one_way_collision_margin = 128.0

[node name="Body" type="StaticBody2D" parent="."]
position = Vector2( 0, -17 )
collision_layer = 2

[node name="CollisionShape2D" type="CollisionShape2D" parent="Body"]
shape = SubResource( 1 )
one_way_collision_margin = 128.0

[node name="HitArea" type="Area2D" parent="."]
position = Vector2( 0, -1 )

[node name="CollisionShape2D" type="CollisionShape2D" parent="HitArea"]
position = Vector2( 0, -3 )
shape = SubResource( 2 )
one_way_collision_margin = 128.0

[node name="Sprite" type="Sprite" parent="."]
z_index = 10
texture = ExtResource( 1 )

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

[node name="MeowStream" type="AudioStreamPlayer2D" parent="."]
position = Vector2( 0, -14 )
stream = ExtResource( 2 )
bus = "sfx"
17 changes: 17 additions & 0 deletions scenes/boxes/SpikeBox.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://scenes/boxes/HalveBaseBox.tscn" type="PackedScene" id=1]
[ext_resource path="res://scripts/boxes/SpikeBox.gd" type="Script" id=3]

[node name="SpikeBox" instance=ExtResource( 1 )]
position = Vector2( 0, -3 )
script = ExtResource( 3 )

[node name="HitArea" parent="." index="2"]
position = Vector2( 0, 0 )

[node name="CollisionShape2D" parent="HitArea" index="0"]
position = Vector2( 0, -4 )

[node name="MeowStream" parent="." index="5"]
position = Vector2( 0, -17 )
10 changes: 10 additions & 0 deletions scenes/levels/Kaizo/Kaizo.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
extends TileMap


func _ready():
EventBus.emit_signal("bgm_changed", get_node("AudioStreamPlayer"))


func _exit_tree():
EventBus.emit_signal("bgm_changed", "reset")

51 changes: 51 additions & 0 deletions scenes/levels/Kaizo/Kaizo.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[gd_scene load_steps=9 format=2]

[ext_resource path="res://scenes/levels/TileSet.tres" type="TileSet" id=1]
[ext_resource path="res://sprites/bg-tile.png" type="Texture" id=2]
[ext_resource path="res://scenes/EndPortal.tscn" type="PackedScene" id=3]
[ext_resource path="res://scenes/title/Background.gd" type="Script" id=4]
[ext_resource path="res://scenes/SpawnPoint.tscn" type="PackedScene" id=5]
[ext_resource path="res://audio/music/oh goodness.mp3" type="AudioStream" id=6]
[ext_resource path="res://scenes/levels/Kaizo/Kaizo.gd" type="Script" id=7]
[ext_resource path="res://scenes/boxes/SpikeBox.tscn" type="PackedScene" id=8]

[node name="TileMap2" type="TileMap"]
tile_set = ExtResource( 1 )
collision_layer = 2
format = 1
tile_data = PoolIntArray( 8, 0, 0, 9, 0, 0, 10, 0, 0, 11, 0, 0, 12, 0, 0, 13, 0, 0, 14, 0, 0, 15, 0, 0, 16, 0, 0, 65544, 0, 0, 65545, 1, 0, 65546, 1, 0, 65547, 1, 0, 65548, 0, 0, 65549, 1, 0, 65550, 1, 0, 65551, 1, 0, 65552, 0, 0, 131080, 0, 0, 131081, 1, 0, 131082, 1, 0, 131083, 1, 0, 131084, 1, 0, 131085, 1, 0, 131086, 1, 0, 131087, 1, 0, 131088, 0, 0, 196616, 0, 0, 196617, 1, 0, 196618, 1, 0, 196619, 1, 0, 196620, 0, 0, 196621, 1, 0, 196622, 1, 0, 196623, 1, 0, 196624, 0, 0, 262152, 0, 0, 262153, 1, 0, 262154, 1, 0, 262155, 1, 0, 262156, 0, 0, 262157, 0, 0, 262158, 0, 0, 262159, 0, 0, 262160, 0, 0, 327688, 0, 0, 327689, 1, 0, 327690, 1, 0, 327691, 1, 0, 327692, 0, 0, 327693, 0, 0, 327694, 0, 0, 327695, 0, 0, 327696, 0, 0, 393224, 0, 0, 393225, 1, 0, 393226, 1, 0, 393227, 1, 0, 393228, 0, 0, 393229, 0, 0, 393230, 0, 0, 393231, 0, 0, 393232, 0, 0, 458760, 0, 0, 458761, 1, 0, 458762, 1, 0, 458763, 1, 0, 458764, 0, 0, 458765, 0, 0, 458766, 0, 0, 458767, 0, 0, 458768, 0, 0, 524296, 0, 0, 524297, 1, 0, 524298, 1, 0, 524299, 1, 0, 524300, 0, 0, 524301, 0, 0, 524302, 0, 0, 524303, 0, 0, 524304, 0, 0, 589832, 0, 0, 589833, 0, 0, 589834, 0, 0, 589835, 0, 0, 589836, 0, 0, 589837, 0, 0, 589838, 0, 0, 589839, 0, 0, 589840, 0, 0 )
script = ExtResource( 7 )

[node name="EndPortal" parent="." instance=ExtResource( 3 )]
position = Vector2( 929, 156 )

[node name="SpawnPoint2" parent="." instance=ExtResource( 5 )]
position = Vector2( 669, 483 )

[node name="Background2" type="Sprite" parent="."]
modulate = Color( 0.7, 0.7, 0.7, 1 )
position = Vector2( -433, -225 )
z_index = -1
texture = ExtResource( 2 )
centered = false
region_enabled = true
region_rect = Rect2( 0, 0, 1920, 1080 )
script = ExtResource( 4 )
__meta__ = {
"_edit_lock_": true
}

[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
stream = ExtResource( 6 )
volume_db = -5.0
autoplay = true
bus = "music"

[node name="SpikeBox" parent="." instance=ExtResource( 8 )]
position = Vector2( 608, 98 )

[node name="SpikeBox2" parent="." instance=ExtResource( 8 )]
position = Vector2( 672, 98 )

[node name="SpikeBox3" parent="." instance=ExtResource( 8 )]
position = Vector2( 736, 98 )
3 changes: 2 additions & 1 deletion scenes/platformer/characters/Player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -233,11 +233,12 @@ func jump():
EventBus.emit_signal("jumping")


func super_jump():
func super_jump():
super_jump_timer = 0
stats.jump_xp += 1
stats.acrobatics += 1
tween.stop_all()
set_hitbox_crouching(false)
stretch(0.2, 0, 1.0, 2.5)
y_motion.set_speed(JUMPFORCE * -100)
anticipating_jump = false
Expand Down
13 changes: 9 additions & 4 deletions scripts/Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ onready var hub: TileMap = $TileMap
onready var level: Node = $TileMap
onready var bgm: AudioStreamPlayer = $Audio/BGM
onready var ui: CanvasLayer = $UI
onready var defaultBGMStream : AudioStream = bgm.stream.duplicate()

var completionSound = preload("res://audio/sfx/portal.wav")
var coinSound = preload("res://audio/sfx/coin.wav")
Expand All @@ -33,10 +34,14 @@ func _on_ui_visibility_changed(data):


func _bgm_changed(data) -> void:
if "playing" in data:
bgm.playing = data.playing
if "stream" in data:
bgm.stream = data.stream
if typeof(data) == TYPE_STRING and data == "reset":
bgm.stream = defaultBGMStream
bgm.playing = true
else:
if "playing" in data:
bgm.playing = data.playing
if "stream" in data:
bgm.stream = data.stream


func _hook_portals() -> void:
Expand Down
13 changes: 13 additions & 0 deletions scripts/boxes/SpikeBox.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
extends BaseBox


var inventory = preload("res://scripts/resources/PlayerInventory.tres")

func bounce(body: KinematicBody2D):
on_bounce(body)
if not body is Player:
return

audio_meow.play()
EventBus.emit_signal("heart_changed", {"value": -inventory.hearts})

Binary file added sprites/Spikes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions sprites/Spikes.png.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/Spikes.png-74291f56ae13d23045f77f35df84afea.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://sprites/Spikes.png"
dest_files=[ "res://.import/Spikes.png-74291f56ae13d23045f77f35df84afea.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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=false
svg/scale=1.0

0 comments on commit 1afcba1

Please sign in to comment.