Extensions Start - NocturnalWisp/Tynted-Engine GitHub Wiki

What are they?

Extensions are incredibly helpful for those who want to reuse code quickly and efficiently. Game Extensions allow you to add your own components and systems for later use.

Note. This is a bit more advanced and are used to add extensions on top of the engine. If you have not created a game using the engine, or have no clue what you are doing, do not worry about this.

Creation

To actually use the Game Extension class, your best method of attack would be to follow these steps:

  1. Create a new C# class library (framework).
  2. Add a reference to the Tynted Engine dll.
  3. Add a main class with a chosen Game Extension name.
  4. Add your system and component classes as you see fit.
  5. Override the initialize class in your main class.
  6. Populate the systems and components lists in the class with your system and component type classes you have created.

Usage

Using the extension takes a couple of steps.

  1. Build your project either release or debug depending if you are ready to release it or not.
  2. Add a reference in your game project to the extension dll you have created. (Found in the extension project bin/[debug|release]). You only need the one dll; don't worry about the others.
  3. Load the extension before calling base.Initialize(); in your game class.
LoadExtension<YourExtensionClassName>();
  1. You can now utilize each of the systems and components in your engine.

API

Once you have done all of the above, you may need to see exactly what functions and aspects you can change in the GameExtensions Class. You can check that out here.