pongodot

Tinkering with Godot, remaking pong
git clone git://git.hellocld.com/pongodot
Log | Files | Refs

commit 75a3fb032ea74d5ba3a825e25b92ea847a326a28
parent b28e366b0d758c457f54030c55b3b5659dee7efb
Author: Christopher Ray Langford <chris@hellocld.com>
Date:   Mon, 11 Nov 2019 06:59:09 -0500

Project changes + missed files from last commit

Diffstat:
MGame.gd | 1+
MGame.tscn | 5++++-
AHUD.tscn | 44++++++++++++++++++++++++++++++++++++++++++++
ASprites/System6-UI-Slice.aseprite | 0
ASprites/System6-UI-Slice.png | 0
ASprites/System6-UI-Slice.png.import | 34++++++++++++++++++++++++++++++++++
MSprites/bg-01.png.import | 2+-
Mproject.godot | 2+-
8 files changed, 85 insertions(+), 3 deletions(-)

diff --git a/Game.gd b/Game.gd @@ -11,6 +11,7 @@ func _ready(): p2_score = 0 func _print_score(): + $HUD/Score.text = "%02d | %02d" % [p1_score, p2_score] print("P1 %d | P2 %d" % [p1_score, p2_score]) func _on_Goal_1_body_entered(area): diff --git a/Game.tscn b/Game.tscn @@ -1,10 +1,11 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=7 format=2] [ext_resource path="res://Game.gd" type="Script" id=1] [ext_resource path="res://Sprites/bg-01.png" type="Texture" id=2] [ext_resource path="res://Ball.tscn" type="PackedScene" id=3] [ext_resource path="res://Paddle.tscn" type="PackedScene" id=4] [ext_resource path="res://Goal.tscn" type="PackedScene" id=5] +[ext_resource path="res://HUD.tscn" type="PackedScene" id=6] [node name="Game" type="Node2D"] script = ExtResource( 1 ) @@ -34,5 +35,7 @@ _player = "p2" [node name="Goal 2" parent="." instance=ExtResource( 5 )] position = Vector2( 8, 171 ) + +[node name="HUD" parent="." instance=ExtResource( 6 )] [connection signal="body_entered" from="Goal 1" to="." method="_on_Goal_1_body_entered"] [connection signal="body_entered" from="Goal 2" to="." method="_on_Goal_2_body_entered"] diff --git a/HUD.tscn b/HUD.tscn @@ -0,0 +1,44 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Sprites/System6-UI-Slice.png" type="Texture" id=1] +[ext_resource path="res://Fonts/Chicago.ttf" type="DynamicFontData" id=2] + +[sub_resource type="DynamicFont" id=1] +size = 12 +outline_color = Color( 0, 0, 0, 1 ) +font_data = ExtResource( 2 ) + +[node name="HUD" type="Node2D"] +position = Vector2( 256, 24 ) + +[node name="Background" type="NinePatchRect" parent="."] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -34.5 +margin_top = -15.5 +margin_right = 34.5 +margin_bottom = 15.5 +texture = ExtResource( 1 ) +patch_margin_left = 4 +patch_margin_top = 12 +patch_margin_right = 4 +patch_margin_bottom = 4 +axis_stretch_horizontal = 2 +axis_stretch_vertical = 2 + +[node name="Score" type="Label" parent="."] +anchor_left = 0.5 +anchor_top = 0.5 +anchor_right = 0.5 +anchor_bottom = 0.5 +margin_left = -22.5 +margin_top = -4.0 +margin_right = 22.5 +margin_bottom = 11.0 +custom_fonts/font = SubResource( 1 ) +custom_colors/font_color = Color( 0, 0, 0, 1 ) +text = "00 | 00" +align = 1 +valign = 1 diff --git a/Sprites/System6-UI-Slice.aseprite b/Sprites/System6-UI-Slice.aseprite Binary files differ. diff --git a/Sprites/System6-UI-Slice.png b/Sprites/System6-UI-Slice.png Binary files differ. diff --git a/Sprites/System6-UI-Slice.png.import b/Sprites/System6-UI-Slice.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/System6-UI-Slice.png-5a53d9949ff27b052041ff652938c160.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Sprites/System6-UI-Slice.png" +dest_files=[ "res://.import/System6-UI-Slice.png-5a53d9949ff27b052041ff652938c160.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=false +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 diff --git a/Sprites/bg-01.png.import b/Sprites/bg-01.png.import @@ -20,7 +20,7 @@ compress/hdr_mode=0 compress/bptc_ldr=0 compress/normal_map=0 flags/repeat=0 -flags/filter=true +flags/filter=false flags/mipmaps=false flags/anisotropic=false flags/srgb=2 diff --git a/project.godot b/project.godot @@ -55,5 +55,5 @@ p2_down={ [rendering] -quality/driver/driver_name="GLES2" +quality/filters/anisotropic_filter_level=1 environment/default_environment="res://default_env.tres"