Author Topic: Multiple game styles  (Read 158 times)

Multiple game styles
« on: 25 Oct 2021, 21:30 »
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?

Re: Multiple game styles
« Reply #1 on: 25 Oct 2021, 21:54 »
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.