-feat: add background using tiling system, simplistic area border implemented.
BIN
MB_FYP/assets/Ships/Fighters/Player/Fighter/starfield1.png
Normal file
|
After Width: | Height: | Size: 378 KiB |
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://wobk3yb87d1j"
|
||||
path="res://.godot/imported/starfield1.png-1f15ea495777a1505834757aca0bae9b.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Ships/Fighters/Player/Fighter/starfield1.png"
|
||||
dest_files=["res://.godot/imported/starfield1.png-1f15ea495777a1505834757aca0bae9b.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
|
||||
BIN
MB_FYP/assets/Starfield/starfield1.png
Normal file
|
After Width: | Height: | Size: 378 KiB |
34
MB_FYP/assets/Starfield/starfield1.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bjxo7mbl7nert"
|
||||
path="res://.godot/imported/starfield1.png-b79fbd735fb239cef3a3e9b1b7810e15.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Starfield/starfield1.png"
|
||||
dest_files=["res://.godot/imported/starfield1.png-b79fbd735fb239cef3a3e9b1b7810e15.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
|
||||
BIN
MB_FYP/assets/Starfield/starfield2.png
Normal file
|
After Width: | Height: | Size: 650 KiB |
34
MB_FYP/assets/Starfield/starfield2.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bo2dnb3utshcu"
|
||||
path="res://.godot/imported/starfield2.png-bcc4576864375f73f5f90936ddae015c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Starfield/starfield2.png"
|
||||
dest_files=["res://.godot/imported/starfield2.png-bcc4576864375f73f5f90936ddae015c.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
|
||||
BIN
MB_FYP/assets/Starfield/starfield3.png
Normal file
|
After Width: | Height: | Size: 586 KiB |
34
MB_FYP/assets/Starfield/starfield3.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dnafsrablhbqp"
|
||||
path="res://.godot/imported/starfield3.png-3bd64dbdb7110ae0c037950e02ddb092.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Starfield/starfield3.png"
|
||||
dest_files=["res://.godot/imported/starfield3.png-3bd64dbdb7110ae0c037950e02ddb092.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
|
||||
BIN
MB_FYP/assets/Starfield/starfield_tile.png
Normal file
|
After Width: | Height: | Size: 433 KiB |
34
MB_FYP/assets/Starfield/starfield_tile.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cyybsidmlqst"
|
||||
path="res://.godot/imported/starfield_tile.png-51b925187cd901297b443d8a278c6d77.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Starfield/starfield_tile.png"
|
||||
dest_files=["res://.godot/imported/starfield_tile.png-51b925187cd901297b443d8a278c6d77.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
|
||||
BIN
MB_FYP/assets/Starfield/starfield_tile_2.png
Normal file
|
After Width: | Height: | Size: 414 KiB |
34
MB_FYP/assets/Starfield/starfield_tile_2.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dp6rq4p0ck4mv"
|
||||
path="res://.godot/imported/starfield_tile_2.png-76720264a8e2cdf9eb3761e6005dcd49.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/Starfield/starfield_tile_2.png"
|
||||
dest_files=["res://.godot/imported/starfield_tile_2.png-76720264a8e2cdf9eb3761e6005dcd49.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
|
||||
BIN
MB_FYP/assets/border_texture.png
Normal file
|
After Width: | Height: | Size: 326 B |
34
MB_FYP/assets/border_texture.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://coie4nc5jy7t4"
|
||||
path="res://.godot/imported/border_texture.png-32e7c45d9ce85c3d1ec65fbdc4ad7056.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/border_texture.png"
|
||||
dest_files=["res://.godot/imported/border_texture.png-32e7c45d9ce85c3d1ec65fbdc4ad7056.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
|
||||
14
MB_FYP/scenes/border.gdshader
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
shader_type canvas_item;
|
||||
|
||||
void vertex() {
|
||||
// Called for every vertex the material is visible on.
|
||||
}
|
||||
|
||||
void fragment() {
|
||||
// Called for every pixel the material is visible on.
|
||||
}
|
||||
|
||||
//void light() {
|
||||
// Called for every pixel for every light affecting the CanvasItem.
|
||||
// Uncomment to replace the default light processing function with this one.
|
||||
//}
|
||||
24
MB_FYP/scenes/border.tscn
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://4fnk5c2nf6a1"]
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_r1ux2"]
|
||||
colors = PackedColorArray(0.860617, 0.000590083, 0.860611, 0.509804, 1, 0.396078, 1, 0.25098)
|
||||
|
||||
[sub_resource type="GradientTexture2D" id="GradientTexture2D_70k44"]
|
||||
gradient = SubResource("Gradient_r1ux2")
|
||||
width = 100
|
||||
height = 100
|
||||
fill_from = Vector2(0, 0.417391)
|
||||
fill_to = Vector2(0, 1)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_yhatp"]
|
||||
size = Vector2(100, 100)
|
||||
|
||||
[node name="Border" type="StaticBody2D"]
|
||||
collision_layer = 4
|
||||
collision_mask = 15
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture = SubResource("GradientTexture2D_70k44")
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource("RectangleShape2D_yhatp")
|
||||
44
MB_FYP/scenes/star_background.tscn
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://ek36asqxxjep"]
|
||||
|
||||
[sub_resource type="Curve" id="Curve_w4vts"]
|
||||
_data = [Vector2(0.233333, 0.571429), 0.0, 0.0, 0, 0, Vector2(0.56, 0.769231), 0.0, 0.0, 0, 0, Vector2(1, 1), 0.0, 0.0, 0, 0]
|
||||
point_count = 3
|
||||
|
||||
[sub_resource type="CurveTexture" id="CurveTexture_t768a"]
|
||||
curve = SubResource("Curve_w4vts")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_cmi2w"]
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 3
|
||||
emission_box_extents = Vector3(5000, 5000, 1)
|
||||
initial_velocity_min = 0.5
|
||||
initial_velocity_max = 1.0
|
||||
gravity = Vector3(0, 0, 0)
|
||||
scale_min = 0.0
|
||||
scale_max = 4.0
|
||||
scale_curve = SubResource("CurveTexture_t768a")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_145mr"]
|
||||
particle_flag_disable_z = true
|
||||
emission_shape = 3
|
||||
emission_box_extents = Vector3(5000, 5000, 1)
|
||||
gravity = Vector3(0, 0, 0)
|
||||
|
||||
[node name="Star Background" type="Node2D"]
|
||||
position = Vector2(903, 558)
|
||||
|
||||
[node name="StarBack" type="GPUParticles2D" parent="."]
|
||||
z_index = -10
|
||||
emitting = false
|
||||
amount = 1000
|
||||
process_material = SubResource("ParticleProcessMaterial_cmi2w")
|
||||
lifetime = 60.0
|
||||
preprocess = 2.0
|
||||
|
||||
[node name="StarFront" type="GPUParticles2D" parent="."]
|
||||
z_index = -10
|
||||
amount = 10000
|
||||
process_material = SubResource("ParticleProcessMaterial_145mr")
|
||||
lifetime = 60.0
|
||||
preprocess = 10.0
|
||||
speed_scale = 0.2
|
||||
BIN
MB_FYP/scenes/starfield1.png
Normal file
|
After Width: | Height: | Size: 378 KiB |
34
MB_FYP/scenes/starfield1.png.import
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://my2essq6mhxa"
|
||||
path="res://.godot/imported/starfield1.png-5ed8bd185a54ef194c7756d5a9b1188c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://scenes/starfield1.png"
|
||||
dest_files=["res://.godot/imported/starfield1.png-5ed8bd185a54ef194c7756d5a9b1188c.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
|
||||
|
|
@ -134,6 +134,7 @@ public partial class game : Node2D
|
|||
|
||||
private void OnPlayerLaserShot(Area2D laser)
|
||||
{
|
||||
|
||||
_lasers.AddChild(laser);
|
||||
GD.Print(laser.Position);
|
||||
GD.Print(_player.Position);
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ public partial class player : ship // Inherits from base ship class
|
|||
|
||||
if(Input.IsActionPressed("shoot"))
|
||||
{
|
||||
GD.Print("DEBUG: FIRING PLAYER LASER");
|
||||
if (FireTimer > 0f) return;
|
||||
ShootLaser();
|
||||
FireTimer = FireCooldown;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public partial class ship : CharacterBody2D
|
|||
|
||||
protected virtual void ShootLaser()
|
||||
{
|
||||
//GD.Print(Name, ": firing laser");
|
||||
GD.Print(Name, ": firing laser");
|
||||
|
||||
Laser laser = LaserScene.Instantiate<Laser>();
|
||||
laser.Position = LaserSpawn.GlobalPosition + -Transform.Y * 25f;
|
||||
|
|
|
|||