playMaker

Author Topic: FSM Setup Correct?  (Read 1030 times)

KomalR

  • Playmaker Newbie
  • *
  • Posts: 16
FSM Setup Correct?
« on: September 25, 2021, 04:12:26 AM »
I'm working on this 3D Platformer in the veins of Mario Odyssey. Currently, it's working as intended but IDK if the FSMs and game logic i've setup is the correct way to set them up. For one, i'm using both the character controller and rigidbody to move the character(character controller for move and rigidbody for jump), is that ok?

So, I just wanted someone with a bit of knowledge to check if the FSM are setup properly.

Updated link: unitypackage
« Last Edit: September 26, 2021, 09:49:56 AM by KomalR »

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: FSM Setup Correct?
« Reply #1 on: September 25, 2021, 07:59:58 AM »
Hi.

I have removed your link.

It not allowed to share Playmaker.Dll files
also other asset like easy save (which also where included) are not allowed to share.

if you export a package you should disable Playmaker folder and Plugins/Playmaker Folder.
And probably do that for other paid assets as well

or when you export select only the things you need to export (scenes/art/prefabs/sound/etc..),and turn off 'Include dependencies'

Maybe make some pictures of your setup instead :)

KomalR

  • Playmaker Newbie
  • *
  • Posts: 16
Re: FSM Setup Correct?
« Reply #2 on: September 26, 2021, 09:50:25 AM »
Uploaded updated Google drive link.

drown

  • Junior Playmaker
  • **
  • Posts: 58
Re: FSM Setup Correct?
« Reply #3 on: September 28, 2021, 05:37:52 AM »
Hey, I took a very quick look at this. I will not really comment on the rigidbody question since that would need an in depth review but I will give you some feedback regarding project setup

There was a collision event turned off in the jumping state that prevented the player from landing. That had to be reenabled to get jumping back to work.

First things first your State and Event naming is a bit over the place and hard to debug - for someone who did not create the FSM's it is not very intuitive to read and decipher the logic. Try giving states and events semantic names (names that are derived from their function). So If a "is Grounded Bool Test" resolves to "true" , trigger a "true" event instead of FINISHED. The same goes for your world - name the moving platform "Moving Platform" instead of "Cube". Same for state names.

I think combining the character controller and rigidbody based jumping is not a great solution. It will lead to unpredictable behaviour. I would try to decide for either a phyiscs based movement or a transfrom based character controller. Using only one of those systems will also help you to make your character feel more snappy, at the moment it feels like walking on ice and the jumping feels odd since physics and transform are working against each other.

I think you shpuld decide for either a completly rigidbody based movement (that should be closer to mario if i remember the game correctly) or do a completely character controller based solution - currently you get the worst of both worlds.


KomalR

  • Playmaker Newbie
  • *
  • Posts: 16
Re: FSM Setup Correct?
« Reply #4 on: September 29, 2021, 12:33:01 PM »
I picked up playmaker after a while so was just testing out the fsms. Though, I should have properly named my transitions and states.

As you suggested, I think I might try and redo the entire character with rigidbody as it is the most closest to physics like mario odyssey. I had tried doing it with physics earlier but just couldn't get the character to stick to slopes and after figuring that out(freezing its position when it's not moving) couldn't make the character walk up the slopes, the sphere.

KomalR

  • Playmaker Newbie
  • *
  • Posts: 16
Re: FSM Setup Correct?
« Reply #5 on: October 01, 2021, 04:23:45 AM »
So, I redid the whole game with only rigidbody and everything is working perfectly, atleast what I've checked so far.

But i'm adding a dash feature to the game, player can dash where ever the camera is looking towards and i've set it up this way but it's not working properly. Any help?? Any other way to achieve it??