Post by Admin on Jul 16, 2016 3:40:59 GMT
Simon Schmid @sschmid Aug 06 2015 01:04
True, e.position.position might look strange. I tried naming fields in components with only one field "value"
var pos = e.position.value;
var score = e.score.value;
// instead of
var score = e.score.score;
movrajr @movrajr Aug 06 2015 08:06
I made some Visual Studio templates for Entitas. Useful? github.com/movrajr/Entitas-CSharp-VSTemplates
Maxim Zaks @mzaks Aug 06 2015 18:36
@movrajr 👍
zyzyx @zyzyxdev Aug 06 2015 20:36
would it be possible to create entities and setup (gameobject)references at design time?
Maxim Zaks @mzaks Aug 06 2015 20:50
as I wrote in my post. medium.com/@icex33/games-data-and-entitas-c4245a1f1566
Entitas is designed to represent runtime data. Config is data that you create and change during design time.
When you start the application there is a mechanism that reads configs and player state and transforms it into runtime data = entities.
However there could be some other way that we didn't thought about.
When you setting up game object at design time, you save them as part of the scene or in separate prefabs.
I guess you would need to go with the first strategy which I described in the article in the section about linking entities with game objects
Simon Schmid @sschmid Aug 06 2015 20:50
@zyzyxdev We'll start working on a new feature soon that will make this task very easy. It's in the Roadmap and is called "Create entities and components at runtime". This will also enable you to add entities and components at design time
Maxim Zaks @mzaks Aug 06 2015 20:51
Well technically it will be runtime, but you could generate configs out of it.
zyzyx @zyzyxdev Aug 06 2015 20:57
sounds great!
Simon Schmid @sschmid Aug 06 2015 21:02
yeah, @mzaks is right
zyzyx @zyzyxdev Aug 06 2015 21:05
yes I guess I was actually thinking of a more visual (unity "style") way to generate the config rather than actually create the entities
Simon Schmid @sschmid Aug 06 2015 22:19
@zyzyxdev Using Match One as an example, you could visually layout a level with gameObjects and have a LevelEditor script generating a json based on the gameObjects in the scene. So a "save" button would generate a json from the gameObjects, a "load" button would create gameObjects from the json...
At runtime you load a level json and create entities
That worked really good for me. I might work a little bit on the Match One example soon and show you what I mean
zyzyx @zyzyxdev Aug 06 2015 22:37
seems easy enaugh
so I would have to Find() all the view gameobjects by name or something, right?
Simon Schmid @sschmid Aug 06 2015 22:43
Exactly
zyzyx @zyzyxdev Aug 06 2015 23:57
ok, thanks
True, e.position.position might look strange. I tried naming fields in components with only one field "value"
var pos = e.position.value;
var score = e.score.value;
// instead of
var score = e.score.score;
movrajr @movrajr Aug 06 2015 08:06
I made some Visual Studio templates for Entitas. Useful? github.com/movrajr/Entitas-CSharp-VSTemplates
Maxim Zaks @mzaks Aug 06 2015 18:36
@movrajr 👍
zyzyx @zyzyxdev Aug 06 2015 20:36
would it be possible to create entities and setup (gameobject)references at design time?
Maxim Zaks @mzaks Aug 06 2015 20:50
as I wrote in my post. medium.com/@icex33/games-data-and-entitas-c4245a1f1566
Entitas is designed to represent runtime data. Config is data that you create and change during design time.
When you start the application there is a mechanism that reads configs and player state and transforms it into runtime data = entities.
However there could be some other way that we didn't thought about.
When you setting up game object at design time, you save them as part of the scene or in separate prefabs.
I guess you would need to go with the first strategy which I described in the article in the section about linking entities with game objects
Simon Schmid @sschmid Aug 06 2015 20:50
@zyzyxdev We'll start working on a new feature soon that will make this task very easy. It's in the Roadmap and is called "Create entities and components at runtime". This will also enable you to add entities and components at design time
Maxim Zaks @mzaks Aug 06 2015 20:51
Well technically it will be runtime, but you could generate configs out of it.
zyzyx @zyzyxdev Aug 06 2015 20:57
sounds great!
Simon Schmid @sschmid Aug 06 2015 21:02
yeah, @mzaks is right
zyzyx @zyzyxdev Aug 06 2015 21:05
yes I guess I was actually thinking of a more visual (unity "style") way to generate the config rather than actually create the entities
Simon Schmid @sschmid Aug 06 2015 22:19
@zyzyxdev Using Match One as an example, you could visually layout a level with gameObjects and have a LevelEditor script generating a json based on the gameObjects in the scene. So a "save" button would generate a json from the gameObjects, a "load" button would create gameObjects from the json...
At runtime you load a level json and create entities
That worked really good for me. I might work a little bit on the Match One example soon and show you what I mean
zyzyx @zyzyxdev Aug 06 2015 22:37
seems easy enaugh
so I would have to Find() all the view gameobjects by name or something, right?
Simon Schmid @sschmid Aug 06 2015 22:43
Exactly
zyzyx @zyzyxdev Aug 06 2015 23:57
ok, thanks