🎮

Creating a Game Like Super Power Training Simulator

Oct 14, 2024

How to Make a Game Like Super Power Training Simulator - Remastered

Introduction

  • Announcing the remastered version of the tutorial series.
  • Aim: Create a game with the best practices, functional, clean, and reusable code.

Creating Tools

  • Insert three tools into the starter pack:
    • Punch
    • Push Up
    • Psychic
  • Important Setting: Disable the Requires Handle option.

Replicated Storage Setup

  • Folder named modules containing big num module for handling large numbers.
  • Link for further information provided in the description.

Remote Events Handler Script

  1. Insert a script into Server Script Service called Remote Events Handler.
  2. Setup variables for remote events:
    • local rs for Replicated Storage.
    • local remotes, local serverRemotes, and local rEvents for handling remotes.
  3. Create folders in Replicated Storage:
    • Remotes (contains Server and Client folders).
    • Functions for remote functions.
    • Events for remote events.

Creating Helper Functions

  • Insert Module Script into Server Storage for helper functions, named helpers.

Helper Functions

  1. Check Debounce Time: Determines if cooldown is complete.
  2. Big Number Operations: Functions to add and subtract large numbers.
    • helpers.bignumadd
    • helpers.bignumsub
  3. Train Function: Adds to player stats.
    • Checks if player is alive before training.
    • Uses helpers.bignumadd to increase stats.

Health Calculation for Endurance

  • Function helpers.calculateHealth: Adjusts player's max health based on endurance.

Leader Stats Script

  1. Insert a script into Server Script Service called Leader Stats.
  2. On player add, create a folder for Physical Stats containing:
    • Strength (string value, initial value 0)
    • Endurance (string value, initial value 0)
    • Psychic (string value, initial value 0)

Punch Remote Event

  • Manage punch events with debounce mechanism to prevent rapid firing.
  • Structure to check if players are off cooldown before training.

Push Up and Meditation Functions

  • Copy and adapt punch logic for push ups and meditation stats.
    • Ensure debounce is applied to all.

Testing the Script

  • Create a new game and save it.
  • Address errors related to iterating over instances and ensuring functions trigger correctly.
  • Print debugging statements to check when events are fired.

Final Adjustments

  • Fix issues with stat adjustments and ensure the correct application of helper functions.
  • Confirm all stats are updating correctly during gameplay.

Conclusion

  • Game functionality is working and cleaner than previous iterations.
  • Encourage viewers to like and comment with ideas for future videos.