Merge pull request #656 from Calinou/switch-more-demos-to-gles2

Switch 2D Platformer and Multiplayer Bomber demos to GLES2
This commit is contained in:
Aaron Franke
2022-02-13 13:43:44 -06:00
committed by GitHub
15 changed files with 121 additions and 164 deletions

View File

@@ -17,7 +17,7 @@ they contain a lot of comments that explain how each class works.
Language: GDScript
Renderer: GLES 3 (particles are not available in GLES 2)
Renderer: GLES 2
Check out this demo on the asset library: https://godotengine.org/asset-library/asset/120

View File

@@ -240,6 +240,7 @@ mipmap_policy=1
[rendering]
quality/driver/driver_name="GLES2"
quality/intended_usage/framebuffer_allocation=0
quality/intended_usage/framebuffer_allocation.mobile=1
2d/snapping/use_gpu_pixel_snap=true

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=15 format=2]
[gd_scene load_steps=13 format=2]
[ext_resource path="res://assets/art/player/bullet/bullet.png" type="Texture" id=1]
[ext_resource path="res://assets/audio/sfx/explode.wav" type="AudioStream" id=2]
@@ -179,26 +179,6 @@ blend_mode = 1
offsets = PoolRealArray( 0.5, 1 )
colors = PoolColorArray( 1, 1, 1, 1, 0, 0, 0, 1 )
[sub_resource type="GradientTexture" id=8]
gradient = SubResource( 7 )
width = 256
[sub_resource type="ParticlesMaterial" id=9]
emission_shape = 1
emission_sphere_radius = 8.0
flag_disable_z = true
spread = 180.0
gravity = Vector3( 0, 250, 0 )
initial_velocity = 120.0
initial_velocity_random = 0.5
orbit_velocity = 0.0
orbit_velocity_random = 0.0
angle_random = 1.0
scale_random = 1.0
color_ramp = SubResource( 8 )
hue_variation = 0.05
hue_variation_random = 0.46
[node name="Enemy" type="KinematicBody2D"]
collision_layer = 2
collision_mask = 24
@@ -239,7 +219,7 @@ anims/walk = SubResource( 4 )
rotation = -1.5708
shape = SubResource( 5 )
[node name="Explosion" type="Particles2D" parent="."]
[node name="Explosion" type="CPUParticles2D" parent="."]
self_modulate = Color( 1, 1, 1, 0.12 )
material = SubResource( 6 )
emitting = false
@@ -249,8 +229,18 @@ one_shot = true
speed_scale = 1.2
explosiveness = 0.76
draw_order = 215832976
process_material = SubResource( 9 )
texture = ExtResource( 1 )
emission_shape = 1
emission_sphere_radius = 8.0
spread = 180.0
gravity = Vector2( 0, 250 )
initial_velocity = 120.0
initial_velocity_random = 0.5
angle_random = 1.0
scale_amount_random = 1.0
color_ramp = SubResource( 7 )
hue_variation = 0.05
hue_variation_random = 0.46
[node name="Hit" type="AudioStreamPlayer2D" parent="."]
stream = ExtResource( 3 )

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=9 format=2]
[gd_scene load_steps=8 format=2]
[ext_resource path="res://assets/art/player/bullet/bullet.png" type="Texture" id=1]
[ext_resource path="res://src/Objects/Bullet.gd" type="Script" id=2]
@@ -8,21 +8,12 @@
[sub_resource type="CanvasItemMaterial" id=2]
blend_mode = 1
[sub_resource type="ParticlesMaterial" id=3]
flag_disable_z = true
spread = 0.0
gravity = Vector3( 0, 0, 0 )
orbit_velocity = 0.0
orbit_velocity_random = 0.0
scale = 0.8
color = Color( 1, 1, 1, 0.705882 )
[sub_resource type="CanvasItemMaterial" id=3]
[sub_resource type="CanvasItemMaterial" id=4]
[sub_resource type="CircleShape2D" id=5]
[sub_resource type="CircleShape2D" id=4]
radius = 4.5
[sub_resource type="Animation" id=6]
[sub_resource type="Animation" id=5]
resource_name = "destroy"
length = 0.3
tracks/0/type = "method"
@@ -73,27 +64,31 @@ contacts_reported = 1
contact_monitor = true
script = ExtResource( 2 )
[node name="Particles2D" type="Particles2D" parent="."]
[node name="Particles2D" type="CPUParticles2D" parent="."]
material = SubResource( 2 )
emitting = false
lifetime = 0.3
speed_scale = 3.0
local_coords = false
process_material = SubResource( 3 )
texture = ExtResource( 1 )
spread = 0.0
gravity = Vector2( 0, 0 )
scale_amount = 0.8
color = Color( 1, 1, 1, 0.705882 )
[node name="Sprite" type="Sprite" parent="."]
material = SubResource( 4 )
material = SubResource( 3 )
texture = ExtResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource( 5 )
shape = SubResource( 4 )
[node name="Timer" type="Timer" parent="."]
one_shot = true
autostart = true
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/destroy = SubResource( 6 )
anims/destroy = SubResource( 5 )
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="timeout" from="Timer" to="." method="destroy"]