Skip to content

b-faze/faze

Repository files navigation

faze

Maintainability Coverage Status

Banner


Package NuGet Build
Faze.Abstractions NuGet NuGet Build Status
Faze.Core NuGet NuGet Build Status
Faze.Core.IO NuGet NuGet Build Status
Faze.Engine NuGet NuGet Build Status
Faze.Rendering NuGet NuGet Build Status
Faze.Rendering.Video.FFMPEG NuGet Build Status

About

faze is a collection of NuGet packages, providing tools and pipelines for visualising game logic as images. For more information please check out the gitbook at https://b-hub.gitbook.io/faze/ for documentation, examples and blogs.

Gallery

Publish Gallery

See an example gallery online at https://b-faze.github.io/faze/

Everything in the gallery is produced from this repository in Faze.Examples.Gallery.CLI, try it for yourself! The Gallery CLI splits the visualisation pipelines in half allowing data to be pre-computed (generate-data) to help speed up rendering (generate-images)

 Usages:
   generate-data [options]
   generate-images [options]
   generate-settings [options]
   check-images [pptions]
   
 generate-data options:
   --id         Generates data for a given id  [string]
  
 generate-images options:
   --album      Generates images for a given album  [string]
 
 generate-settings options:
  
 check-images options:
   

Quick Start

Create a new .NET Core 3.1 (or any platform supporting .NET Standard 2.0) console application and install the Faze.Rendering NuGet package.

nuget install Faze.Rendering

Change your Main method to the following:

 static void Main(string[] args)
 {
     var size = 3;
     var maxDepth = 4;

     var rendererOptions = new SquareTreeRendererOptions(size, 500)
     {
         BorderProportion = 0.1f
     };

     IPipeline pipeline = ReversePipelineBuilder.Create()
         .File("my_first_visualisation.png")
         .Render(new SquareTreeRenderer(rendererOptions))
         .Paint<object>(new CheckeredTreePainter())
         .LoadTree(new DynamicSquareTreeOptions<object>(size, maxDepth, info => null), new DynamicTreeDataProvider<object>());

     pipeline.Run();
 }

Run your console application and see your first visualisation! Have a look in your bin folder for 'my_first_visualisation.png', otherwise give it a custom filepath e.g. @"C:\path\of\your\choice\my_first_visualisation.png".

my_first_visualisation

For creating your own trees and visualisations see gitbooks documentation or clone this repository and see the gallery examples.