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

3

Index

Features on these Courses

Stats

1,056 visits, 1,857 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

Finite State Machine

Let's focus on the following "finite state machine" (FSM) in the "Game Turn" Event Sheet after the gamer(s) submits a combat turn. (I'm skipping all the "eye candy" that makes the various buttons "twinkle and shine". You can study those event conditions in the Scirra Arcade and the Developer's Guide.)

Read the comments in the above image. I have intentionally "left out" any damage to avatars and their equipment to make this IGM more compatible with any gaming system and rules you might use. You'll have to add those adjustments.

  • A problem I discovered while making this engine was "how events work". A layout cycles through its events repeatedly. For this reason, you'll find the "System Trigger once" throughout this event sheet.
  • I wanted the combat turns to dynamically display various sprite frames. At first, I embedded the "choose(1,2)" and "choose(2,3)" inside the various events. But then I realized that doing so made the results "flutter" between those animation frames. So, I moved this randomization choice into the "On start of layout" since the gamer re-enters this "combat results" layout after each submission.
  • I also wanted a variety of narration statements. Look at the illustration below. It "chooses" between three verbs as compared to events #7 and #8 which use static text.
  • 0 Comments

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