├── .gitignore ├── .import ├── bullet1.png-172c7367b8d2bdcf3ef88ee2d872fd20.md5 ├── bullet1.png-172c7367b8d2bdcf3ef88ee2d872fd20.stex ├── bullet2.png-3a8e41e089ca5691f8c5985ba2bb7ba0.md5 ├── bullet2.png-3a8e41e089ca5691f8c5985ba2bb7ba0.stex ├── bullet3.png-448ea63b04dd9af7e499783d6cc9c181.md5 ├── bullet3.png-448ea63b04dd9af7e499783d6cc9c181.stex ├── bullet_sprite1.png-a6b1abbdd02b1a34c3c1dc017baeedaa.md5 ├── bullet_sprite1.png-a6b1abbdd02b1a34c3c1dc017baeedaa.stex ├── bullet_sprite2.png-a68456940bc470ecca4cb20f85e0f308.md5 ├── bullet_sprite2.png-a68456940bc470ecca4cb20f85e0f308.stex ├── bullet_sprite3.png-b785717f8262b151abf2e36382743b40.md5 ├── bullet_sprite3.png-b785717f8262b151abf2e36382743b40.stex ├── destroying_bullet1.png-3743f460680d226a22abd389221f5b20.md5 ├── destroying_bullet2.png-7a35d0831af9fb3462694c6f1164932a.md5 ├── destroying_bullet3.png-28e1d01647e810944a095e2f7aabfabd.md5 ├── destroying_bullet4.png-cc6a1a78c9e343215919e0f934bb25b3.md5 ├── destroying_bullet5.png-ca9515763f054807e6a59af1a140404f.md5 ├── icon.png-487276ed1e3a0c39cad0279d744ee560.md5 ├── icon.png-487276ed1e3a0c39cad0279d744ee560.stex ├── victim.png-c23c212363a4d334a84cdb176bccf762.md5 └── victim.png-c23c212363a4d334a84cdb176bccf762.stex ├── Bullet.gd ├── BulletHellSpawner.gd ├── BulletHellSpawner.tscn ├── Detector.gd ├── Detector.tscn ├── Game.gd ├── Game.tscn ├── Images ├── bullet1.png ├── bullet1.png.import ├── bullet2.png ├── bullet2.png.import ├── bullet3.png ├── bullet3.png.import ├── victim.png └── victim.png.import ├── default_env.tres ├── export_presets.cfg ├── icon.png ├── icon.png.import ├── project.godot └── readme.md /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /.import/bullet1.png-172c7367b8d2bdcf3ef88ee2d872fd20.md5: -------------------------------------------------------------------------------- 1 | source_md5="beccd228d940dbe4321ddada1e7d7430" 2 | dest_md5="49ec65c263802bfcc76297ec04b0de57" 3 | 4 | -------------------------------------------------------------------------------- /.import/bullet1.png-172c7367b8d2bdcf3ef88ee2d872fd20.stex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/.import/bullet1.png-172c7367b8d2bdcf3ef88ee2d872fd20.stex -------------------------------------------------------------------------------- /.import/bullet2.png-3a8e41e089ca5691f8c5985ba2bb7ba0.md5: -------------------------------------------------------------------------------- 1 | source_md5="4147c5e85b910517f6f88bdcfe77b2da" 2 | dest_md5="e6b6de5b30d0280b249724811a87d80d" 3 | 4 | -------------------------------------------------------------------------------- /.import/bullet2.png-3a8e41e089ca5691f8c5985ba2bb7ba0.stex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/.import/bullet2.png-3a8e41e089ca5691f8c5985ba2bb7ba0.stex -------------------------------------------------------------------------------- /.import/bullet3.png-448ea63b04dd9af7e499783d6cc9c181.md5: -------------------------------------------------------------------------------- 1 | source_md5="64d8b98bd32f9f09b4bb4669dd5e8c00" 2 | dest_md5="16ae89644c8763177ca7e195c2df65b3" 3 | 4 | -------------------------------------------------------------------------------- /.import/bullet3.png-448ea63b04dd9af7e499783d6cc9c181.stex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/.import/bullet3.png-448ea63b04dd9af7e499783d6cc9c181.stex -------------------------------------------------------------------------------- /.import/bullet_sprite1.png-a6b1abbdd02b1a34c3c1dc017baeedaa.md5: -------------------------------------------------------------------------------- 1 | source_md5="1df50832b55c9bebc089c9260b338b82" 2 | dest_md5="9552b031647cdf60fe34768f8b953722" 3 | 4 | -------------------------------------------------------------------------------- /.import/bullet_sprite1.png-a6b1abbdd02b1a34c3c1dc017baeedaa.stex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/.import/bullet_sprite1.png-a6b1abbdd02b1a34c3c1dc017baeedaa.stex -------------------------------------------------------------------------------- /.import/bullet_sprite2.png-a68456940bc470ecca4cb20f85e0f308.md5: -------------------------------------------------------------------------------- 1 | source_md5="b1adecf4f139839b81c257ae37a733cb" 2 | dest_md5="429aa346e072cb47fa9cc71044745607" 3 | 4 | -------------------------------------------------------------------------------- /.import/bullet_sprite2.png-a68456940bc470ecca4cb20f85e0f308.stex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/.import/bullet_sprite2.png-a68456940bc470ecca4cb20f85e0f308.stex -------------------------------------------------------------------------------- /.import/bullet_sprite3.png-b785717f8262b151abf2e36382743b40.md5: -------------------------------------------------------------------------------- 1 | source_md5="2e7e16a7996a2e0758fd6540cdf3adaa" 2 | dest_md5="ef44576bd60ee9fe3e9910dbada57384" 3 | 4 | -------------------------------------------------------------------------------- /.import/bullet_sprite3.png-b785717f8262b151abf2e36382743b40.stex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/.import/bullet_sprite3.png-b785717f8262b151abf2e36382743b40.stex -------------------------------------------------------------------------------- /.import/destroying_bullet1.png-3743f460680d226a22abd389221f5b20.md5: -------------------------------------------------------------------------------- 1 | source_md5="161fdc8a181095bb023c74b20d57bc34" 2 | dest_md5="9d46db045444fbc6d2a57bd8f317ba40" 3 | 4 | -------------------------------------------------------------------------------- /.import/destroying_bullet2.png-7a35d0831af9fb3462694c6f1164932a.md5: -------------------------------------------------------------------------------- 1 | source_md5="d434b30ba884b0a556b935d99f448a37" 2 | dest_md5="bbbb0a65816194a609d44b17e9c235db" 3 | 4 | -------------------------------------------------------------------------------- /.import/destroying_bullet3.png-28e1d01647e810944a095e2f7aabfabd.md5: -------------------------------------------------------------------------------- 1 | source_md5="e6cfe9e664c2f5cb3a66c350556500da" 2 | dest_md5="ab7b0b57f55a07a8f362df7afa4b97db" 3 | 4 | -------------------------------------------------------------------------------- /.import/destroying_bullet4.png-cc6a1a78c9e343215919e0f934bb25b3.md5: -------------------------------------------------------------------------------- 1 | source_md5="8e59cc6640bfcfec1ed126ee311a16c4" 2 | dest_md5="b87b9bc6f33a3fc92a480e1404c04a13" 3 | 4 | -------------------------------------------------------------------------------- /.import/destroying_bullet5.png-ca9515763f054807e6a59af1a140404f.md5: -------------------------------------------------------------------------------- 1 | source_md5="d5b9b85e011ffc757e2e7898e4f66a78" 2 | dest_md5="fa6a69c4113ea8d2f4441b47cead1b77" 3 | 4 | -------------------------------------------------------------------------------- /.import/icon.png-487276ed1e3a0c39cad0279d744ee560.md5: -------------------------------------------------------------------------------- 1 | source_md5="47ca9ef22adeed403b36167d92b98614" 2 | dest_md5="e38e580d97f5e048131a3bae7ed741a1" 3 | 4 | -------------------------------------------------------------------------------- /.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex -------------------------------------------------------------------------------- /.import/victim.png-c23c212363a4d334a84cdb176bccf762.md5: -------------------------------------------------------------------------------- 1 | source_md5="7e1ec5089e19f03bf7a8490007287887" 2 | dest_md5="9e4cfcd5d6498c9673a72725aef8cd5a" 3 | 4 | -------------------------------------------------------------------------------- /.import/victim.png-c23c212363a4d334a84cdb176bccf762.stex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/.import/victim.png-c23c212363a4d334a84cdb176bccf762.stex -------------------------------------------------------------------------------- /Bullet.gd: -------------------------------------------------------------------------------- 1 | class_name Bullet 2 | extends Reference 3 | 4 | var shape_id : RID 5 | var movement_vector : Vector2 6 | var current_position : Vector2 7 | var lifetime : float = 0.0 8 | var animation_lifetime : float = 0.0 9 | var image_offset : int = 0 10 | var layer : String = "front" 11 | var speed: float 12 | -------------------------------------------------------------------------------- /BulletHellSpawner.gd: -------------------------------------------------------------------------------- 1 | class_name BulletHellSpawner 2 | extends Node2D 3 | 4 | export (Array, Image) var frames 5 | export (float) var image_change_offset = 0.2 6 | export (float) var max_lifetime = 10.0 7 | 8 | onready var origin := get_node("Origin") as Position2D 9 | onready var shared_area := get_node("SharedArea") as Area2D 10 | 11 | onready var max_images = frames.size() 12 | 13 | var bullets : Array = [] 14 | var bounding_box : Rect2 15 | 16 | # ================================ Lifecycle ================================ # 17 | 18 | func _exit_tree() -> void: 19 | for bullet in bullets: 20 | Physics2DServer.free_rid((bullet as Bullet).shape_id) 21 | bullets.clear() 22 | 23 | func _physics_process(delta: float) -> void: 24 | 25 | var used_transform = Transform2D() 26 | var bullets_queued_for_destruction = [] 27 | 28 | for i in range(0, bullets.size()): 29 | 30 | var bullet = bullets[i] as Bullet 31 | 32 | if ( 33 | !bounding_box.has_point(bullet.current_position) or 34 | bullet.lifetime >= max_lifetime 35 | ): 36 | bullets_queued_for_destruction.append(bullet) 37 | continue 38 | 39 | var offset : Vector2 = ( 40 | bullet.movement_vector.normalized() * bullet.speed * delta 41 | ) 42 | 43 | # Move the bullet and the collision 44 | bullet.current_position += offset 45 | used_transform.origin = bullet.current_position 46 | Physics2DServer.area_set_shape_transform( 47 | shared_area.get_rid(), i, used_transform 48 | ) 49 | 50 | bullet.animation_lifetime += delta 51 | bullet.lifetime += delta 52 | 53 | for bullet in bullets_queued_for_destruction: 54 | Physics2DServer.free_rid(bullet.shape_id) 55 | bullets.erase(bullet) 56 | 57 | update() 58 | 59 | func _draw() -> void: 60 | var offset = frames[0].get_size() / 2.0 61 | for i in range(0, bullets.size()): 62 | var bullet = bullets[i] 63 | if bullet.animation_lifetime >= image_change_offset: 64 | bullet.image_offset += 1 65 | bullet.animation_lifetime = 0.0 66 | if bullet.image_offset >= max_images: 67 | bullet.image_offset = 0 68 | draw_texture( 69 | frames[bullet.image_offset], 70 | bullet.current_position - offset 71 | ) 72 | 73 | # ================================= Public ================================== # 74 | 75 | # Bullets outside these bounds will be deleted 76 | func set_bounding_box(box: Rect2) -> void: 77 | bounding_box = box 78 | 79 | # Register a new bullet in the array with the optimization logic 80 | func spawn_bullet(i_movement: Vector2, speed := 200) -> void: 81 | 82 | var bullet : Bullet = Bullet.new() 83 | bullet.movement_vector = i_movement 84 | bullet.speed = speed 85 | bullet.current_position = origin.position 86 | 87 | _configure_collision_for_bullet(bullet) 88 | 89 | bullets.append(bullet) 90 | 91 | # Adds the collision data to the bullet 92 | func _configure_collision_for_bullet(bullet: Bullet) -> void: 93 | 94 | # Define the shape's position 95 | var used_transform := Transform2D(0, position) 96 | used_transform.origin = bullet.current_position 97 | 98 | # Create the shape 99 | var _circle_shape = Physics2DServer.circle_shape_create() 100 | Physics2DServer.shape_set_data(_circle_shape, 8) 101 | 102 | # Add the shape to the shared area 103 | Physics2DServer.area_add_shape( 104 | shared_area.get_rid(), _circle_shape, used_transform 105 | ) 106 | 107 | # Register the generated id to the bullet 108 | bullet.shape_id = _circle_shape 109 | -------------------------------------------------------------------------------- /BulletHellSpawner.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=2] 2 | 3 | [ext_resource path="res://BulletHellSpawner.gd" type="Script" id=1] 4 | 5 | [node name="BulletHellSpawner" type="Node2D"] 6 | script = ExtResource( 1 ) 7 | 8 | [node name="Origin" type="Position2D" parent="."] 9 | 10 | [node name="SharedArea" type="Area2D" parent="."] 11 | -------------------------------------------------------------------------------- /Detector.gd: -------------------------------------------------------------------------------- 1 | # Demonstrates how hit detection works. 2 | extends Area2D 3 | 4 | onready var label := get_node("Label") as Label 5 | 6 | var collisions := 0 7 | 8 | # Simulate "invinsibility frames", else we would detect collisions each frame a 9 | # hitbox is on top of us. 10 | var detecting := true 11 | 12 | func _process(delta: float) -> void: 13 | label.text = "Collisions: %d" % collisions 14 | 15 | func _on_Detector_area_shape_entered(area_id: int, area: Area2D, area_shape: int, self_shape: int) -> void: 16 | if detecting: 17 | collisions += 1 18 | detecting = false 19 | yield(get_tree().create_timer(0.1), "timeout") 20 | detecting = true 21 | -------------------------------------------------------------------------------- /Detector.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=4 format=2] 2 | 3 | [ext_resource path="res://Detector.gd" type="Script" id=1] 4 | [ext_resource path="res://Images/victim.png" type="Texture" id=2] 5 | 6 | [sub_resource type="RectangleShape2D" id=1] 7 | 8 | [node name="Detector" type="Area2D" groups=[ 9 | "BulletDestroyer", 10 | ]] 11 | script = ExtResource( 1 ) 12 | 13 | [node name="CollisionShape2D" type="CollisionShape2D" parent="."] 14 | shape = SubResource( 1 ) 15 | 16 | [node name="Sprite" type="Sprite" parent="."] 17 | scale = Vector2( 2, 2 ) 18 | texture = ExtResource( 2 ) 19 | 20 | [node name="Label" type="Label" parent="."] 21 | margin_left = -44.6269 22 | margin_top = 12.1578 23 | margin_right = 44.3731 24 | margin_bottom = 26.1578 25 | text = "detected" 26 | __meta__ = { 27 | "_edit_use_anchors_": false 28 | } 29 | [connection signal="area_shape_entered" from="." to="." method="_on_Detector_area_shape_entered"] 30 | -------------------------------------------------------------------------------- /Game.gd: -------------------------------------------------------------------------------- 1 | extends Node2D 2 | 3 | onready var bullet_spawner_area = get_node("BulletHellSpawner") 4 | onready var timer := get_node("Timer") as Timer 5 | 6 | var boundary_rect: Rect2 7 | 8 | var original_vector = Vector2(-1, 0) 9 | var rotation_difference = (2.0 * PI) / 20.0 10 | 11 | func _ready() -> void: 12 | # Here we register the boundary 13 | boundary_rect = Rect2( 14 | get_node("TopLeft").position, 15 | get_node("BottomRight").position - get_node("TopLeft").position 16 | ) 17 | bullet_spawner_area.set_bounding_box(boundary_rect) 18 | 19 | # Spawn a bullet wave with a slightly different rotation 20 | func _on_Timer_timeout() -> void: 21 | for i in range(0, 20): 22 | var movement = original_vector.rotated(rotation_difference * i) 23 | bullet_spawner_area.spawn_bullet(movement) 24 | original_vector = original_vector.rotated(PI/32.0) 25 | 26 | func _on_StartTimer_timeout() -> void: 27 | timer.start() 28 | -------------------------------------------------------------------------------- /Game.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=7 format=2] 2 | 3 | [ext_resource path="res://Game.gd" type="Script" id=1] 4 | [ext_resource path="res://BulletHellSpawner.tscn" type="PackedScene" id=2] 5 | [ext_resource path="res://Images/bullet1.png" type="Texture" id=3] 6 | [ext_resource path="res://Images/bullet2.png" type="Texture" id=4] 7 | [ext_resource path="res://Images/bullet3.png" type="Texture" id=5] 8 | [ext_resource path="res://Detector.tscn" type="PackedScene" id=6] 9 | 10 | [node name="Game" type="Node2D"] 11 | script = ExtResource( 1 ) 12 | 13 | [node name="BulletHellSpawner" parent="." instance=ExtResource( 2 )] 14 | frames = [ ExtResource( 3 ), ExtResource( 4 ), ExtResource( 5 ) ] 15 | image_change_offset = 0.1 16 | 17 | [node name="StartTimer" type="Timer" parent="."] 18 | autostart = true 19 | 20 | [node name="Timer" type="Timer" parent="."] 21 | process_mode = 0 22 | wait_time = 0.1 23 | 24 | [node name="Camera2D" type="Camera2D" parent="."] 25 | current = true 26 | 27 | [node name="TopLeft" type="Position2D" parent="."] 28 | position = Vector2( -510, -300 ) 29 | 30 | [node name="BottomRight" type="Position2D" parent="."] 31 | position = Vector2( 510, 300 ) 32 | 33 | [node name="Detector" parent="." instance=ExtResource( 6 )] 34 | position = Vector2( -292, -129.836 ) 35 | 36 | [node name="Detector2" parent="." instance=ExtResource( 6 )] 37 | position = Vector2( 3.99997, -105.836 ) 38 | [connection signal="timeout" from="StartTimer" to="." method="_on_StartTimer_timeout"] 39 | [connection signal="timeout" from="Timer" to="." method="_on_Timer_timeout"] 40 | -------------------------------------------------------------------------------- /Images/bullet1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/Images/bullet1.png -------------------------------------------------------------------------------- /Images/bullet1.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/bullet1.png-172c7367b8d2bdcf3ef88ee2d872fd20.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://Images/bullet1.png" 13 | dest_files=[ "res://.import/bullet1.png-172c7367b8d2bdcf3ef88ee2d872fd20.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /Images/bullet2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/Images/bullet2.png -------------------------------------------------------------------------------- /Images/bullet2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/bullet2.png-3a8e41e089ca5691f8c5985ba2bb7ba0.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://Images/bullet2.png" 13 | dest_files=[ "res://.import/bullet2.png-3a8e41e089ca5691f8c5985ba2bb7ba0.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /Images/bullet3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/Images/bullet3.png -------------------------------------------------------------------------------- /Images/bullet3.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/bullet3.png-448ea63b04dd9af7e499783d6cc9c181.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://Images/bullet3.png" 13 | dest_files=[ "res://.import/bullet3.png-448ea63b04dd9af7e499783d6cc9c181.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /Images/victim.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/Images/victim.png -------------------------------------------------------------------------------- /Images/victim.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/victim.png-c23c212363a4d334a84cdb176bccf762.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://Images/victim.png" 13 | dest_files=[ "res://.import/victim.png-c23c212363a4d334a84cdb176bccf762.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=false 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /default_env.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Environment" load_steps=2 format=2] 2 | 3 | [sub_resource type="ProceduralSky" id=1] 4 | 5 | [resource] 6 | background_mode = 2 7 | background_sky = SubResource( 1 ) 8 | -------------------------------------------------------------------------------- /export_presets.cfg: -------------------------------------------------------------------------------- 1 | [preset.0] 2 | 3 | name="Windows Desktop" 4 | platform="Windows Desktop" 5 | runnable=true 6 | custom_features="" 7 | export_filter="all_resources" 8 | include_filter="" 9 | exclude_filter="" 10 | export_path="" 11 | patch_list=PoolStringArray( ) 12 | script_export_mode=1 13 | script_encryption_key="" 14 | 15 | [preset.0.options] 16 | 17 | texture_format/bptc=false 18 | texture_format/s3tc=true 19 | texture_format/etc=false 20 | texture_format/etc2=false 21 | texture_format/no_bptc_fallbacks=true 22 | binary_format/64_bits=true 23 | custom_template/release="" 24 | custom_template/debug="" 25 | application/icon="" 26 | application/file_version="" 27 | application/product_version="" 28 | application/company_name="" 29 | application/product_name="" 30 | application/file_description="" 31 | application/copyright="" 32 | application/trademarks="" 33 | 34 | [preset.1] 35 | 36 | name="Mac OSX" 37 | platform="Mac OSX" 38 | runnable=true 39 | custom_features="" 40 | export_filter="all_resources" 41 | include_filter="" 42 | exclude_filter="" 43 | export_path="" 44 | patch_list=PoolStringArray( ) 45 | script_export_mode=1 46 | script_encryption_key="" 47 | 48 | [preset.1.options] 49 | 50 | custom_package/debug="" 51 | custom_package/release="" 52 | application/name="" 53 | application/info="Made with Godot Engine" 54 | application/icon="" 55 | application/identifier="" 56 | application/signature="" 57 | application/short_version="1.0" 58 | application/version="1.0" 59 | application/copyright="" 60 | display/high_res=false 61 | codesign/identity="" 62 | codesign/entitlements="" 63 | texture_format/s3tc=true 64 | texture_format/etc=false 65 | texture_format/etc2=false 66 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ericdsw/bullet_spawner_test/da3743c12f6ae20c042890677b98f86d98cc211a/icon.png -------------------------------------------------------------------------------- /icon.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://icon.png" 13 | dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /project.godot: -------------------------------------------------------------------------------- 1 | ; Engine configuration file. 2 | ; It's best edited using the editor UI and not directly, 3 | ; since the parameters that go here are not all obvious. 4 | ; 5 | ; Format: 6 | ; [section] ; section goes between [] 7 | ; param=value ; assign values to parameters 8 | 9 | config_version=4 10 | 11 | _global_script_classes=[ { 12 | "base": "Reference", 13 | "class": "Bullet", 14 | "language": "GDScript", 15 | "path": "res://Bullet.gd" 16 | }, { 17 | "base": "Node2D", 18 | "class": "BulletHellSpawner", 19 | "language": "GDScript", 20 | "path": "res://BulletHellSpawner.gd" 21 | } ] 22 | _global_script_class_icons={ 23 | "Bullet": "", 24 | "BulletHellSpawner": "" 25 | } 26 | 27 | [application] 28 | 29 | config/name="BulletSpawnerTest" 30 | run/main_scene="res://Game.tscn" 31 | config/icon="res://icon.png" 32 | 33 | [memory] 34 | 35 | limits/multithreaded_server/rid_pool_prealloc=100 36 | 37 | [rendering] 38 | 39 | environment/default_environment="res://default_env.tres" 40 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | Simple project implementing a bullet hell system for Godot 3. 2 | 3 | Related to this [itch devlog](https://worldeater-dev.itch.io/bittersweet-birthday/devlog/210789/drawing-a-metric-ton-of-bullets-in-godot) 4 | --------------------------------------------------------------------------------