bullet hell

This commit is contained in:
Tabby 2025-05-11 20:46:20 +10:00
parent 499b2416e1
commit cef1d348d4
6 changed files with 107 additions and 10 deletions

View file

@ -1,10 +1,11 @@
[gd_scene load_steps=6 format=3 uid="uid://ct8axfbvd2wn4"]
[gd_scene load_steps=7 format=3 uid="uid://ct8axfbvd2wn4"]
[ext_resource type="PackedScene" uid="uid://63rik2noj8id" path="res://base modules/test_channel.tscn" id="1_mlf6e"]
[ext_resource type="PackedScene" uid="uid://ch1x8pfdu2b1g" path="res://test_game.tscn" id="2_mixcd"]
[ext_resource type="Texture2D" uid="uid://cyo0wl4dt3td1" path="res://sprites/offline_channel.png" id="2_po0ka"]
[ext_resource type="PackedScene" uid="uid://bw1hhx7lyfonr" path="res://games/asteroids/asteroids.tscn" id="3_mj2jn"]
[ext_resource type="PackedScene" uid="uid://ckbyiwy0dxbsd" path="res://games/platformer/platformer.tscn" id="4_mj2jn"]
[ext_resource type="PackedScene" uid="uid://cnpyrh4c6a7cg" path="res://games/bullet_hell/bullet_hell.tscn" id="6_kdryc"]
[node name="GameScene" type="Control"]
layout_mode = 3
@ -60,6 +61,11 @@ layout_mode = 2
channel_name = "Platformer"
channel_scene = ExtResource("4_mj2jn")
[node name="Control4" parent="GridContainer" instance=ExtResource("1_mlf6e")]
layout_mode = 2
channel_name = "Bullet Hell"
channel_scene = ExtResource("6_kdryc")
[node name="ColorRect3" type="TextureRect" parent="GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
@ -81,12 +87,5 @@ size_flags_vertical = 3
texture = ExtResource("2_po0ka")
expand_mode = 1
[node name="ColorRect6" type="TextureRect" parent="GridContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
texture = ExtResource("2_po0ka")
expand_mode = 1
[node name="Camera2D" type="Camera2D" parent="."]
offset = Vector2(320, 180)

View file

@ -0,0 +1,28 @@
extends CharacterBody2D
const SPEED = 300.0
const JUMP_VELOCITY = -400.0
func _physics_process(delta: float) -> void:
# Add the gravity.
if not is_on_floor():
velocity += get_gravity() * delta
# Get the input direction and handle the movement/deceleration.
# As good practice, you should replace UI actions with custom gameplay actions.
var hDirection := Input.get_axis("hell_left", "hell_right")
var vDirection := Input.get_axis("hell_up", "hell_down")
if hDirection:
velocity.x = hDirection * SPEED
else:
velocity.x = move_toward(velocity.x, 0, SPEED)
if vDirection:
velocity.y = vDirection * SPEED
else:
velocity.y = move_toward(velocity.y, 0, SPEED)
move_and_slide()

View file

@ -0,0 +1 @@
uid://c100m60xe4k3r

View file

@ -0,0 +1,40 @@
[gd_scene load_steps=7 format=3 uid="uid://cnpyrh4c6a7cg"]
[ext_resource type="Texture2D" uid="uid://diilj7xuttpqu" path="res://icon.svg" id="1_jfgig"]
[ext_resource type="Script" uid="uid://c100m60xe4k3r" path="res://games/bullet_hell/bulletHellMovement.gd" id="1_x66ke"]
[sub_resource type="Gradient" id="Gradient_x66ke"]
colors = PackedColorArray(0.552941, 0, 0, 1, 1, 0.513875, 0.319104, 1)
[sub_resource type="FastNoiseLite" id="FastNoiseLite_uvm3w"]
[sub_resource type="NoiseTexture2D" id="NoiseTexture2D_4njol"]
width = 640
height = 360
color_ramp = SubResource("Gradient_x66ke")
noise = SubResource("FastNoiseLite_uvm3w")
[sub_resource type="RectangleShape2D" id="RectangleShape2D_jfgig"]
size = Vector2(38, 38)
[node name="BulletHell" type="Node"]
[node name="TextureRect" type="TextureRect" parent="."]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("NoiseTexture2D_4njol")
[node name="CharacterBody2D" type="CharacterBody2D" parent="."]
position = Vector2(295, 179)
motion_mode = 1
script = ExtResource("1_x66ke")
[node name="CollisionShape2D" type="CollisionShape2D" parent="CharacterBody2D"]
shape = SubResource("RectangleShape2D_jfgig")
[node name="Sprite2D" type="Sprite2D" parent="CharacterBody2D"]
scale = Vector2(0.3, 0.3)
texture = ExtResource("1_jfgig")

View file

@ -1,8 +1,16 @@
[gd_scene load_steps=5 format=3 uid="uid://ckbyiwy0dxbsd"]
[gd_scene load_steps=7 format=3 uid="uid://ckbyiwy0dxbsd"]
[ext_resource type="Script" uid="uid://dqyddqx8xm0gw" path="res://games/platformer/player.gd" id="1_1wj3w"]
[ext_resource type="Texture2D" uid="uid://diilj7xuttpqu" path="res://icon.svg" id="1_oyf6i"]
[sub_resource type="Gradient" id="Gradient_1wj3w"]
offsets = PackedFloat32Array(0.0962343, 0.158996)
colors = PackedColorArray(0, 0.254902, 0, 1, 0.618821, 0.815103, 1, 1)
[sub_resource type="GradientTexture2D" id="GradientTexture2D_84mot"]
gradient = SubResource("Gradient_1wj3w")
fill_from = Vector2(1, 1)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_oyf6i"]
size = Vector2(32, 32)
@ -17,6 +25,7 @@ anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
texture = SubResource("GradientTexture2D_84mot")
[node name="Player" type="CharacterBody2D" parent="."]
position = Vector2(124, 155)
@ -30,7 +39,7 @@ texture = ExtResource("1_oyf6i")
shape = SubResource("RectangleShape2D_oyf6i")
[node name="StaticBody2D" type="StaticBody2D" parent="."]
position = Vector2(317, 384)
position = Vector2(319, 344)
[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"]
shape = SubResource("RectangleShape2D_1wj3w")

View file

@ -53,6 +53,26 @@ platformer_drop={
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":83,"key_label":0,"unicode":115,"location":0,"echo":false,"script":null)
]
}
hell_left={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":74,"key_label":0,"unicode":106,"location":0,"echo":false,"script":null)
]
}
hell_right={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":76,"key_label":0,"unicode":108,"location":0,"echo":false,"script":null)
]
}
hell_up={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":73,"key_label":0,"unicode":105,"location":0,"echo":false,"script":null)
]
}
hell_down={
"deadzone": 0.2,
"events": [Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":-1,"window_id":0,"alt_pressed":false,"shift_pressed":false,"ctrl_pressed":false,"meta_pressed":false,"pressed":false,"keycode":0,"physical_keycode":75,"key_label":0,"unicode":107,"location":0,"echo":false,"script":null)
]
}
[rendering]