Skip to content

Commit

Permalink
Make instructions clearer
Browse files Browse the repository at this point in the history
I cut down on the verbosity and added colors.
  • Loading branch information
AdamLearns committed Sep 2, 2024
1 parent fba4b44 commit 19e9c22
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 16 deletions.
8 changes: 8 additions & 0 deletions JumpRoyale/Resources/RichTextLabelTheme.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[gd_resource type="Theme" format=3 uid="uid://keary5vfopmg"]

[resource]
RichTextLabel/colors/font_shadow_color = Color(0, 0, 0, 0.196078)
RichTextLabel/constants/shadow_offset_x = 2
RichTextLabel/constants/shadow_offset_y = 2
RichTextLabel/constants/shadow_outline_size = 2
RichTextLabel/font_sizes/normal_font_size = 25
23 changes: 10 additions & 13 deletions JumpRoyale/scenes/LobbyOverlay.tscn
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://bvl6vnp0t3iy6"]
[gd_scene load_steps=5 format=3 uid="uid://bvl6vnp0t3iy6"]

[ext_resource type="Script" path="res://src/LobbyOverlay.cs" id="1_15rvs"]
[ext_resource type="StyleBox" uid="uid://ccjbiokdyflra" path="res://Resources/UIBackground.tres" id="1_banke"]
[ext_resource type="Theme" uid="uid://keary5vfopmg" path="res://Resources/RichTextLabelTheme.tres" id="3_8c3v8"]
[ext_resource type="LabelSettings" uid="uid://b4hkbiiau0wu3" path="res://Resources/LobbyLabelSettings.tres" id="3_wrh45"]

[node name="LobbyOverlay" type="PanelContainer"]
Expand All @@ -13,22 +14,18 @@ script = ExtResource("1_15rvs")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2

[node name="JoinInstructions" type="Label" parent="VBoxContainer"]
[node name="Instructions" type="RichTextLabel" parent="VBoxContainer"]
texture_filter = 2
layout_mode = 2
text = "Type \"join\" to play!"
label_settings = ExtResource("3_wrh45")
theme = ExtResource("3_8c3v8")
bbcode_enabled = true
text = "Type [color=cyan]join[/color] to play!
Jump with [color=cyan]j[/color] [[color=yellow]-90[/color] to [color=yellow]90[/color]]
([color=gray]see example jumpers below[/color])
[node name="JumpInstructions" type="Label" parent="VBoxContainer"]
texture_filter = 2
layout_mode = 2
text = "Type \"!jr\" for more instructions
The bots will demonstrate how to jump
Jump angles:
- \"j\" command: -90 to 90
- \"r\" / \"l\" commands: 0 to 90
Type [color=cyan]!jr[/color] for more instructions
"
label_settings = ExtResource("3_wrh45")
fit_content = true

[node name="LobbyTimer" type="Label" parent="VBoxContainer"]
unique_name_in_owner = true
Expand Down
16 changes: 13 additions & 3 deletions JumpRoyale/src/Arena.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,19 @@ public partial class Arena : Node2D
private readonly Dictionary<string, InstructionBot> _instructionBotsTemplates =
new()
{
["jumps_left"] = new("jumps_left", "j -45 OR l 45", TileSizeInPixels * 105, 45),
["jumps_up"] = new("jumps_up", "u OR u u", TileSizeInPixels * 60, 90),
["jumps_right"] = new("jumps_right", "j 30 OR r 30", TileSizeInPixels * 20, 120),
["jumps_left"] = new(
"jumps_left",
"[color=cyan]j -45[/color] or [color=cyan]l 45[/color]",
TileSizeInPixels * 105,
45
),
["jumps_up"] = new("jumps_up", "[color=cyan]u[/color]", TileSizeInPixels * 60, 90),
["jumps_right"] = new(
"jumps_right",
"[color=cyan]j 30[/color] or [color=cyan]r 30[/color]",
TileSizeInPixels * 20,
120
),
};

private readonly Collection<Jumper> _spawnedInstructionBots = [];
Expand Down

0 comments on commit 19e9c22

Please sign in to comment.