"Rock, Paper, Scissors" (RPS) Combat Engine

3

Index

Features on these Courses

Stats

888 visits, 1,642 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY-NC 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 16 May, 2024. Last updated 18 May, 2024

Open an Event Sheet and add these nine (9) global variables. Here's what I've called mine.

  • aiBot = 1 -- the "AI" plays as a gamer's opponent in a single-player game. In the "2-Player" version, the "AI" acts as a referee OR assumes the role of a player who rudely quits an unfinished game session.
  • gameTurn = 1 -- a simple counter that record the current combat round.
  • playerAs = 0 -- assigns the "human" gamer an initial starting team. Zero (0) is the "Norman" and the number one (1) plays the Saxon position.
  • shieldParry = 0 -- if a gamer's shield is in the same location of an incoming attack, the sprite animation changes to a random shield "deflection" or "takes damage" animation frame.
  • swordParry = 0 -- if a gamer's sword is in the same location of an incoming attack, the sprite animation changes to a random "crossed sword" showing a "sword parry".
  • normanDefense = 0 -- norman shield location is compared to the Saxon attack (similar to "Rock, Paper, Scissors"). The gamer "drags and drops" their shield into their choice of defensive locations. Their shield could be placed in the high (#0 - head), middle (#1 - body), or low (#2 - legs) position.
  • normanAttack = 0 -- norman sword location is compared to the Saxon sword and shield (similar to "Rock, Paper, Scissors). As before, the gamer "drags and drops" their sword into an attack location. The sword attack could be in the high (#0 - head), middle (#1 - body), or low (#2 - legs) position.
  • saxonDefense = 0 -- (same as the "normanDefense" above).
  • saxonAttack = 0 -- (same as the "normanAttack" above).
  • 0 Comments

Want to leave a comment? Login or Register an account!