Howdy, Stranger!

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

GS Design Patterns

ronixusronixus Posts: 19Member
edited July 2012 in Off-Topic
Hi everyone,

I'm new to GS and been wondering if there are established design patterns in place for Game Salad development.

I've seen there are a number of different ways to achieve a specific event, for instance:

"Change the Image of an Actor from Image A to B"

1. You can do this directly inside of an actor through a rule-triggered "Change Image".

2. You can control this same event through a rule-triggered "Change Attibute", which references the "self.image" attribute.

3. You can also control this from another actor through a rule-triggered Game-Level variable.

4. You can also control this through another actor directly through the scene expressions, which allow you to access other actors directly.

Given the many ways to trigger a specific event, is there any established pattern of usage that we can follow? Something like a Model-View-Controller concept?

Best Answer


  • tatiangtatiang Posts: 11,909Member, Sous Chef, PRO, Senior Sous-Chef
    edited July 2012
    Great question, but I don't know of any such established patterns. People tend to learn as they go and certainly there are better and worse ways to do something but I don't know that anyone has listed them all in one place.

    It often comes down to a question of resource usage, so certain ways of doing things (e.g. recycling actors vs. spawning & destroying) are preferable, but it can just as easily be a matter of preference (e.g. Change Image works fine unless you need to have image names that match imported images, such as when you want to change an image based on a game-level attribute; see custom font videos, for example).

    If you follow someone like @tshirtbooth's videos at (and featured prominently within these forums), you'll find that his methods are often the best way to achieve something. Other senior members ("line cooks," "sous chefs," and certain members) are just as likely to offer best practices, so feel free to ask about specific needs.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

This discussion has been closed.