Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

VnScene class and auxillaries #1

@jhanschoo

Description

@jhanschoo

The task is to well-architect the part of the game as it relates to orchestrating scenes of a VN, by focusing on creating a VnScene class.

Class Design:

  1. The VnScene class may have a constructor into which providers are injected, but it's OK to leave this part of the VnScene API underspecified (i.e. consider hardcoding the game objects that the vnscene manages, rather than worry about injecting them) for the experiment.
  2. The VnSceneclass should implement an Updatable<T extends SpecificType> interface, so that it has an .update(message: T) method. It then acts based on the message received, as well as perhaps delegates messages (with potential transformation) to its member objects (e.g. dialog object, stage object (manipulating character sprites on the screen, etc.).
  3. The SpecificType above should be chosen to include (for now, and for this experiment), raw key and mouse state and input, as well as game tick information. In a more elaborate architecture we may revise this to receive more semantic messages.

Demo implementation:

In addition to the above, also implement some simple input-dependent behavior upon update (and possibly creation) in the vnscene's subobjects (don't have to actually represent dialog/stage/etc., just some basic feedback). Instantiate a vnscene object as a member of the Game singleton during game loading, and hook the vnscene's update to be called by the game's update method. Then verify that the game ticks and user input get propagated down to the vnscene's subobjects by observing their feedback.

Further details:

When completed, a working Phaser3 game instance should exist in a top-level folder vnscene that contains the VnScene class in vnscene.ts, an Updatable interface in types/updatable.ts (under appropriate folder hierarchies if desired or necessary), and various dummy classes that will be instantiated into dummy member objects of a vnscene object.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions