playMaker

Author Topic: Playmaker reusable Modules?  (Read 5422 times)

dbt

  • Playmaker Newbie
  • *
  • Posts: 6
Playmaker reusable Modules?
« on: September 21, 2012, 06:39:35 AM »
Playmaker reusable Modules?

I've been experimenting with playmaker (PM) for a very short time. Its a very interesting tool utilizing the finite state machine model of computing. The use of events reminds me of developing GUIs a bit and a lot like UML models I've been using for years! Rethinking loops and conditionals in terms of events is also very refreshing and sometimes seems a bit awkward, but in a challenging sort of way. Challenging in the sense that maybe one should rethink their approach not in terms of how you been doing it but how it can be done in a FSM sort of way.

I'm also in the process of implementing a few old projects in PM. One good way to learn is by doing something you know how to do well in a new language/tool.


Anyway, enough ranting.


One thing I'm seriously wondering about is how to handle reuse of existing FSMs in other projects?  Can I create module-like entities I can reuse?

Another thing I am curious about is sending messages/event over a network to distant PM FSMs would that be hard to do in PM?

btw, Admin, if this is in the wrong forum please move to the appropriate one.

TIA

dbt

dbt

  • Playmaker Newbie
  • *
  • Posts: 6
Re: Playmaker reusable Modules?
« Reply #1 on: September 21, 2012, 09:29:27 PM »
To whom it might concern,


I tell you Terminology --terminology --terminology is going to be the death of us all..

     or better said: "a rose by any other name is just as....."

< noob statue= yellow alert >
OK,  more research and I found this thingy call a “prefab” ... a structuring mechanism of game entites/objects.  And we know all good children need structure! This maybe the answer to my question. Nice to see the lay of the land that looks familiar. For fellow noobs out there in PM land check it out:

http://hutonggames.com/playmakerforum/index.php?topic=2135.0

I learn by leaps and bounds and Its the leaps off cliffs that hurt the most.
<\noob>


Still got training wheels

dbt

Damian

  • 1.2 Beta
  • Full Member
  • *
  • Posts: 188
    • Permaximum Betty
Re: Playmaker reusable Modules?
« Reply #2 on: September 22, 2012, 07:24:46 AM »
I understand yo are new to this, but in the same time you must know unity 3D to be able to use Playmaker.
Then all terminology will be much clear to you.
Most things in playmaker do use unity 3D terminology and only the actions( the playmaker name of different thing you can do with playmaker)
But you will learn them soon to.
Also every "action" has things in them and they are often unity 3D name on them.

DARK_ETERNAL

  • Full Member
  • ***
  • Posts: 110
Re: Playmaker reusable Modules?
« Reply #3 on: October 22, 2012, 04:01:46 PM »
Not only prefabs... You can actually save your FSMs in templates. If I'm not mistaken, right-click on FSM editor, save template. You can import that template when creating an FSM for any object, whether it's or not a prefab. The only thing is, if you have tightly coupled references to that FSM, it won't be useful to save templates. However, prefab usage has its advantages. You should try both.

Greetings.
Check out our new game: Nitro Chimp. Now live in App Store!

Trailer:
Download: https://itunes.apple.com/app/nitro-chimp/id557150450?l=en&mt=8

Red

  • Hero Member
  • *****
  • Posts: 563
Re: Playmaker reusable Modules?
« Reply #4 on: October 22, 2012, 05:06:16 PM »
well, when it comes to reuseability i try and keep things simple... systems that can be applied to other games and gaming situations with little modification.

so, say that i have a weapon selection system that i want to reuse... i try and keep it isolated such that it can communicate with the appropriate other systems but not so ingrained into the rest that it is tricky to optimize it for other games.

this does come with it a bit of a downside in that it leads to games with more FSMs on objects than normal... which i've been reading can bog the system down if you go crazy with it... but to me it's a balancing act.

for instance, that weapon selection system that i mentioned is isolated from the weapon manager... the selector only selects and sends an event to the manager... the manager handles variables such as the amount of ammunition that a weapon has, whether you've unlocked it/picked it up and also toggling the various weapon systems themselves on or off... and the weapon systems themselves usually have a couple scripts on them... one for handling various statistics, one for handling how the weapon fires and one for whether i need to monitor some inputs (such as whether the player is holding down a mouse button, space bar, etc.)

but the part of it is that once i've cracked one system, since a lot of weapons work in similar methods, it's a simple matter to pare out the core mechanism, save it as a template then just re-import it in whatever system i need (and i've used this for more than one game.)

you're right, using Playmaker does require a bit of a change in how you think about things but in the end the level of flexibility is pretty darn good, especially if you can learn to think modularly.

for instance... i've managed to get one system done for my first game, i can use that same system for other games (mainly it's AI that i'm focusing on though since AI is a fairly universal thing for most games.)

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker reusable Modules?
« Reply #5 on: October 23, 2012, 03:34:18 AM »
hi,

 As far a reusable modules with fsm and prefabs, have you checked this proof of concept?
http://hutonggames.com/playmakerforum/index.php?topic=1366.0

as for network operation with Fsm, there is a great cloud system from Photon that makes network application development a brease, and we have a beta system in playmaker that is tightly integrated with photon to enable playmaker developers to benefit from photon Cloud system.
http://hutonggames.com/playmakerforum/index.php?topic=1390.0

Bye,

 Jean