From e5386e633b05062d67f4b0df352c283eb7c7ab5b Mon Sep 17 00:00:00 2001 From: chimchooree Date: Thu, 1 Dec 2022 00:49:10 -0600 Subject: [PATCH] documentation - messagebus, base, knowledgebase --- src/blessfrey-gdd/docs/MessageBus | 34 ++++++++++++++++ src/blessfrey-gdd/docs/base | 58 ++++++++++++++++++++++++++++ src/blessfrey-gdd/docs/knowledgebase | 36 +++++++++++++++++ src/blessfrey-gdd/docs/messagebus | 34 ++++++++++++++++ src/views/blessfrey-presskit.tpl | 10 ++--- 5 files changed, 167 insertions(+), 5 deletions(-) create mode 100644 src/blessfrey-gdd/docs/MessageBus create mode 100644 src/blessfrey-gdd/docs/base create mode 100644 src/blessfrey-gdd/docs/knowledgebase create mode 100644 src/blessfrey-gdd/docs/messagebus diff --git a/src/blessfrey-gdd/docs/MessageBus b/src/blessfrey-gdd/docs/MessageBus new file mode 100644 index 0000000..e61f1fc --- /dev/null +++ b/src/blessfrey-gdd/docs/MessageBus @@ -0,0 +1,34 @@ +

The MessageBus is a node singleton that delivers messages and data between objects. It rests at res://Singleton/MessageBus.gd.

+
+

flow

+

A handler first subscribes to a topic. When a particular topic comes up, it is published and passed to the subscribed handlers. When a topic is no longer relevant to a handler or the handler exited the tree, it unsubscribes.

+
+

Also, all objects that inherit from the base request a ref_id at ready.

+
+

signals

+


+
+

variables


+


+
+

methods


+

int designate_ref_id()

+

increments current_ref_id by one then returns it.

+
+

void publish(String topic, ??? data)

+

If the topic has any active subscriptions, its handlers are prompted to handle the data.

+
+

void subscribe(String topic, Object handler)

+

An entry in topics is made for the topic if needed, then the handler is added to the topic's list.

+
+

void unsubscribe(String topic, Object handler)

+

if the topic has an active subscription, the given handler is erased from the topic's list.

+
+

void _on_handler_tree_exited(String topic, Object handler)

+

During subscribe, the handler is connected to execute this if it exits the tree. It unsubscribes the handler from the topic.

+
diff --git a/src/blessfrey-gdd/docs/base b/src/blessfrey-gdd/docs/base new file mode 100644 index 0000000..446f9f2 --- /dev/null +++ b/src/blessfrey-gdd/docs/base @@ -0,0 +1,58 @@ +

The Base is a node with IDs, a name, and a description. It rests at res://Entity/Base.gd.

+
+

flow

+

At ready, it gains a ref_id from the MessageBus.

+
+

signals

+


+
+

variables


+


+
+

setters + getters

+

Color get_base_id ()

+

base_id getter

+
+

??? get_base_id_in_hex()

+

returns base_id in hex

+
+

String get_desc()

+

returns description in current language

+
+

String get_desc_key()

+

desc_key getter

+
+

String get_display_name()

+

returns display name in current language

+
+

bool get_is_player()

+

returns whether this object is the player

+
+

void set_ref_id(new_ref_id)

+

ref_id setter

+
+

int get_ref_id()

+

ref_id getter

+

+

methods


+

bool compare_base_id(second_object)

+

returns whether this object and the given object are the same kind of object.

+
+

bool compare_base_id_to_hex(hex)

+

returns whether this object has the given hex as a base id.

+
+

bool compare_ref_id(second_object)

+

returns whether this object and the given object are the exact same object.

+
+

??? make_instance(path)

+

returns an instance of the scene at the given path.

+
diff --git a/src/blessfrey-gdd/docs/knowledgebase b/src/blessfrey-gdd/docs/knowledgebase new file mode 100644 index 0000000..49e3d0b --- /dev/null +++ b/src/blessfrey-gdd/docs/knowledgebase @@ -0,0 +1,36 @@ +

The KnowledgeBase is a node singleton that stores and manages all the knowledge in the game. It rests at res://Singleton/KnowledgeBase.gd.

+
+

flow

+

On ready, the encountered, forgot, and learned topics and handlers are set up.

+
+

Knowledge is learned by setting +
+

Also, all objects that inherit from the base request a ref_id at ready.

+
+

signals

+


+
+

variables


+


+
+

methods


+

int designate_ref_id()

+

increments current_ref_id by one then returns it.

+
+

void publish(String topic, ??? data)

+

If the topic has any active subscriptions, its handlers are prompted to handle the data.

+
+

void subscribe(String topic, Object handler)

+

An entry in topics is made for the topic if needed, then the handler is added to the topic's list.

+
+

void unsubscribe(String topic, Object handler)

+

if the topic has an active subscription, the given handler is erased from the topic's list.

+
+

void _on_handler_tree_exited(String topic, Object handler)

+

During subscribe, the handler is connected to execute this if it exits the tree. It unsubscribes the handler from the topic.

+
diff --git a/src/blessfrey-gdd/docs/messagebus b/src/blessfrey-gdd/docs/messagebus new file mode 100644 index 0000000..e61f1fc --- /dev/null +++ b/src/blessfrey-gdd/docs/messagebus @@ -0,0 +1,34 @@ +

The MessageBus is a node singleton that delivers messages and data between objects. It rests at res://Singleton/MessageBus.gd.

+
+

flow

+

A handler first subscribes to a topic. When a particular topic comes up, it is published and passed to the subscribed handlers. When a topic is no longer relevant to a handler or the handler exited the tree, it unsubscribes.

+
+

Also, all objects that inherit from the base request a ref_id at ready.

+
+

signals

+


+
+

variables


+


+
+

methods


+

int designate_ref_id()

+

increments current_ref_id by one then returns it.

+
+

void publish(String topic, ??? data)

+

If the topic has any active subscriptions, its handlers are prompted to handle the data.

+
+

void subscribe(String topic, Object handler)

+

An entry in topics is made for the topic if needed, then the handler is added to the topic's list.

+
+

void unsubscribe(String topic, Object handler)

+

if the topic has an active subscription, the given handler is erased from the topic's list.

+
+

void _on_handler_tree_exited(String topic, Object handler)

+

During subscribe, the handler is connected to execute this if it exits the tree. It unsubscribes the handler from the topic.

+
diff --git a/src/views/blessfrey-presskit.tpl b/src/views/blessfrey-presskit.tpl index 2eb98b2..4e54dbb 100644 --- a/src/views/blessfrey-presskit.tpl +++ b/src/views/blessfrey-presskit.tpl @@ -19,7 +19,7 @@
  • Price: $874.99 USD
  • Press Contact: find me IRL
  • Social: taking a social media break but should try Mastodon, HIVE more seriously
  • - +

    @@ -41,12 +41,12 @@ The dual-class and skillbar building systems are inspired by Guild Wars 1 and Ma
  • Freely relocate skill points and swap out skills in safe zones
  • Learn new skills through themed exploration and gameplay. No skill shops nor UI skill trees
  • Explore an above ground rural town and an underground world populated by fantasy species
  • - +

    Developer

    - Chimchooree has a programming and art background, studying both in school and at home since she was a kid. Her five favorite videogames are Oblivion, Guild Wars 1, Arcanum, Divine Divinity, and Anachronox. Keep up with her activity on her dev diary.
    + Chimchooree has a programming and art background, studying both in school and at home since she was a kid. Her five favorite videogames are Oblivion, Guild Wars 1, Arcanum, Divine Divinity, and Anachronox. Keep up with her activity on her dev diary.

    @@ -59,7 +59,7 @@ The dual-class and skillbar building systems are inspired by Guild Wars 1 and Ma

    Contact

    -

    I'll link social media, etc, later.

    +

    I'll link social media, etc, later.

    @@ -70,7 +70,7 @@ The dual-class and skillbar building systems are inspired by Guild Wars 1 and Ma
  • Design: chimchooree, husband
  • Engine: Godot Engine
  • Full Credits
  • - +