playMaker

Author Topic: Playmaker questions for metroidvania - seeking guidance  (Read 3235 times)

deadsies

  • Playmaker Newbie
  • *
  • Posts: 2
Playmaker questions for metroidvania - seeking guidance
« on: October 16, 2017, 03:30:20 PM »
I've been looking over tutorials and reading various materials and I think I have the gist of Playmaker, but I'm still seeking some additional overall guidance to help get me on the right track.

I should tell you a bit about my background and my situation in order for someone to hopefully give me good advice and I'll try to make it as brief as possible. :)

I've spent literally years working on a metroidvania style game using the Stencyl game engine. Stencyl is an engine that uses visual scripting to represent traditional code, and the structure is very very similar to traditional programming -- Only represented by graphics that snap together like blocks. It's pretty brilliant, and through it I've learned a lot about general programming concepts even though I have no programming background and don't know any actual programming languages. Over the past years I've leveraged Stencyl to quite an extent and gotten some really cool results using that engine, and using it in ways well beyond what many people considered it to be for.

I may be hitting a wall, though, because my project is so big it's proving difficult to optimize in Stencyl such that it works as smoothly as it should on average PCs, and there are some pesky engine bugs that I have little control over that are still unresolved by the proprietors of the engine. In addition, console export is a tall to impossible order using Stencyl.

A couple of weeks ago I downloaded Unity and started putting assets in. Again, I don't have a programming background so getting things actually hooked up and working is daunting and very slow going, but in terms of the visual side of things the game already looks pretty nice.

This is where Playmaker comes in. I remembered hearing about this in the past so I started doing my homework, and the state machines seem, generally, pretty logical to me and may be exactly what I need. I'm just looking for some general guidance in a few areas.

1) How messy is this going to get in a large project? In a significant size Metroid game, using Playmaker for almost everything, is it going to become a nightmare?

2) This is a more specific question, but it's something I haven't really seen addressed in the videos I've watched so far. How would I go about tracking and using static game data? I see that in a FSM you can create a global variable for other FSMs to access, but what about static data that is the same from one scene to the next? So, for example, if I've done something game progressy, like obtained a new power, that new information has to be stored and stay the same and be able to be accessed by game logic, such as a character controller FSM. E.g., I can't do the dash move unless I have the dash ability.

What's the easiest way to set this up? Would I need to make a general game data unity script that lists a bunch of static variables and access those with FSM actions? How do you check a static variable in the game and use it as a condition in a state machine? Do I need a unity script to manage data (and save the data) or can this all be managed from within FSMs?

I'm sorry if my questions are a bit messy and open ended, I'm just looking for some overall guidance and I come from the unique position of having a lot of very specific game logic experience with Stencyl and how it operates but very little traditional programming experience.

Thank you so much for reading!

Thore

  • Sr. Member
  • ****
  • Posts: 480
Re: Playmaker questions for metroidvania - seeking guidance
« Reply #1 on: October 16, 2017, 10:44:09 PM »
Hi and Welcome!

1) Large projects are always messy to some degree, in any engine or format. How messy depends on how well you structure, engineer and document it. You can over-engineer and it gets unwieldy, or you can throw it together and face spaghetti of dependencies all over the place. The trick is to find a right balance, which is however always different from project to project. Also see some tips how to manage.  Provided your Metroidvania is generally within the usual features, it's fairly straight-straightforward: a few FSMs for the player, one to move around; one to jump; a few for firing in different directions, projectiles, health etc. or two for each unique power mechanic. And maybe one or two for each monster, interactible item (doors etc) etc.

2) Storing variables should all work with various Playmaker techniques, such as global variables. Maybe you’ll need some light coding, like a data holder script (easy to do, for non-coders, too). It‘s just a list of variables, in your case mostly bools called flags, i.e. you have it, or you don‘t have that power. Enum flags might be one specific way to do this. I don‘t know exactly what’s the best way to store persistent data, but I know it’s a comparably trivial problem to solve. Also, Playmaker is fully compatible with anything else. You can simply grab some script that does it, and hook it up. The process in Playmaker itself is easy as well, with dozens of ways to it. You could conceive of the powers as game objects each, that are added or removed by one PowersManager FSM. Or they are all sitting dormant on the player until de/activated, or by using send events (waking them from their idle state).

I suggest for big endeavors to frontload some of the unkowns and risks. Like, build a craptastic version you will throw away, with a basic player, one power (a type of weapon); which you copy and paste a few times with e.g. different laser colours that open matching doors, and the basic unlock/pickup mechanic, plus two scenes to test. This gives you some insights how it might work.
« Last Edit: October 16, 2017, 10:58:28 PM by Thore »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker questions for metroidvania - seeking guidance
« Reply #2 on: October 17, 2017, 02:14:29 AM »
Hi,

 Just adding to the good thing that was already said by Thore.

Just dive into this, this is the only right way to get an opinion wether PlayMaker is suitable or not, yes, it can do it all, and yes it does handle massive projects as fine as regular massive c# projects, it doesn't matter here.

 Maybe the best way to get a feel for what is at stake on large project-ish is the 2d platformer demo I ported from UnityLearn 100% to PlayMaker, this would be a good way to check a project and see what's there.

https://github.com/jeanfabre/PlayMaker--UnityLearn--2dPlatformer

1: create a new empty project
2: import PlayMaker
3: import that project ( the package link is available in the description on the github page)

 and then run it, be curious and check out the various Fsm, what they do how they behave when you playback, etc etc

If you are only beginning with PlayMaker it may be overwhelming, not worries, just take it as is, and then watch some intro videos on the basics of PlayMaker and it will all start to make sense.

As for data Management, I would not worry too much about this at this stage, because you need to first get the game mechanic working, but rest assure that data management is totally fine in PlayMaker, typically you'll save data in the PlayerPrefs. ( a Unity system to store permanent data on ALL devices), and read them back when required, so you will be able to keep track of player progress, unlock weapons and fanzy tricks, etc etc.

 Then you use this forum to start searching and asking for more precise questions as you'll start developing, we are here to help :)

 Bye,

 Jean

deadsies

  • Playmaker Newbie
  • *
  • Posts: 2
Re: Playmaker questions for metroidvania - seeking guidance
« Reply #3 on: October 17, 2017, 05:42:27 AM »
thank you both for your thoughtful answers. I really appreciate it. I'll be doing some tests in the near future and I'll be sure to check in with any progress/questions. :)


djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Playmaker questions for metroidvania - seeking guidance
« Reply #4 on: October 17, 2017, 06:04:09 AM »
Hi,
Just to add :)

You can find many tutorials on the user tutorial wiki page

Also...you can use playerprefs to load/save but it is not recommended as they are easy to hack.
There are some asset on the asset store that support playemaker which are more save to use, like for example Easy Save.

if you have any questions, feel free to ask on the forum :)

WillowN

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Playmaker questions for metroidvania - seeking guidance
« Reply #5 on: October 23, 2017, 01:48:14 PM »
JeanFabre! You're the best! Thanks so much for sharing that 2D platformer example, that will help me learn a lot, much appreciated!

WillowN

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Playmaker questions for metroidvania - seeking guidance
« Reply #6 on: October 23, 2017, 05:19:14 PM »
Hi Jean, I downloaded the package but nothing was placed in the scene. Is there a step I missed?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker questions for metroidvania - seeking guidance
« Reply #7 on: October 24, 2017, 03:35:50 AM »
Hi,

what scene did you opened exactly?

 Bye,

 Jean

WillowN

  • Playmaker Newbie
  • *
  • Posts: 16
Re: Playmaker questions for metroidvania - seeking guidance
« Reply #8 on: October 26, 2017, 09:07:10 PM »
Sorry, I wrote that unclearly. I opened the main game scene (the little bean guy at the clock towers) but clicking on each object revealed none of the FSMs. I tried opening some of the Playmaker folders there but only got the scripts. Do you know how I can see how you programmed using the FSMs somehow?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Playmaker questions for metroidvania - seeking guidance
« Reply #9 on: October 27, 2017, 01:45:23 AM »
Hi,

 yes, so what scene exactly, there is one that is the pur scripted version and one that is the playmaker version ( Inside "PlayMaker Unity 2D Demo")

 bye,

 Jean