game salad study
DESCRIPTION
GameSalad Tutorial for BeginnersTRANSCRIPT
![Page 1: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/1.jpg)
GameSaladYoung-min Kang
Tongmyong University
![Page 2: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/2.jpg)
GameSalad
• http://gamesalad.com
• Advertised as
• The world’s fastest game creation engine.
• Design games for free - no coding required
![Page 3: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/3.jpg)
Requirements
• Mac OS X 10.6 Snow Leopard+
• GameSalad Creator with registered account
• registered Apple developer account
• internet
• image editor for creating sprites
![Page 4: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/4.jpg)
Download and Install
• Go GameSalad website
• http://gamesalad.com
• Sign in
• Download GameSalad Creator
• Install it on your Mac machine
![Page 5: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/5.jpg)
Interface
• GameSalad Creator dialog upon launch
select your project type
![Page 6: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/6.jpg)
Project info
![Page 7: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/7.jpg)
user interface• back/forward buttons
• previous or next task window
• web preview
• launches your game on web browser
• home
• project main window
• publish
• publishes your game to web, iPhone, iPad, Mac, Android
• scene
• drop down menu to jump to a specific scenes
• feedback
• sends your opinion to GameSalad developer
• preview
• plays your game within the GameSalad Creator
![Page 8: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/8.jpg)
Scene editor• click “initial scene” in the “scene” drop down menu
• you will see a scene editor like this
![Page 9: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/9.jpg)
What you see in scene editor
• Game Inspector
• actors: every object in the game
• attributes: attributes of the objects
• devices: configuration for mouse, touch screen, accelerometer, display, and audio
• Scene Inspector
• attributes: attributes of the current level
• layers: creates layers and specifies whether they are scrollable or not
• Behavior library
• standard: standard behaviors provided by GameSalad
• custom: behaviors created by users
• Images library
• project: images loaded for project
• purchased: images purchased at marketplace
![Page 10: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/10.jpg)
What you see in scene editor
• Images library
• project: images loaded for project
• purchased: images purchased at marketplace
• Sounds library
• music and sound effects loaded for project
• Actor mode
• general mouse mode to select actors
• Camera mode
• camera control mode
• Reset Scene
• stops your level preview and goes back to initial state
• Play
• preview the current level of your game project
![Page 11: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/11.jpg)
Actor• Game inspector
• click “+” button at actor mode
• double click your new actor to invoke the actor editor
• In actor editor
• change the actor size to 32 x 32
• click back button to get back to scene editor
• move your actor to your scene
• click “play” button
• nothing happens
• Scene inspector
• in attribute mode, set the gravity to be (x=0, y=300)
• click “play” button, and watch the actor falls
![Page 12: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/12.jpg)
Static platform• Game inspector
• click “+” button at actor mode
• you can change the name of your actors
• ex: Actor 1: player, Actor 2: platform
• double click the actor “platform” to launch actor editor
• change the size to (width=350, height=10)
• you can also change its color
• physics
• set bounciness as 0 (non-elastic bounce)
• uncheck “movable” option to make it static
• get back to level editor
• drag your platform to your level
![Page 13: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/13.jpg)
Collision behavior• double click “player” actor
• set its bounciness to 0
• in library, find “collide” and drag it to the window where “drag your behaviors here” is written
• let the player bounce when colliding with “platform”
![Page 14: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/14.jpg)
Adding more behaviors• in actor editor, create a group and name the group as “Controls”
• click “create rule” and name it as “Move Left”
• drag the rule “Move Left” into the group “Controls”
• make the actor receives “key” event and click “keyboard” to select a key to invoke this rule
• drag “Move” from behavior library into the rule “Move Left”
• set some parameters
• direction 180, speed 100
• The behavior setting will look like the figure in the next slide
![Page 15: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/15.jpg)
Adding more behaviors
![Page 16: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/16.jpg)
Adding more behaviors• add another behavior
• create another rule “Move Right”
• make the rule work when right arrow pressed
• include a Move behavior
• test the game
• efficient method
• copy the rule, then paste it inside the group, and edit the rule
![Page 17: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/17.jpg)
Goal specification• add another actor “Door”
• drag the door into the scene
• double click the door in inspector
• create a rule named “Level Win”
• make the actor receive “overlaps or collides” event
• find “Display Text” behavior in library, and drag it into the rule, and fill the text edit box with “You Win!”
• add “Timer” behavior into the rule, and make the timer work after 1 second
• drag “Reset Scene” behavior into the timer
![Page 18: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/18.jpg)
Goal specification
![Page 19: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/19.jpg)
Let the player fail• add kill zone
• in level editor, add an actor named “kill zone”
• set the width of the zone to be 480
• place it beneath the platform actor
• double click the player actor and add a new rule named “Fail”
• make the rule accept “overlaps or collides” with “kill zone” event
• drag “Reset Scene” behavior into the rule
• make the kill zone invisible
• attribute - graphics - uncheck “visible”
![Page 20: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/20.jpg)
Screen shots
You made the first salad of your own
![Page 21: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/21.jpg)
GameSalad - Lec. 02 Sprites and Particles
Young-Min Kang Tongmyong University
![Page 22: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/22.jpg)
Sprites• create a sprite with any image tool you want
• just drag the sprite file to an actor
• the sprite will be mapped on the actor!
![Page 23: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/23.jpg)
Add more actors• create a door actor and a platform actors and place them in the scene
![Page 24: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/24.jpg)
Enlarge your scene• inspector > scene > size
• set the width to be 1500
• place some more platform actors, and link them.
![Page 25: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/25.jpg)
Camera• click camera mode
• adjust camera hot spot
• when a camera controlling actor goes out of this spot, the camera is adjusted
• controlling actor = player
• double click the player actor
• drag “control camera” from library into the behavior area
• add some keyboard control to move the player
• preview
![Page 26: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/26.jpg)
Sound• prepare audio files
• library > sound > press +
• import audio files as music or sound type
• double click your player actor
• drag “play music” behavior to the actor
• background music will be played when the actor appears
![Page 27: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/27.jpg)
Add some physics• refer to the previous lecture
• to add some physics properties to player and platform
• make the door static
• move the player along the platform and enjoy the bg music
• how to invoke the sound effect…
• let’s add an obstacle with particle effects
![Page 28: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/28.jpg)
Particle effects• create an actor and name it “torch”
• double click the torch and drag “particle” behavior into its behavior area
• set particle effect parameters and place it in the scene
![Page 29: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/29.jpg)
Particle effects
• test the particle effect
• satisfied?
• change the parameters
![Page 30: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/30.jpg)
Play sound• create a new rule
• when the player touches the torch
• play “ouch” sound effect
![Page 31: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/31.jpg)
More levels• games consist of multiple scenes
• let’s add more scenes
• main menu scene
• another game level
• game over scene
![Page 32: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/32.jpg)
Add scenes• click “home” and click “+” to add a new scene
• name the new scene “menu scene”
• rename the original scene “first level”
• arrange the scenes
• double click the new scene
• add a new actor named button
• make the button transparent
• add “display text” behavior to the button
• text: Start Game
• create a new rule to change scene
![Page 33: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/33.jpg)
GameSalad - Lec. 03 Testing your game on
your IOS deviceYoung-Min Kang
Tongmyong University
![Page 34: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/34.jpg)
iOS developer program• enrol to the program
!
• generate your app for iPhone
• click “publish”
• select iPhone
![Page 35: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/35.jpg)
Provisioning profile• once you generate your app
• you can download the app
• it will ask you to select your provisioning profile
• select your provisioning profile and press “next”
• the app will be ready
![Page 36: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/36.jpg)
App installation• Select your device
• add your app to the device
![Page 37: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/37.jpg)
GameSalad - Lec. 04 Scenes and Touches
Young-Min Kang Tongmyong University
![Page 38: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/38.jpg)
Game scenes• Logo
• Menu
• Game1
• Game2
• Game3
• Fail
• Win
![Page 39: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/39.jpg)
Logo• Actor: StartGame
• make it invisible
• add behaviors
![Page 40: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/40.jpg)
Menu scene• create ONE actor
• levelBtn
• drag the actor to the scene three times
• click the actor instances in the scene editor
• you can edit the behavior of the actor instance
• each button displays its own message
• each button invokes its own level scene
![Page 41: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/41.jpg)
Game scene• add gravity to the scene
• add a falling box actor
• add a platform to hit the box
• physics - uncheck
• move in accordance with user’s touch (described in the next slide)
• add invisible “win zone” and “failure zone”
• if the box collides with the “win zone”, move to win scene
• if the box collides with the “failure zone”, move to fail scne
![Page 42: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/42.jpg)
Touch• hitting platform
• create a rule for touch event
• behaviors
• constrain attribute “self.Position.X/Y”
• to “game.Touches.Touch 1.X/Y”
• selection: Devices-Touches-Touch 1-X
![Page 43: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/43.jpg)
Win/fail scenes• display a message
• when clicked, move to the menu scene
![Page 44: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/44.jpg)
More levels
![Page 45: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/45.jpg)
GameSalad - Lec. 05 Game data and actor
spawningYoung-Min Kang
Tongmyong University
![Page 46: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/46.jpg)
Start button• prepare some actors and place them in the scene
![Page 47: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/47.jpg)
Add a new attribute
• inspector - game - attribute
• add a new attribute by clicking “+”
• boolean Start
![Page 48: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/48.jpg)
Making button invisible• add behaviors for the start button
![Page 49: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/49.jpg)
Click the button
• The button will disappear
• However,
• The ball should not fall until the button is pressed
• How can you do that?
![Page 50: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/50.jpg)
Constrain your actor• add some rules for your ball actor
![Page 51: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/51.jpg)
Preview• ball is not moving unless you start
![Page 52: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/52.jpg)
Spawning an actor• prepare an actor to be spawned
a new actor
![Page 53: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/53.jpg)
Spawn it• add behavior rule to ball
![Page 54: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/54.jpg)
Reset scene• add a new rule for the game over message actor
![Page 55: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/55.jpg)
GameSalad - Lec. 06 Making a real game
Young-Min Kang Tongmyong University
![Page 56: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/56.jpg)
Prepare some images
![Page 57: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/57.jpg)
Create a project• name the project “Shoot”
• create a main menu
• change the name of the initial scene to “Main Menu”
• double click it and open scene editor
• drag the initial logo into the scene
• create a button actor named “Start Game Button”
• create a rule for the button
• actor receives event > touch > is > pressed
• go to scene: next scene
• make it display “Play Game”
![Page 58: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/58.jpg)
Create a new scene• create a new scene and name it “Instruction”
• drag an instruction image into the inspector
• make a rule for the “instruction” image actor to change the scene when touched
![Page 59: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/59.jpg)
Game scene• create a new scene named “Level 1”
• resize the scene to be as large as 1200x1200
• drag the level image “map.png” into the scene
• the size of the image will be adjusted
• set the size of the actor to fit in the scene
• add new actors
• player
• enemy
![Page 60: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/60.jpg)
Player control• add a behavior group named “keyboard movement”
• insert a new rule named “accelerate” that is activated when Actor receives event > key UP > is > down
• drag “move” behavior into the rule
• direction: 90
• speed: 100
• relative to actor
• move type: additive
• copy the rule and rename it as “reverse”
• drag “move” into the rule
• direction should be set “270”
![Page 61: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/61.jpg)
Player control• Rotation
![Page 62: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/62.jpg)
Control camera• make the camera follow your character
• click “camera mode” and resize the camera region
• add “camera control” bahavior to your character
![Page 63: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/63.jpg)
Add some NPCs• place some enemy characters in the scene
![Page 64: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/64.jpg)
Adding some intelligence• NPCs are chasing your character when they detect your approach
• create an actor named “detector”
• size: 200x200
• add “Spawn Actor” behavior to your “enemy actor”
• make them spawn “detector”
• make your detector invisible by setting 0 to alpha
![Page 65: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/65.jpg)
Shooting• add an actor named “bullet”
• drag an image for the bullet (black background)
• set “additive” for blending mode
• add “Move” behavior for this actor
• direction: 90
• relative to actor
• speed: 1000
![Page 66: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/66.jpg)
Shooting control
• edit your character actor
• add a rule into the “keyboard movement” group (actor recives event > key > space > is > down)
• add timer in the rule: every 2.0 seconds
• spawn actor: bullet
• direction: self.Rotation / position: 0, 50
• layer order: in back of actor / direction relative to: scene
![Page 67: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/67.jpg)
Firing flash• prepare an image for flash
• add an actor named “flash”
• drag the image onto this actor
• add timer behavior
• destroy self after 0.1 seconds
• edit your character actor again
• spawn the flash actor when you shoot
![Page 68: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/68.jpg)
Bullet collision• Edit the enemy actor
• add an attribute named “Health” of integer type
• set 4 for the attribute
• Create a rule named “Shot” for the actor
• condition: overlaps or collides with bullet
• behavior: change attribute “self.Health” to “self.Health-1”
• Create another rule “Die” for the actor
• condition: attribute “self.Heal” = 0
• behavior: Destroy
![Page 69: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/69.jpg)
Play it
![Page 70: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/70.jpg)
Let them move• edit “enemy” actor
![Page 71: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/71.jpg)
Accelerometer• character control with accelerometer
Rotate your character in accordance with accelerometer
game.Accelerometer.y * 600
![Page 72: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/72.jpg)
Touch shooting• add a new attribute for
game
• boolean “bFiring” initialized as false
• when the map touched, the flag is turned to be true
• change the shooting rule of your character
![Page 73: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/73.jpg)
effects• explosion effect when shot
![Page 74: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/74.jpg)
Win• add a new game attribute “nShotEnemy”
• increase the nShotEnemy when an enemy is shot
• if the nShotEnemy value is larger than a specific value, move to winning scene
make “Win Scene” go to “Main Mene” when touched
![Page 75: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/75.jpg)
UI Scene• Create a UI Image
• make an actor named “uiDesign” with “additive” blending mode
• add a layer to “Level 1” scene
• name the layer “UI”
• move the layer on the default layer above
• uncheck “scrollable”
• drag the uiDesign into the scene and make it located in the UI layer
• add some game attribute and let the UI display it
![Page 76: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/76.jpg)
Play, and improve it
• Add more effects such as explosion…
![Page 77: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/77.jpg)
GameSalad - Lec. 07 Table
Young-Min Kang Tongmyong University
![Page 78: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/78.jpg)
Basics• table
• matrix shaped 2D data
• can be accessed with row and column indices
• all items in a column should be of an identical type
• you can create as many tables as you want
• tables are treated as attributes of game
![Page 79: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/79.jpg)
Table creation• Home > Tables
• click “+” to create as many table as you want
• rename them
![Page 80: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/80.jpg)
Edit your tables• determine the # of rows and columns
• determine the type of each column
• you can easily increase the number of columns or rows
• you can rearrange the order of the columns and rows
![Page 81: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/81.jpg)
Prepare for table access• create an actor and place it in the scene
![Page 82: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/82.jpg)
Display table items• make the actor display an item in the table
![Page 83: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/83.jpg)
Test it• press preview button and reset the scene
• every time you reset the scene, randomly chosen item will be displayed
![Page 84: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/84.jpg)
Table modification• Change Table Value behavior
![Page 85: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/85.jpg)
Table applicationtable visualization and manipulation
![Page 86: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/86.jpg)
Create a table• Prepare a table to be displayed and manipulated
![Page 87: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/87.jpg)
Actor to show items• create an actor named “item viewer”
• double click and add behaviors as follows
nothing specified here
![Page 88: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/88.jpg)
common behavior• make the actor display table item (common)
• the item is accessed by attributes of the actor (different attributes for each actor instance)
![Page 89: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/89.jpg)
Instancing• place the actor instances in the scene
![Page 90: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/90.jpg)
add behaviors• double-click the actor instances to edit their
behaviors differently
specify different values to instances
![Page 91: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/91.jpg)
Background• add background and test it
Table items are displayed on the actor instances
![Page 92: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/92.jpg)
Table manipulation• Table items should be accessed with structured
looping method
• loop behavior
• only in ‘pro’ version which costs $299!
• alternative
• inventing your loop with available behaviors
![Page 93: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/93.jpg)
Single for loop• for(int i=1;i<=4;i++) {
• TB_State[i][1] = TB_State[i][1]+1;
• }
!• add attributes
• idxI
• idxJ
• use those indices for our for loop
• here, a single for loop is presented
• idxI is used
![Page 94: Game Salad Study](https://reader035.vdocument.in/reader035/viewer/2022062704/555a8266d8b42a98568b4e86/html5/thumbnails/94.jpg)
Test• press right key to increase all items in the first column