Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

mysticfall/opticat

Repository files navigation

Opticat logo

Opticat

Opticat is an experimental API designed for game development. Currently, it's focusing on text-based role-playing games using LLM(Large Language Model)s, but it may change in the future.

Project Status

Currently, Opticat is in the proof-of-concept stage. Created to serve as a testbed for trying out various ideas about programming paradigms, it's purely experimental at this point and not suitable for practical purposes.

Statements Branches Functions Lines
Statements Branches Functions Lines

Motivation

The main idea behind the project is to combine key elements of Object-Oriented Programming (OOP) and Functional Programming (FP) using a data-driven approach.

Specifically, it aims to incorporate the extendable behaviours of a concept hierarchy typically shown in OOP design, with the immutability and statelessness of FP.

The Actor class, for example, defines what properties and behaviours a game character should have, similar to what "Actor Form" in Skyrim's Creation Engine does.

In contrast to Skyrim, however, an Actor instance in our API corresponds to a Form rather than an individual actor.

And since Opticat embraces a data-driven approach, all states of an individual character is represented as an immutable data structure, ActorData.

This pattern — of having a class representing a form, and a corresponding data structure storing its states — applies to most core concepts in Opticat.

Also, WorldData is the top-level context that holds all in-game data, and every state updating API (e.g. one that changes a character's attribute) adheres to the ubiquitous signature WorldData => Either<Error, WorldData>.

Documentation

API documentation can be accessed from this link.

License

Opticat is an open-source project, available under the MIT License.

Releases

No releases published

Packages

No packages published

Languages