Monday, 9 November 2015

GameSalad

Scenes

Scenes are fundamentally just levels or pages of the game/app and are where all the assets are placed. For my pong game I had one scene kept a plain black background.





Actors


The actors are all the assets added into the scene, including the players' avatars, background elements and collectables. The four actors seen in my version of pong are Player 1 (blue rectangle), Player 2 (purple rectangle), Ball (orange square) and Walls (not visible on the screen. These components can then be given a series of instructions as to how to react to the players actions and to other actors in the scene. For example the blue rectangle represents player 1 and moves up or down depending on the actions of player 1.




Rules

Once the actors have been created, they are then given a series of rules to determine what they should and shouldn't do. In my pong game the ball is given the rule as to not pass through either player or the walls at the top and bottom of the screen, however there are no rules against it passing through the left or right side, which is of course how a point is scored.

BehavioursOnce an actor has been assigned a rule, behaviours can then be selected from a library, these include, play music, collide and spawn actor. For example, my player 1 has been given several behaviours to abide by, these include, move up when W is held and down when S is held. It is also told that once it collides with a wall it must not move any more in either direction.









Attributes 

There are several attributes already set up within the program but you can also create your own, for example in my pong game, I made one called "Ball Exists," and this is a 'Boolean' meaning it can either be true or false. These attributes are used when assigning rules and behaviours to actors.


Flags

A flag is a term used to describe a boolean and how it interacts with the other actors within the game. For example the ball not existing means the flag is up and tells the player 1 paddle that they can spawn a ball once the player has pressed the specific key (in my game it is 'Q'), then now the ball is in play, the boolean is true, this puts the flag down and stops the player from spawning anymore balls.


No comments:

Post a Comment