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.



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