A downloadable GMS2 package

Buy Now$1.99 USD or more

Also available on the YoYo Games Marketplace.

PRState is a GameMaker Studio 2 (GMS) module created by Prismatic Realms, Inc. It enables you to implement a simple and efficient finite state machine for your GMS objects. PRState is designed to compartmentalize your object's state implementation code so that they are segregated from each other and from the rest of your object's code. What this means is that, for example, your hero character's walk/run code lives in its own function or method. The same goes for his attack code, and his double-jump code, etc. This results in code that is more organized and easy to trace and debug, rather than having all that code lumped together into your Step event(s)

Note that PRState can be used for more than just keeping track of character states. Consider using PRState to track the different states of your UI objects (buttons, check boxes, etc.) or to track which magical energy a sword is currently imbued with. There are many uses for finite state machines. Any object with more than one behaviour can benefit from this module.

The download file is a signed GMS2 local package that can be imported into your projects.  It contains a parent object that implements PRState that your objects can derive from. The package also contains documentation on how to use the module and example code that you can learn from. The included examples feature artwork by Penusbmic (used with permission.)

Friendly support is just an email away and you can expect a quick turn-around to answer your questions and resolve issues.  As always, comments and suggestions are welcome!


Features:

  • Add any number of states to your objects.
  • Associate specific methods or functions to your states to handle their implementation.
  • Change the object states at any time.
  • Handy convenience method to switch to previous state.
  • Impose restrictions as to which states can transition to other states, handled automatically by PRState.
  • Organized implementation. Your state methods/functions will be called once to initialize itself when set; once to cleanup after itself when the state is about to be switched away; and once every frame to run your implementation code.
  • Debug logging to help you track when objects change states.
  • All professionally written in GML.
  • Includes examples and documentation within the package.
  • Fast and friendly support via email if and when you need it.


Details:
PRState v2.1.5
Requires GameMakerStudio 2 v2.3 and up.


StatusReleased
CategoryAssets
Rating
Rated 5.0 out of 5 stars
(1 total ratings)
AuthorPrismatic Realms, Inc.
Tagsextension, GameMaker, gms, gms2, state-machine

Purchase

Buy Now$1.99 USD or more

In order to download this GMS2 package you must purchase it at or above the minimum price of $1.99 USD. You will get access to the following files:

PRState.yymps 211 kB

Development log

Leave a comment

Log in with itch.io to leave a comment.