Forum rules - please read before posting.

Encapsulation/separation for use of Adventure Creator in a larger project...

Hello All,

Back with another question, thanks in advance for any help/thoughts.

I have an unusual setup, in that I'm using Adventure Creator for one part of a wider project (the adventure game is a module within a wider set of interconnected games).

So far I've been learning/experimenting within a separate project - but I am now planning to bring together the elements, or risk more complex integration later.

The codebase seems to have clear encapsulation already, but wondered if anyone else is or has gone through this process before, and has any tips on successfully supporting this setup. I'm assuming the rewiring of systems such as 'save' and 'localisation' are going to be a bit sticky, but for now am interested more about core functions, and whether my approach will be possible.

Thanks again,
Daniel

Comments

  • edited February 7

    Spent the evening building a process which loads AC into a broader structure, so that I can have an 'AC module' - finally got it working.

    Not sure if I approached it in the best way, so posting here for more experienced AC veterans, and just in case anyone else is trying the same.

    • As I already use additive loading in the broader structure, my initial attempts were throwing errors, as it was treating the initial scene as a sub-scene but was missing PersistentEngine.
    • I considered Force As Main within 'MultiSceneChecker' but worried this might leave various parts orphaned, and decided another approach.
    • I added a lightweight ACCore scene that loads on-demand when an AC module is requested.
    • ACCore contains the AC GameEngine, and exists only to bootstrap the PersistentEngine and AC systems without forcing AC to load during non‑AC modules.
    • So, when I want to load my AC module, I first load ACCore, then load the target scene additively.
    • After the module finishes loading, I trigger AC’s normal initialization (InitAfterLoad).
    • But, AC was struggling to assign the camera correctly, likely due to a soup of 'Main Cameras' due to the layers of additive scenes. So, I explicitly ensure the AC MainCamera is active and attached to the scene's default camera (NavCam).
    • While suppressing other cameras and EventSystems during the AC handoff, then restoring them when returning.

    Slightly worried other systems might not be initialised, or failing, but no thrown errors so far. Will keep going forward!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.