Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: docacappella on Mon 25/10/2021 21:30:37

Title: Multiple game styles
Post by: docacappella on Mon 25/10/2021 21:30:37
I would like to create a meta-point and click game that alternates styles, e.g. Level 1 is lucasarts, level 2 is Verb Coin, etc. Once I choose a template, can I program multiple styles on that template?
Title: Re: Multiple game styles
Post by: Crimson Wizard on Mon 25/10/2021 21:54:15
Template is simply a collection of starting resources, where everything may be altered or erased completely.

For switching UI styles, I see two possible approaches:

1. Create multiple script modules, each controlling its own UI style, with all the standard event handlers in each of them (on_mouse_click, on_key_pressed, and so on). They will have to check some global variable to know which style is currently active, and those modules which are not active would simply skip doing anything (not respond to mouse clicks, etc).

An alternate to approach 1 is to script UI style right in the room, because room scripts are also allowed to have "on_mouse_click" and similar event handlers. Because only 1 room is active at the same time you would not even need a global variable telling which style is active.

2. Similarily create multiple script modules, one per style, but don't place any actual event handlers in them. Instead make custom functions that ought to be called from global script. Global script would choose which module to call when events happen.