mirror of
https://github.com/Relintai/godot-steering-ai-framework.git
synced 2024-12-24 05:37:15 +01:00
Finish look and feel of the toy demos
Based on the 2D Beginner Project look, these demos now have the colorful GDQuest "theme" to them. This had the effect of removing the circle and triangle/ship sprites as everything is drawn in Godot directly.
This commit is contained in:
parent
4fceb866f7
commit
3f58cc4921
Binary file not shown.
Before Width: | Height: | Size: 2.3 KiB |
@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/large_circle.png-31c2e25548cad683b9cdbdea4df32e13.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/large_circle.png"
|
||||
dest_files=[ "res://.import/large_circle.png-31c2e25548cad683b9cdbdea4df32e13.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=true
|
||||
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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB |
@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/small_circle.png-e9ef462acf0465fde3767e7b0877ff44.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/small_circle.png"
|
||||
dest_files=[ "res://.import/small_circle.png-e9ef462acf0465fde3767e7b0877ff44.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=true
|
||||
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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
Binary file not shown.
Before Width: | Height: | Size: 2.7 KiB |
@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="StreamTexture"
|
||||
path="res://.import/triangle.png-fa05d9e46946b626c9973edf66af1138.stex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/sprites/triangle.png"
|
||||
dest_files=[ "res://.import/triangle.png-fa05d9e46946b626c9973edf66af1138.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=true
|
||||
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
|
||||
stream=false
|
||||
size_limit=0
|
||||
detect_3d=true
|
||||
svg/scale=1.0
|
@ -5,7 +5,7 @@
|
||||
[ext_resource path="res://demos/PursueSeek/BoundaryManager.gd" type="Script" id=3]
|
||||
[ext_resource path="res://demos/PursueSeek/PursueVSSeekDemo.gd" type="Script" id=4]
|
||||
[ext_resource path="res://assets/theme/gdquest.theme" type="Theme" id=5]
|
||||
[ext_resource path="res://assets/sprites/triangle.png" type="Texture" id=6]
|
||||
[ext_resource path="res://demos/Utils/Line2DDraw.gd" type="Script" id=6]
|
||||
[ext_resource path="res://assets/sprites/background.png" type="Texture" id=7]
|
||||
|
||||
[node name="PursueVSSeekDemo" type="Node2D"]
|
||||
@ -38,9 +38,14 @@ side_thruster_strength = 20.0
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="BoundaryManager/Player"]
|
||||
polygon = PoolVector2Array( 0, -32, -24, 32, 24, 32 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="BoundaryManager/Player"]
|
||||
modulate = Color( 0.968627, 0.188235, 0.0352941, 1 )
|
||||
texture = ExtResource( 6 )
|
||||
[node name="Line2D" type="Line2D" parent="BoundaryManager/Player"]
|
||||
points = PoolVector2Array( 0, 32, 24, 32, 0, -32, -24, 32, 0, 32 )
|
||||
width = 8.0
|
||||
default_color = Color( 0.560784, 0.870588, 0.364706, 1 )
|
||||
joint_mode = 2
|
||||
antialiased = true
|
||||
script = ExtResource( 6 )
|
||||
inner_color = Color( 0.235294, 0.639216, 0.439216, 1 )
|
||||
|
||||
[node name="Pursuer" type="KinematicBody2D" parent="BoundaryManager"]
|
||||
position = Vector2( 980, 550 )
|
||||
@ -50,9 +55,14 @@ script = ExtResource( 1 )
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="BoundaryManager/Pursuer"]
|
||||
polygon = PoolVector2Array( 0, -32, -24, 32, 24, 32 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="BoundaryManager/Pursuer"]
|
||||
modulate = Color( 1, 0.937255, 0.0235294, 1 )
|
||||
texture = ExtResource( 6 )
|
||||
[node name="Line2D" type="Line2D" parent="BoundaryManager/Pursuer"]
|
||||
points = PoolVector2Array( 0, 32, 24, 32, 0, -32, -24, 32, 0, 32 )
|
||||
width = 8.0
|
||||
default_color = Color( 1, 0.709804, 0.439216, 1 )
|
||||
joint_mode = 2
|
||||
antialiased = true
|
||||
script = ExtResource( 6 )
|
||||
inner_color = Color( 0.890196, 0.411765, 0.337255, 1 )
|
||||
|
||||
[node name="Seeker" type="KinematicBody2D" parent="BoundaryManager"]
|
||||
position = Vector2( 980, 150 )
|
||||
@ -64,9 +74,14 @@ use_seek = true
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="BoundaryManager/Seeker"]
|
||||
polygon = PoolVector2Array( 0, -32, -24, 32, 24, 32 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="BoundaryManager/Seeker"]
|
||||
modulate = Color( 0.278431, 0.815686, 0.14902, 1 )
|
||||
texture = ExtResource( 6 )
|
||||
[node name="Line2D" type="Line2D" parent="BoundaryManager/Seeker"]
|
||||
points = PoolVector2Array( 0, 32, 24, 32, 0, -32, -24, 32, 0, 32 )
|
||||
width = 8.0
|
||||
default_color = Color( 0.301961, 0.65098, 1, 1 )
|
||||
joint_mode = 2
|
||||
antialiased = true
|
||||
script = ExtResource( 6 )
|
||||
inner_color = Color( 0.294118, 0.356863, 0.670588, 1 )
|
||||
|
||||
[node name="GUI" type="PanelContainer" parent="."]
|
||||
margin_right = 1024.0
|
||||
@ -88,9 +103,9 @@ margin_bottom = 100.0
|
||||
rect_min_size = Vector2( 0, 84 )
|
||||
bbcode_enabled = true
|
||||
bbcode_text = "Pursue vs. Seek Demo
|
||||
Move the player around with WASD and notice the [color=yellow]yellow Pursuer[/color] and the [color=lime]green Seeker[/color] follow
|
||||
the [color=red]red \"Ship\"[/color] around"
|
||||
Move the player around with WASD and notice the [color=#ffb570]orange Pursuer[/color] and the [color=aqua]blue Seeker[/color] follow
|
||||
the [color=lime]green \"Ship\"[/color] around"
|
||||
text = "Pursue vs. Seek Demo
|
||||
Move the player around with WASD and notice the yellow Pursuer and the green Seeker follow
|
||||
the red \"Ship\" around"
|
||||
Move the player around with WASD and notice the orange Pursuer and the blue Seeker follow
|
||||
the green \"Ship\" around"
|
||||
scroll_active = false
|
||||
|
@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=4 format=2]
|
||||
|
||||
[ext_resource path="res://assets/sprites/small_circle.png" type="Texture" id=1]
|
||||
[ext_resource path="res://demos/Utils/CircleDraw.gd" type="Script" id=1]
|
||||
[ext_resource path="res://demos/Quickstart/Bullet.gd" type="Script" id=2]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
@ -13,11 +13,10 @@ script = ExtResource( 2 )
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="."]
|
||||
modulate = Color( 0.141176, 0.188235, 0.901961, 1 )
|
||||
scale = Vector2( 0.25, 0.25 )
|
||||
texture = ExtResource( 1 )
|
||||
script = ExtResource( 1 )
|
||||
inner_color = Color( 0.235294, 0.639216, 0.439216, 1 )
|
||||
outer_color = Color( 0.560784, 0.870588, 0.364706, 1 )
|
||||
stroke = 2.0
|
||||
|
||||
[node name="Lifetime" type="Timer" parent="."]
|
||||
process_mode = 0
|
||||
|
@ -1,12 +1,20 @@
|
||||
[gd_scene load_steps=5 format=2]
|
||||
[gd_scene load_steps=6 format=2]
|
||||
|
||||
[ext_resource path="res://assets/sprites/triangle.png" type="Texture" id=1]
|
||||
[ext_resource path="res://demos/Utils/Line2DDraw.gd" type="Script" id=1]
|
||||
[ext_resource path="res://demos/Quickstart/Agent.gd" type="Script" id=2]
|
||||
[ext_resource path="res://demos/Quickstart/Player.gd" type="Script" id=3]
|
||||
[ext_resource path="res://demos/Quickstart/Bullet.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://assets/sprites/background.png" type="Texture" id=5]
|
||||
|
||||
[node name="QuickStartDemo" type="Node2D"]
|
||||
|
||||
[node name="BackgroudLayer" type="CanvasLayer" parent="."]
|
||||
layer = -1
|
||||
|
||||
[node name="Background" type="Sprite" parent="BackgroudLayer"]
|
||||
texture = ExtResource( 5 )
|
||||
centered = false
|
||||
|
||||
[node name="Player" type="KinematicBody2D" parent="." groups=[
|
||||
"Player",
|
||||
]]
|
||||
@ -19,9 +27,14 @@ bullet = ExtResource( 4 )
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Player"]
|
||||
polygon = PoolVector2Array( 0, -32, -24, 32, 24, 32 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Player"]
|
||||
modulate = Color( 0.968627, 0.188235, 0.0352941, 1 )
|
||||
texture = ExtResource( 1 )
|
||||
[node name="Line2D" type="Line2D" parent="Player"]
|
||||
points = PoolVector2Array( 0, 32, 24, 32, 0, -32, -24, 32, 0, 32 )
|
||||
width = 8.0
|
||||
default_color = Color( 0.560784, 0.870588, 0.364706, 1 )
|
||||
joint_mode = 2
|
||||
antialiased = true
|
||||
script = ExtResource( 1 )
|
||||
inner_color = Color( 0.235294, 0.639216, 0.439216, 1 )
|
||||
|
||||
[node name="Agent" type="KinematicBody2D" parent="."]
|
||||
position = Vector2( 807.798, 141.773 )
|
||||
@ -33,8 +46,13 @@ script = ExtResource( 2 )
|
||||
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Agent"]
|
||||
polygon = PoolVector2Array( 0, -32, -24, 32, 24, 32 )
|
||||
|
||||
[node name="Sprite" type="Sprite" parent="Agent"]
|
||||
modulate = Color( 0.478431, 0.87451, 0.0784314, 1 )
|
||||
texture = ExtResource( 1 )
|
||||
[node name="Line2D" type="Line2D" parent="Agent"]
|
||||
points = PoolVector2Array( 0, 32, 24, 32, 0, -32, -24, 32, 0, 32 )
|
||||
width = 8.0
|
||||
default_color = Color( 1, 0.709804, 0.439216, 1 )
|
||||
joint_mode = 2
|
||||
antialiased = true
|
||||
script = ExtResource( 1 )
|
||||
inner_color = Color( 0.890196, 0.411765, 0.337255, 1 )
|
||||
|
||||
[node name="Bullets" type="Node2D" parent="."]
|
||||
|
14
project/demos/Utils/Line2DDraw.gd
Normal file
14
project/demos/Utils/Line2DDraw.gd
Normal file
@ -0,0 +1,14 @@
|
||||
tool
|
||||
extends Line2D
|
||||
|
||||
|
||||
export(Color) var inner_color := Color() setget set_inner_color
|
||||
|
||||
|
||||
func _draw() -> void:
|
||||
draw_colored_polygon(points, inner_color)
|
||||
|
||||
|
||||
func set_inner_color(val: Color) -> void:
|
||||
inner_color = val
|
||||
update()
|
Loading…
Reference in New Issue
Block a user