Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Echoform Source License
=======================

Copyright (c) 2025 Floffah
All rights reserved.

This repository is made publicly accessible for the purposes of transparency, personal portfolio,
technical discussion, and internal or collaborative documentation.

This is **not an open source license**. No license is granted to use, copy,
modify, publish, distribute, sublicense, or sell any part of the source code,
assets, documentation, or other files in this repository.

You may:

- View the contents of this repository for personal reference
- Discuss the contents publicly, so long as no code is reused, copied, or redistributed in any form

You may **not**:

- Reuse, incorporate, or adapt this code or any part of it in your own project
- Copy, redistribute, or mirror any portion of the codebase or its assets
- Fork or clone this repository
- Publish this code under another name or license
- Use the code or assets in any commercial, open source, or public-facing project
- Use the code or assets in educational settings, except as explicitly defined below

All content in this repository is the intellectual property of the author(s) and
is protected under applicable copyright and intellectual property laws.

The author(s) retain full rights to:

- Remove or privatize this repository at any time
- Release parts or all of the project under a different license in the future
- Commercialize the project, including selling it on platforms such as Steam

Violation of these terms may result in legal action under applicable intellectual property law.

For licensing inquiries, collaboration requests, or permission to use any part of
this project, please contact: [enquiries@floffah.dev](mailto:enquiries@floffah.dev) / https://www.floffah.dev

---

## Amendments

### Educational Use Exception

You are permitted to use this code in **non-commercial educational settings** for the purposes of learning, classroom instruction, or academic exploration, provided that:

- You do not publish, upload, or otherwise distribute modified or unmodified versions of the code, in whole or in part
- You do not use the code or any derived version in **any commercial or monetized context**, including but not limited to:
- YouTube tutorials
- Educational blog posts or articles
- Paid courses (online or in-person)
- Online or public repositories containing this code
- Proper attribution is given to the original author when used in academic presentations or internal materials
- No part of the code or project is used in software that is publicly accessible, even if non-commercial, without explicit written permission from the author(s)
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
tMy attempt at making an MMO game using Godot and Bun.
# 📜 License Notice
This repository is provided for transparency, personal portfolio, and documentation purposes. <br/>
It is not open source. All rights reserved by the author.

See [`LICENSE`](./LICENSE) for full terms.

# Echoform

My attempt at making an MMO game using Godot and Bun.

Packages:

Expand Down
2 changes: 1 addition & 1 deletion game/project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ config_version=5
[application]

config/name="EchoformMMOGame"
run/main_scene="res://scenes/connecting_menu.tscn"
run/main_scene="res://scenes/connecting_menu/connecting_menu.tscn"
config/features=PackedStringArray("4.5", "C#", "Forward Plus")
config/icon="res://icon.svg"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,20 @@
[gd_scene load_steps=2 format=3 uid="uid://b5fc11a4rltt1"]

[ext_resource type="Script" uid="uid://ogabnaxf3i7u" path="res://scripts/menus/mainmenu.gd" id="1_84nss"]
[ext_resource type="Script" uid="uid://ogabnaxf3i7u" path="res://scripts/menus/mainmenu.gd" id="1_jxs3d"]

[node name="ConnectingMenu" type="Node2D"]
script = ExtResource("1_84nss")
[node name="ConnectingMenu" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_jxs3d")

[node name="Button" type="Button" parent="."]
layout_mode = 0
offset_left = 259.0
offset_top = 126.0
offset_right = 300.0
Expand Down
7 changes: 7 additions & 0 deletions game/scenes/connecting_menu/content_theme.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://cpub04oardilt"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4cf6d"]
bg_color = Color(0.29219002, 0.29219005, 0.29218993, 1)

[resource]
PanelContainer/styles/panel = SubResource("StyleBoxFlat_4cf6d")
4 changes: 4 additions & 0 deletions game/scenes/modal/basic_text_modal.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
extends CenterContainer

func _on_dismiss_button_pressed() -> void:
queue_free()
1 change: 1 addition & 0 deletions game/scenes/modal/basic_text_modal.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://bnyr4aeean5tf
91 changes: 91 additions & 0 deletions game/scenes/modal/basic_text_modal.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
[gd_scene load_steps=7 format=3 uid="uid://bpo5ihu8h4jji"]

[ext_resource type="Script" uid="uid://bnyr4aeean5tf" path="res://scenes/modal/basic_text_modal.gd" id="1_37te1"]
[ext_resource type="Theme" uid="uid://cfw15mand7swi" path="res://scenes/modal/header_theme.tres" id="1_bfvhs"]
[ext_resource type="Theme" uid="uid://cpub04oardilt" path="res://scenes/connecting_menu/content_theme.tres" id="2_37te1"]

[sub_resource type="LabelSettings" id="LabelSettings_84nss"]
font_size = 21

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_os3fi"]
content_margin_left = 4.0
content_margin_top = 4.0
content_margin_right = 4.0
content_margin_bottom = 4.0
bg_color = Color(0.1, 0.1, 0.1, 0.6)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
expand_margin_left = 7.0
expand_margin_right = 7.0

[sub_resource type="Theme" id="Theme_yr8gy"]
Button/font_sizes/font_size = 12
Button/styles/normal = SubResource("StyleBoxFlat_os3fi")

[node name="CenterContainer" type="CenterContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_37te1")

[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
theme_override_constants/separation = 0

[node name="Header" type="PanelContainer" parent="VBoxContainer"]
layout_mode = 2
theme = ExtResource("1_bfvhs")

[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/Header"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 5

[node name="Title" type="Label" parent="VBoxContainer/Header/MarginContainer"]
layout_mode = 2
text = "Title"
label_settings = SubResource("LabelSettings_84nss")

[node name="Content" type="PanelContainer" parent="VBoxContainer"]
layout_mode = 2
theme = ExtResource("2_37te1")

[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/Content"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 10
theme_override_constants/margin_bottom = 5

[node name="Label" type="Label" parent="VBoxContainer/Content/MarginContainer"]
layout_mode = 2
text = "Some content"

[node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"]
layout_mode = 2
theme = ExtResource("2_37te1")

[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/PanelContainer"]
layout_mode = 2
theme_override_constants/margin_left = 10
theme_override_constants/margin_top = 5
theme_override_constants/margin_right = 12
theme_override_constants/margin_bottom = 5

[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/PanelContainer/MarginContainer"]
layout_direction = 3
layout_mode = 2

[node name="DismissButton" type="Button" parent="VBoxContainer/PanelContainer/MarginContainer/HBoxContainer"]
layout_mode = 2
theme = SubResource("Theme_yr8gy")
text = "OK"

[connection signal="pressed" from="VBoxContainer/PanelContainer/MarginContainer/HBoxContainer/DismissButton" to="." method="_on_dismiss_button_pressed"]
7 changes: 7 additions & 0 deletions game/scenes/modal/header_theme.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://cfw15mand7swi"]

[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_84nss"]
bg_color = Color(0.08485205, 0.14823782, 0.08485826, 1)

[resource]
PanelContainer/styles/panel = SubResource("StyleBoxFlat_84nss")
13 changes: 13 additions & 0 deletions game/scenes/modal/specialised/couldnt_connect_modal.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[gd_scene load_steps=2 format=3 uid="uid://bdry5nvuem1jo"]

[ext_resource type="PackedScene" uid="uid://bpo5ihu8h4jji" path="res://scenes/modal/basic_text_modal.tscn" id="1_ralu3"]

[node name="CenterContainer" instance=ExtResource("1_ralu3")]

[node name="Title" parent="VBoxContainer/Header/MarginContainer" index="0"]
text = "Could not connect"

[node name="Label" parent="VBoxContainer/Content/MarginContainer" index="0"]
text = "An error occurred while trying to connect
to the server. Please contact the
developers for more information."
9 changes: 9 additions & 0 deletions game/scripts/authoritative/AuthoritativeServerConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ public partial class AuthoritativeServerConnection : Node {
private string _accessToken;
private string _refreshToken;

private readonly PackedScene couldntConnectModalScene =
ResourceLoader.Load<PackedScene>("res://scenes/modal/specialised/couldnt_connect_modal.tscn");

public override void _Ready() {
if (Instance != null) {
GD.PrintErr("AuthoritativeServerConnection instance already exists. Destroying duplicate.");
Expand Down Expand Up @@ -49,6 +52,12 @@ private void OnRequestCompleted(long result, long responseCode, string[] headers
} else {
GD.PrintErr("Authentication failed. Response code: ", responseCode, ", Body: ",
Encoding.UTF8.GetString(body));

var couldntConnectModal = couldntConnectModalScene.Instantiate<CenterContainer>();
couldntConnectModal.SetAnchorsPreset(Control.LayoutPreset.FullRect);
GetTree().Root.AddChild(couldntConnectModal);

Reset();
}
}

Expand Down
2 changes: 1 addition & 1 deletion game/scripts/menus/mainmenu.gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends Node2D
extends Control

func _on_play_pressed():
AuthoritativeServerConnection.SendReady()