GithubHelp home page GithubHelp logo

fdb's People

Contributors

ze0nni avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

fdb's Issues

Load database from multi sources and hot reload

For example we can separate table config with diffrent languages to different files:

var DB  = DB.Reslover.Load<DB>(
    "Assets/Resources/DB.core.json", 
    $"Assets/Resource/DB.locale_{_currentLocale}.json");
...
// On locale changed
DB.Reslover.Reload(DB, $"Assets/Resource/DB.locale_{_currentLocale}.json");

Union header type

Implements base abstract type:

abstract class Union<TTag> {
    public TTag Tag;
}

Regular implementation:

enum VariableType {
    Int;
    String;
    Bool;
}

class Variable  : Union<VariableType> {
   public string Name;
   [UnionCase] public int Int;
   [UnionCase] public string String;
   [UnionCase] public bool Bool;
}

TTag can be enum or string

UnionCase can be optional parameterized with string: [UnionCase("Bool")]

Variable is displayed on the screen as three headers:
Name - regular string field
Tag - Popup with three cases: Int, String, Bool,
Value - Dynamic field, then display one of field Int String or Bool depending on the Tag value

levelIndex<>

Way to create sub-database

class DB {
  Index ...
  Index ...
  LevelIndex<LevelDB> Levels;
}

class LevelDB {
  Index ...
  Index ...
}

Subdatabase separete to own furydb-file by can refer to Indexes from main DB

LevelIndex data not loaded in memory with main database and need call Load() method before use it

Supports ScriptableObjects and MonoBehaviour as fields of config

Problem arises at the moment of build player.
Objects will not be included in the assembly. Need way to resolve dependency on build.

One of solution -- generate ScriptableObject with list of all resources and put it in Resources folder

Correct way is using ScriptedImporter

Nodes<> and Link<>

Way to create thinks, like dialog system:

class DB {
   Index<DialogConfig>Dialogs;
}


class DialogConfig {
  Kind<DialogConfig> Kind;
  Nodes<ReplicNode> Replics;
}

class ReplicNode {
  //string __GUID hidden field
  // string Id optional field
  Ref<CharacterConfig> Character;
  Ref<TextConfig> Text;
  Link<ReplicNode> NextReplic;
}

Node can be Union.

Node can have some Link<>-fild or List<Link<>>or nested objects containing Link

class DialogNode {
  Ref<TextConfig> Text;
  List<DialogOption> Options;
}

class DialogOption {
  Ref<TextConfig> Text;
  Link<DialogNode> Next;
}

Nodes implementation look like this

class Nodes<T> {
  T Root;
  List<T> Nodes;
}

Link<T> {
  T Node;
}

After save all nodes, who not linked to root are removed

Nodes can be edited as visual graph. Like shader-graph

No idea about nested Nodes<>

Display content as timeline

class LevelConfig {
  Kind<LevelConfig> Kind;
  [Timeline("TimelineName", Start = "Start", Duration = "Duration")]
  List<SpawnerRecord> Snapnwrs;
}

class SpawnerRecord {
  public int Start;
  public int Duration;
}

class TimelineAttribute {
  string TimelineName;
  string? StartField;
  string? EndField;
  string? DurationField;
}

Attribute mast have Start and End or Start and Duration

Type of Start can be int, float or enum

Start End and Duration can be fields or get-property. In case of field user can move and resize field with mouse.

collection can have few Timeline attributes with different names

Have idea about endless-flag

ranges

Provide min and max timeline range from parent type:

class LevelConfig {
  ...
  int Min = 0;
  int Max = 100;
  [Timeline("TimelineName", Start = "Start", Duration = "Duration", Min = "Min", Max = "Max")]
  List<SpawnerRecord> Snapnwrs;
}

Category for tables

Add popup near pages list where you can filter visible pages by categorys

Singletons

Support top level classes without Index:

class DB {
   StartGameConfig StartGame;
   Index<Foo> Foos;
   Index<Bar> Bars;
}

class StartGameConfig {
    int StartGold;
    List<Ref<HeroConfig>> StartHeroes;
    Ref<LocationConfig> StartLocation;
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.