BG Database (inMemory database | Excel/Google Sheets syncing | CodeGen | Save/Load support)

BG Database is game data manager with Excel/GoogleSheets syncing, Code generation, Saving/Loading

Integration with: Unity VisualScripting (ex-Bolt), Playmaker, Flow Canvas, Node Canvas, Behavior Designer, UNode, Game Creator.

Home page: http://www.bansheegz.com/BGDatabase
Asset store: https://assetstore.unity.com/packages/tools/integration/bg-database-112262

https://www.youtube.com/watch?v=wCw34r-ISVA

1 Like

Hi, I saw your attractive assets.
I'll ask you a few questions publicly before I buy your assets.

  1. Does this DB run only on main thread? Can this DB run on sub thread?
  2. Can this DB communicate with multi-threaded function?
  3. How compatible is it with the 2018 version? (Job or ECS)

P.S. I am not an English speaker. I am sorry for poor English.

[quote=“Nihilus0”, post:2, topic: 700422]
Hi, I saw your attractive assets.
I’ll ask you a few questions publicly before I buy your assets.

  1. Does this DB run only on main thread? Can this DB run on sub thread?
  2. Can this DB communicate with multi-threaded function?
  3. How compatible is it with the 2018 version? (Job or ECS)

P.S. I am not an English speaker. I am sorry for poor English.
[/quote]

Hi, Cosmoraph, thank you for your interest in our asset!

  1. Currently, our DB is not thread-safe (it’s supposed to be run on the main thread), but we were thinking about adding multithreading support as an option if there is any demand for this.
  2. DB does not call any code outside (apart from event listeners). A multi-threaded function cannot call DB (cause it’s not thread-safe )
  3. We were thinking about new Unity’s Jobs and ECS and how we could integrate with them, but we’ve run out of ideas. Actually, you can easily create Unity’s Entities using information from the database without multithreading, and after you created these Entities, there is no much sense in storing them in the database unless you want to be able to save and load them afterwards. But if you want to save them, you could easily create a thread-safe function for this and call it when user want to save the game. So other than this usecase, there is no sense in using database (maybe we were wrong)

Anyway, if you are interested in using our asset in a multithreaded environment (probably with Jobs/ECS), we could

  1. provide you with free evaluation copy (so you could decide if you want to use it or not)
  2. If you decide you want to use it, we send you a voucher (so you could download our package for free), and a beta version with multithreading support. Later we decide together what needs to be added.

Please, let me know if you are interested.

@BansheeGz ,
Thank you for your reply.
I bought it right away and am reviewing your performance.
Before 'multi-threaded evaluation Copy' request, I ask you a few more questions.

I found out that BGID is essential to access Entity on the code. But I need a way to search by a method other than BGID.
If the table is set to a unique name, is there any way I can search by name to get the Row I want?
In addition, I wish I could set up each Row with an ordered number instead of a unique name, and I would like it to be able to search by numbers in this order.
Is there a way to do these? If not, can you add these features?

Cosmoraph, thank you for purchasing!

1) In 1.2 version, which went live today several hours ago, there is a method to get entity by name: BGEntity result = meta["entityName"]; Additionally if you use CodeGen you can generate static getters for each entity (if the number of entities <1024)

2) To search by predicate, use

List<BGEntity> result =  meta.FindEntities(entity => entity.Get<int>("damage")>10);
BGEntity result =  meta.FindEntity(entity => entity.Get<int>("damage")>10);

sorry, we forgot to add it to API page
Also, note, we used very bad decision to use temporary list in meta.FindEntities method to get rid of Garbage Collection

EDIT:
3)We've added Comparison parameter to Find/Iterate methods, so rows could be sorted.
I've sent you an updated package.
So, the signatures now are:

List<BGEntity> FindEntities(Predicate<BGEntity> filter, List<BGEntity> result = null, Comparison<BGEntity> sort = null)
void ForEachEntity(Action<BGEntity> action, Predicate<BGEntity> filter = null,Comparison<BGEntity> sort = null)

Here are some examples:
1) Without code generation

//find all items with damage>5 and return them in ascensing order
List<BGEntity> items = BGRepo.I["Items"].FindEntities(e => e.Get<int>("damage") > 5, null, (e1, e2) => e1.Get<int>("damage").CompareTo(e2.Get<int>("damage")));

2) The same with code generation:

List<Items> items = Items.FindEntities(e => e.damage > 5, null, (e1, e2) => e1.damage.CompareTo(e2.damage));

Cosmoraph, with regard to performance: at the moment we are investigating opportunities to improve it, including the possibility to reduce the cost of field value getter(and partially setter) to single access to an array element (at least with generated code).
Probably we won't be able to make it any faster than accessing array element by its index (without using C++)

[quote=“BansheeGz”, post:5, topic: 700422]

  1. In 1.2 version, which went live today several hours ago, there is a method to get entity by name: BGEntity result = meta[“entityName”]; …
  2. To search by predicate …
    3)We’ve added Comparison parameter to Find/Iterate methods, so rows could be sorted. I’ve sent you an updated package.
    [/quote]
    @BansheeGz ,
    I checked 1.2 version over the weekend. I am satisfied with the update. However, 3) is the 1.3 version? I’ll check as soon as updates register with the Unity store. Thank you for your quick updates.

Cosmoraph, yes, the sorting delegate parameter (Comparison) is in the 1.2.1Beta now.
I've sent beta version to you in the private message.
If you did not receive it, please, write to our support email, we'll send it by email.
We plan to release 1.2.1 version next week

[quote=“BansheeGz”, post:6, topic: 700422]
Cosmoraph, with regard to performance: at the moment we are investigating opportunities to improve it, including the possibility to reduce the cost of field value getter(and partially setter) to single access to an array element (at least with generated code).
Probably we won’t be able to make it any faster than accessing array element by its index (without using C++)
[/quote]
Version 1.2.1 (with performance upgrade) is live.

1 Like

@BansheeGz , With Unity Types, when editing tables, it would be good if you could see a small preview of things like sprites, texture2ds, meshes, gameobjects in the cell? Would this be possible?

How do you store these in the Table databases? As path names to the assets in the Resource folder path?

@Duffer123, yes, we will add it. I will send an update to you in a private message very shortly.
Yes, we store it as path names to assets in Resources folder or in a asset bundle.
We want to add support for Unity's addressables in the new version ( https://forum.unity.com/threads/addressables-are-here.536304/ )

1 Like

I would be quite interested in seeing what you come up with if you were to move forward with a multithreaded implementation of this. I have been working on an RPG and actually have been thinking of revisiting my data storage setup.

Even if you don't, I still like what you guys have going on there from what I can see.

@MostHated
could you please email us at support@bansheegz.com ?
We could provide you with free beta copy for review and we will be very interested to hear your opinion
I hope it will be ready within 1-2 weeks

[quote=“BansheeGz”, post:11, topic: 700422]
We want to add support for Unity’s addressables in the new version ( https://forum.unity.com/threads/addressables-are-here.536304/ )
[/quote]
We’ve added support for Unity addressables. (BGDatabase version 1.2.3)
We also added Unity assets preview in the table cells and drag and drop support.

1 Like

@BansheeGz ,

Just installed v1.24. I have Windows 10 and Unity 2018.2.10f1.

I am still getting the following (non-breaking) yellow warnings:-

There are inconsistent line endings in the 'Assets/BansheeGz/BGDatabase/Examples/Scripts/Generated/BGGeneratedPlaymaker.cs' script. Some are Mac OS X (UNIX) and some are Windows.
This might lead to incorrect line numbers in stacktraces and compiler errors. Many text editors can fix this using Convert Line Endings menu commands.

Lighting data asset ‘LightingData’ is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt.

Lighting data asset ‘LightingData’ is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt.

Lighting data asset ‘LightingData’ is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt.
UnityEditorInternal.InternalEditorUtility:GetGameObjectInstanceIDFromComponent(Int32)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Lighting data asset ‘LightingData’ is incompatible with the current Unity version. Please use Generate Lighting to rebuild the lighting data. Realtime Global Illumination cannot be used until the lighting data is rebuilt.
UnityEditorInternal.InternalEditorUtility:GetGameObjectInstanceIDFromComponent(Int32)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

Just thought I better flag it.

1 Like

@Duffer123_1 ,
Oh, I'm sorry, it slipped my mind, thank you for reminding me.
we'll have it fixed soon (I'll send you an updated package just in case you are interested)

Next version (ETA: end of next week) should have new node-based graph editor for building templates

EDIT: this feature is delayed, unfortunately

1 Like

@BansheeGz ,

Whaaat? Tell me more about this graph editor...

1 Like

@Duffer123_1 ,

We want to build a node-based graph tool to query/update database data without need to write code.
Something like Shader Graph https://unity3d.com/ru/shader-graph , but instead of building shaders we want to query/update data with it.
And these graphs need to be executable at runtime.
At the very least, we want to replace our templates with this tool ASAP, cause they are very basic and not very useful at all.
After the tool is released, any feedback would be greatly appreciated.

1 Like

@BansheeGz , will probably require more tutorial vids

1 Like

@BansheeGz , How's it going with development of this Asset? Anything next in the pipeline?

1 Like