10/18/2023 Code Generators!


So my project is in Monogame and I'm trying to build an Entity-Component-System for it. I have a base class "Component" that each entity has an array of. Components essentially only contain data and not behavior in them. I have these Systems that then apply the behavior of certain components. I'd like to have the user of my game engine, "Chuggengine" be able to create a class derived from "System" and then be able to describe how the system works. I need said Systems Initialized when the game starts. I could manually add an initialization call every time I add a new component but it would be nice if I could just have the code generated for use. That is where the Source Generators come in. Source Generators can be used to write code that writes code for you. You have to setup a 2nd project in your C# solution to use them. Now that it is working in my project it will make creating my engine much easier. I'm hoping to get a room editor working next.

Get Pyxel Knight

Buy Now$10.00 USD or more

Leave a comment

Log in with itch.io to leave a comment.