[Community Project] Real Time Strategy Game. NEW MODELS AVAILABLE. SEE POST #1

@Everyone
I’ve been working on building construction. I wanted to implement a step-by-step building construction scheme like in Tropico. However I wanted this to be customizable and as much indepdenat as possible. Currently there are 3 main classes invloved.

  1. ConstructionManager
    This class manages the construction queue. An instance will be available in player controller. Whenever you want a new building, you ask the construction manger to build one. You must pass the priority, construction rate modifier. and a construction config struct whcih contains the class name of the building, class name of contruction proxy (see below) and work-hours needed to build it, and transform

  2. Building
    This is the class we already have, my code does not depend on this one and so it can be anything.

  3. ConstructionProxy
    This is the major class. When you place a building that has non-zero build time, instead of placing the building right away, the construction manager places a proxy. The proxy has multiple meshes, particle effects and audio that will be used during various stages of construction. How many stages and which effects are used in each stage are customizable. Construction amanger will assign work force for a proxy based on game logic and priorities. The proxy simply uses the avalable work force and adavces the building construction percentage, it switches to the efefcts assigned for each stage. When the construction is completed, it will notify the construction manager.

Once CM (Construction Manager) receives the notification, it will destroy the proxy, and replace it with an instance of the building class specified in the original reuqest. Optionally it can fire and event which the caller code (where the actual queue request came from) can use.

So for each construtible building, you must have (ideally) a class extended from ConstructionProxy. However you can re-use same ConstructionProxy across different buildings if they look the same (Gold mine and Silver ine both look same during construction).

I have not finalized the design and any input is welcome. Let me know what you think.

I could not push it since many of the things are hard-coded (we still dont have workers or citizens yet). But once the code is a bit stable I will publish it and we might be ab;e to test it using Blutility