All Projects → Cultrarius → QuestWeaver

Cultrarius / QuestWeaver

Licence: Unlicense license
Procedurally generated quests and stories for computer games.

Programming Languages

C++
36643 projects - #6 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to QuestWeaver

NotQuests
Flexible, open & solid paper Quest Plugin [with GUI]
Stars: ✭ 32 (-46.67%)
Mutual labels:  quest, quests
Sceelix
A procedural generation software for automating 2D/3D content creation.
Stars: ✭ 98 (+63.33%)
Mutual labels:  procedural-generation
Photoeditor
A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
Stars: ✭ 3,105 (+5075%)
Mutual labels:  stories
balldrop
An experimental musical instrument, made with Godot 3.1.
Stars: ✭ 29 (-51.67%)
Mutual labels:  procedural-generation
Koi
Koi Farm, a koi breeding game
Stars: ✭ 343 (+471.67%)
Mutual labels:  procedural-generation
GuneyOzsanOutThereMusicVideo
Procedurally generated, real-time, demoscene style, open source music video made with Unity 3D for Out There by Guney Ozsan.
Stars: ✭ 26 (-56.67%)
Mutual labels:  procedural-generation
Ananas
An easy image editor integration for your Android apps.
Stars: ✭ 186 (+210%)
Mutual labels:  stories
DungeonGenerator
Procdural dungeon generator for Unity3D
Stars: ✭ 402 (+570%)
Mutual labels:  procedural-generation
finance-project-ddd
Projeto financeiro usando domain driven design, tdd, arquitetura hexagonal e solid
Stars: ✭ 67 (+11.67%)
Mutual labels:  entities
IntroToComputerGraphics-CityGenerator
A Procedural City Generator built in Three.js
Stars: ✭ 34 (-43.33%)
Mutual labels:  procedural-generation
waveFunctionCollapse
C implementation of Maxim Gumin's wave function algorithm done as a part of our C project at Imperial
Stars: ✭ 26 (-56.67%)
Mutual labels:  procedural-generation
story
Instagram stories like UI with rich animations and customizability.
Stars: ✭ 26 (-56.67%)
Mutual labels:  stories
procedural
Procedural generation as a service
Stars: ✭ 81 (+35%)
Mutual labels:  procedural-generation
Zuck.js
A javascript library that lets you add stories EVERYWHERE.
Stars: ✭ 3,396 (+5560%)
Mutual labels:  stories
Fortify
Dota Underlords data platform
Stars: ✭ 14 (-76.67%)
Mutual labels:  game-state
storybook-antd
🐜 Storybook for previewing Ant Design components
Stars: ✭ 57 (-5%)
Mutual labels:  stories
HexMapMadeInUnity2019ECS
Auto Create Map System Made with Unity 2019 ECS
Stars: ✭ 54 (-10%)
Mutual labels:  entities
fly
Flight simulator in OpenGL
Stars: ✭ 76 (+26.67%)
Mutual labels:  procedural-generation
MultiTileBlueNoise
Storage for blue noise textures, including mixed-tiling textures, in results/
Stars: ✭ 16 (-73.33%)
Mutual labels:  procedural-generation
MetalCity
MetalCity - a procedural night city landscape generator
Stars: ✭ 29 (-51.67%)
Mutual labels:  procedural-generation

QuestWeaver

Coverage Status

Procedurally generated quests and stories for computer games.

This project is still in its early stages and under heavy development!

Features

  • Fully portable, serializable quest system, perfect for use in savegames. Supports JSON and a compact binary format.
  • Separates quest logic from quest data (such as titles/descriptions) by using template files.
  • Can output the quest properties as simple text or HTML form to support rich formatting in the game.
  • Uses a complex weighted graph search to create new quests. This results in more interesting and coherent quest stories as world actors and entities can be reused when fitting.
  • Supports mod directories to overwrite quest templates after deployment.
  • The game world entities to be used in quests are supplied directly from a game's custom world model.

Documentation

Have a look at the API documentation!

Usage

The quest system of a game is not an isolated part of the system as it is heavily involved in the current world state and events. Therefore, the game has to provide the quest system with the necessary information about the game's state and has to fulfill change requests made by the quest system (otherwise the state will be inconsistent).

To use the QuestWeaver system, you have to follow these steps:

  • Implement and register custom TemplateFactory classes that read your custom template files
  • Implement a custom WorldModel class
  • Register your wold model and template factories with the QuestWeaver instance
QuestWeaver Init() {
    // Create your template factories
    unique_ptr<QuestTemplateFactory> questFactory = make_unique<MyQuestTemplateFactory>();
    unique_ptr<StoryTemplateFactory> storyFactory = make_unique<MyStoryTemplateFactory>();
    
    // Create Configuration
    WeaverConfig config;
    config.worldModel = make_unique<MyWorldModel>();
    config.dirs.modDirectory = "./Template/";
    shared_ptr<WorldListener> myWorldListener = make_shared<MyWorldListener>();
    
    // Create the quest system
    QuestWeaver weaver(config);
    weaver.RegisterQuestTemplateFactory(move(questFactory));
    weaver.RegisterStoryTemplateFactory(move(storyFactory));
    weaver.GetWorldModel().AddListener(myWorldListener);
    
    return weaver;
}

// Create new quests
shared_ptr<Quest> newQuest = weaver.CreateNewQuest();

Quests usually want to change the world state as well as their own state (e.g. when a quest succeeds). To do that, you can tick the quest system in your game loop and it will take care of the rest by ticking each quest separately. The WorldListener allows you to change the game state whenever the world model was changed by the quest system.

while (true) {
   // game loop ...
   
   weaver.Tick(delta); // updates the world state 
}

You can also fully serialize the quest system, e.g. to create a save game or to debug it:

void SerialTest() {
    QuestWeaver weaver = Init();
    
    // serialize
    stringstream ss; // can also be a file stream
    weaver.Serialize(ss, StreamType::JSON);
    cout << ss.str() << endl; // or save it to disk
    
    // deserialize - it is important to re-register the template factories and the world model listener!
    QuestWeaver deserialized = QuestWeaver::Deserialize(ss, StreamType::JSON, config.dirs);
    weaver.RegisterQuestTemplateFactory(move(questFactory));
    weaver.RegisterStoryTemplateFactory(move(storyFactory));
    weaver.GetWorldModel().AddListener(myWorldListener);
}

Included projects

This project uses the help of some very fine frameworks:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].