Forum rules - please read before posting.

Player Cursor heavy dependencies

edited September 2014 in Engine development
Hello,

As adventure creator is mainly for adventure scenes (I do not want to rely on AC in menus or scene that do not require navigation nor interactions), we suffer cursor troubles when going in maps where AC is not present. We still appreciate the way AC handle the cursor (especially being compatible on many platforms).

And here what I think about cursors: a cursor is just a cursor, it has no mechanics, its mainly for the show.

So I thought; first of all, why isnt the cursor in persistent engine? It it is obviously not scene dependent, so alright I moved it to persistent engines, I knew this would cause a few mess there and there. StateHandler complains a lot, because it gets all of its reference from playerCursor, which is pretty much unexpected. So I had to change part of state handler too 
GameObject persistentEngine = GameObject.FindWithTag(Tags.persistentEngine);
GameObject gameEngine = GameObject.FindWithTag(Tags.gameEngine);
playerCursor = persistentEngine.GetComponent<PlayerCursor>();
playerInput = gameEngine.GetComponent<PlayerInput>();
playerInteraction = gameEngine.GetComponent<PlayerInteraction>();
playerMovement = gameEngine.GetComponent<PlayerMovement>();
dialog = gameEngine.GetComponent<Dialog>();
There ! Way better. Yet I realize It relies heavily on PlayerInput for computing screen position of the cursor. I can't go further on, too many dependencies lies in PlayerInput, which prevent me from keeping a consistency in cursor across the whole game.

I have no choice but to provide a second system for handling cursor.

Also, as a final note, PlayerCursor does not care whether there are no cursors displayed once it get destroyed. So you might end up having no cursor at all if you leave adventure creator scenes.

Regards

Comments

  • I don't think you need to go to quite this much trouble to override AC's cursor settings.  Have you tried using the Engine: Manage systems Action?  With that, you can choose disable the different modules that make up AC, including the cursor.

    As a technical aside, the PlayerCursor script is part of GameEngine because it does not store data that needs to survive scene changes.  That's the key difference with the PersistentEngine - it only stores data that can't be left as a scene-based object.
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.