Forum rules - please read before posting.

Preferred approach to scene navigation in a simple 2D slideshow style game

Hi,
I've been looking through the manual and the forum, and I'm struggling to find what feels like an ideal solution to navigation for a simple slide show game. I started with using action lists assigned to buttons (up, down, left, right) to switch scenes by names, but that logic breaks down since each button's function changes depending on the active scene.

I can think of clumsy ways to work around this by creating an obscene number of individual navigation menus, but I'm sure there's a more appropriate method. I've seen some mention of node-based navigation for 1st person games. I'm not sure if this is more appropriate or if that's also overkill for what I'm trying to accomplish.

As always, any insight would be greatly appreciated.
Thanks,
Brandon

Comments

  • Yes, there is a node-based 2D game over on the Downloads page. It uses a bit of custom scripting, and an arrangement of all backgrounds/cameras in the same scene, to work. This is mainly due to the "turning" feature, that complicates the number of backgrounds needed for each location.

    Normally, you can rely on ActionList parameters to dynamically alter Action content at runtime. However, if you're splitting up each area into a different scene, I expect Scene Attributes would be helpful here. These are essentially Variables you can define for your scene - each scene will have them, but each scene will have their own value.

    You can set these in the Scene Manager. If you define, e.g. a String named "Up Scene", you can set this to the name of the scene you wish to switch to when clicking your Up button.

    To have the Up button then open this scene, use the scene attribute token in your Scene: Switch Action to have it be replaced with the attribute's value for that scene at runtime. This attribute takes the form:

    [scene:X]
    

    Where "X" is the ID of the attribute. More on attributes like this can be found in the Manual's "Text tokens" chapter.

  • Ah! Scene Attributes is a perfect solution. After a brief initial trip-up related to Constant IDs matching, I now have these working nicely with my existing navigation buttons and scene transition effects.

    This is exactly what I was looking for -- It's much more elegant than the workarounds I was trying to make due with. Thanks again for the help.

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.