playMaker

Author Topic: PlayMaker (Perforamnce, 2D, Single and Double Jumps)  (Read 2856 times)

JayHaz86

  • Playmaker Newbie
  • *
  • Posts: 8
PlayMaker (Perforamnce, 2D, Single and Double Jumps)
« on: January 11, 2015, 03:19:51 AM »
Hi PlayMakers 

I spent this lovely weekend working on my game. It was working fine, and imported to iOS with no problem. However, I faced some issues that I could not get passed through.
1-   The game jitters, and could not solve this however it looks fine in unity simulator but once I put it on my iPhone it jitters. Now the question is, how to make the game preform great without issues.
2-   I was trying to make the game run in full 2d, so I went on adding rigidbody2d and also the collider but it does not collide with the enemy, I went back and added rigidboy (3D) and repeat the process and it worked. Is there a way to make everything 2d!
3-   I want to make one jump or double jump, that’s it. I added the states and the jump works fine but the problem is that if the user kept on pressing the screen he will fly off the screen (If you need me to include the states please tell me).
4-    I want to add score system, and start screen lets say like flappy bird.

Please bear in mind that I am new PlayMaker, so I would appreciate to keep your comment detailed.

Your help in this regard is highly appreciated.  Jay
« Last Edit: January 11, 2015, 03:50:25 AM by JayHaz86 »

JayHaz86

  • Playmaker Newbie
  • *
  • Posts: 8
Re: PlayMaker (Perforamnce, 2D, Single and Double Jumps)
« Reply #1 on: January 12, 2015, 01:38:40 AM »
Bump!

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PlayMaker (Perforamnce, 2D, Single and Double Jumps)
« Reply #2 on: January 12, 2015, 01:45:44 AM »
Hi,

 I think you are facing two potential issues:

-- your camera work is not all done on lateupdate. It's important when you follow physics objects that your camera updates its position and tracking on LATE update. else it will jitter

-- you are using frame rate dependant animation to move character and so on fast machines it's smooth and maybe ony our phone the fps is lower and you start noticing this a lot more.

whart are your frame rate difference when running on simulator vs on device ( xocde tells you this as you run in debug mode).

Bye,

 Jean

JayHaz86

  • Playmaker Newbie
  • *
  • Posts: 8
Re: PlayMaker (Perforamnce, 2D, Single and Double Jumps)
« Reply #3 on: January 12, 2015, 08:14:29 AM »
Hi Jean,

Thanks for the reply.

1- How to do that? Any tutorial to follow.
2- Will check the frame rate and update you tonight.

Thanks, Jay

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support

JayHaz86

  • Playmaker Newbie
  • *
  • Posts: 8
Re: PlayMaker (Perforamnce, 2D, Single and Double Jumps)
« Reply #5 on: January 13, 2015, 02:39:20 AM »
Hi Jean,

I know how to debug in xcode. I was talking about the camera, you mentioned something about late update and other stuff. Please elaborate.

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: PlayMaker (Perforamnce, 2D, Single and Double Jumps)
« Reply #6 on: January 13, 2015, 02:47:01 AM »
Hi,

 Ah ok.

Very important doc to understand fully first ( I mean it :) )

http://docs.unity3d.com/Manual/ExecutionOrder.html

then, within PlayMaker, some actions are using lateupdate by default, some don't and some give you the choice. It's bit complex and not very intuitive, I will agree...

so within a state, that typically want to follow a player with a camera, the action to get the position of the player will need to be performed on late update with the custom action "Get Position Advanced" that you can find on the Ecosystem

then you can set the position of the camera, again making sure you use actions working on lateupdate like "Set Position Advanced".

 what's also criticial is that if you want to do some math between the player positiong and camera, the actions manipulating the player position must also be done on lateupdate, else you break the chain and jitter will occur.

 unfortunatly, if the action doesn't explicitly/visual tells you if it uses lateUpdate, the only way to verify if the look at the script ( right click on the action in the browser or on the state and click "edit script"), if in there you find the use of LateUpdate, then you are good to go.

In doubt, don't hesitate to ask, open a new thread "Is xxx using lateupdate", and if not, then we'll create an "advanced" verison of it where you'll explicitly define when to execute that action.

 Bye,

 Jean