giovinazzo-kevin / Fiero

1 stars 0 forks source link

Do It In Ergo #31

Open giovinazzo-kevin opened 2 months ago

giovinazzo-kevin commented 2 months ago

Ergo has finally reached a point where it is mature enough to be used as a proper scripting language.

It is already being used to implement effects, to extend entity definitions, to define dialogue triggers and dialogue trigger handlers, and, as of last week, to generate maps and to define the prefabs that populate them.

That's all good but ideally most of the game should be entirely written in Ergo, with the Fiero engine acting as a skeleton. Right now it's an uneven mix of both, mostly because Ergo was integrated relatively late into the project.

Fiero.Core already handles the basics of Ergo scripting (event/data routing; input) , but most of the more game-specific stuff is being done in Fiero. Ideally, as much Ergo as possible should go in the core project to cement it as the engine's scripting language.

Then there's another problem... ish. Right now, entities are defined in C#. They can be extended by Ergo scripts, but not defined. It's fair, but ultimately, thanks to Fiero's ECS architecture, it's not really necessary to have the definitions available from C#. They could be expressed directly in Ergo, which would be great for modders as it would enable them to add new entities and entity types to the game.

Future work includes writing UI scripts (and possibly defining layouts, which currently is only possible in C#); actor AI scripts (also only possible in C# right now); configuration scripts and more.

Asset loading is another thing that can be done in Ergo, which is being done in C# right now. Most of it relies on JSON files, which is okay, but at this point I might as well just do everything in Ergo.

giovinazzo-kevin commented 2 months ago

This issue is related #26

giovinazzo-kevin commented 2 months ago

Fiero.Core