Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

[RELEASED] Complete Physics Platformer Kit

Discussion in 'Assets and Asset Store' started by Greg-Sergeant, Oct 2, 2013.

  1. MaartenUT

    MaartenUT

    Joined:
    Aug 21, 2013
    Posts:
    18
    Well I just use buttons, and I can click those in the editor on my laptop which works fine. And about sending my code, I used the EasyTouch asset to get touch input, but I might be able to send the other code which doesn't work with EasyTouch.

    EDIT: Okay, so here's the (very simpel) code for movement, not including jump as I don't know if I'm allowed to post that code (in the Update() method):
    Code (csharp):
    1.  
    2. PlayerMove playerMove = GameObject.Find("Player").GetComponent<PlayerMove>();
    3.  
    4. if (-Code for checking if the right button is pressed-)
    5.             playerMove.h = 1.0f;
    6.         if (-Code for checking if the left button is pressed-)
    7.             playerMove.h = -1.0f;
    8.         if (-Code for checking if the right and left buttons are pressed-)
    9.             playerMove.h = 0f;
    And I've changed the PlayerMove script to only change h and v if the standAlone bool is checked. I hope that helps :)
     
    Last edited: Mar 28, 2014
  2. hensoup

    hensoup

    Joined:
    Jan 13, 2014
    Posts:
    35
    I'm having issues reworking the moving platofrm I'm trying to get it mario like where if you move down on elevator it stays intact so I'm still helping greg secretly by myself improve this part of the code. I will share this code when I am done :D
     
  3. hensoup

    hensoup

    Joined:
    Jan 13, 2014
    Posts:
    35
    never mind his Jeremy's is perfect after configuring it right. but now I got to work on multiple gravity and such.
     
  4. DanielSnd

    DanielSnd

    Joined:
    Sep 4, 2013
    Posts:
    382
    I own both devices and a mac, I'd be happy to test it :)
     
  5. Greg-Sergeant

    Greg-Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    while the player is on a platform, use a variable to get the platforms position last frame, then get its position this frame. now add the difference between the two to the players position. i deliberately didn't do this, and instead did the much tougher "inherent" velocity which gives you far more gameplay options but does also have its limitations - thanks for helping btw.
     
  6. ClassicGameJunkie

    ClassicGameJunkie

    Joined:
    Dec 15, 2013
    Posts:
    114
    Just a heads-up, the enemies are very flexible even for non-platformer levels. In the video below I have a bunch of enemy planes that are set to follow waypoints patrolling the island, and then fly towards the player plane when it get's close!

     
  7. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741
    Hey Greg,

    You made a nice start to the video lessons a while back. Please don't lose enthusiasm for continuing those. They are very helpful.
     
  8. pinchmass

    pinchmass

    Joined:
    Jul 2, 2012
    Posts:
    156
    any news on updates ?
     
  9. BokuDev

    BokuDev

    Joined:
    Jan 2, 2014
    Posts:
    81
    Android controls coming apparently. I hope the updates will come sooner as well!
     
  10. MaartenUT

    MaartenUT

    Joined:
    Aug 21, 2013
    Posts:
    18
  11. EstudioVR

    EstudioVR

    Joined:
    Jul 26, 2013
    Posts:
    127
    You can install Android SDK and use the EMULATOR for your tests.
     
  12. Kai_Zu

    Kai_Zu

    Joined:
    Dec 14, 2013
    Posts:
    17
    Hi. Bought this package long since, tried others, came back. This was the very first Unity-asset I bought and little did I know that I hit the jackpot with my first purchase!

    But now I find my skills lacking: I need to make the Player into a Bot. I already have a decent AI-script.

    The AI creates a path consisting of steps for the bot to walk. I've tried all I can think of to make the Player walk along the path step by step but failed. Usually the result has been that the Player-Bot flies up to the sky never to return!

    My current theory is that since the Player is controlled by the -1...1 -values returned from Input.GetAxisRaw() I could tweak that part in the PlayerMove-class to get the h and v -values from the AI-script. This way I probably could not be able to make the Player-Bot fly away or do things a human-controlled Player wouldn't do.

    The question now is that if I know the next step in the path (a Vector3 where the y-component is irrelevant) and the Player-Bot's transform.position what would be the algorithm for producing such h and v values that the Player-Bot hits the target Vector3 pretty close?

    And should the Player-Bot be bumped or otherwise shoved aside during his trek to the next step in the path he should of course correct his direction.

    I've tried to figure this out but getting only somewhat amusing results - like the Player-Bot running away from the step looking into all kinds of directions!

    My "AI-produced h and v-values" idea might be foolish and I'm open to any suggestions that meets the requirements stated here. And keeps the Bot on the ground!

    Thank you already in advance
     
  13. Greg-Sergeant

    Greg-Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    Kai_Zu:

    Any character in the kit uses a script called "character_motor", and this has a function which i think is called MoveTo() in this you can pass a: destination vector3, whether the character should fly, his maximum speed, acceleration and stopping distance.. and the function will move the character to that location and return "true" when the character has reached their destination.

    Each character also "auto-animates" according to their current speed, and has real physics so everything else is really taken care of automatically.

    So you can really just use that function to move the player along a set of points really easily - quite cool when you see it in action! Try taking a look in the guidebook and it will explain everything more clearly, and remember to email the support address if you need anymore help :)
     
  14. codemypantsoff

    codemypantsoff

    Joined:
    Jan 23, 2013
    Posts:
    8
    Great little package - got some breaking platforms and powerups working with very little work.

    I am having an issue with platforms that move - ones that go up and down are okay but i have ones that spin and the player just slowly moves to the outside

    See the attached video:
    https://www.youtube.com/watch?v=yfn-huZBpQE&feature=youtu.be

    Wondered if there was anything besides adding moving platform tag that would help
     
    Last edited: Apr 27, 2014
  15. Greg-Sergeant

    Greg-Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    Rotating platforms are not supported (this is quite tricky to accomplish using realistic physics), only moving ones, sorry for any confusion
    If you just want to use a simple physics version you could use "rotate around" to rotate the player transform around the centre of the platform.
    https://docs.unity3d.com/Documentation/ScriptReference/Transform.RotateAround.html
     
  16. codemypantsoff

    codemypantsoff

    Joined:
    Jan 23, 2013
    Posts:
    8
    Greg, thanks - I thought about making the player a child object of the platform when I land on it but that seems to have its own issues.

    What about ropes/ladders - have any good ideas on those?
     
  17. Greg-Sergeant

    Greg-Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    Ladder:
    - when player touches it: disable his gravity, rotate to face ladder, change movement axis to move up/down (can do this in move function), play animations
    Rope:
    - pretty tricky! many ways of going about it..

    The reason these aren't included is that they are fairly complex and i want the kit to be as EASY and SIMPLE as possible, so even beginners can quickly find their way around and adapt it. More complex does not always equal better and limitations are often paradoxically empowering for creatives.
     
  18. IndieGameHustle

    IndieGameHustle

    Joined:
    Jul 25, 2012
    Posts:
    66
    Hi Greg,

    Great product!

    I am having some issues with getting my character to "Let Go of the Object/Box" when I Pickup it works as it should however when I Push/Pull it stays connected.

    Any Reasons why this could be happening?


    Thanks in advance!
     
  19. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    This product looks awesome. I ave some questions before I buy.

    1) Is it possible to make a 2 player split screen game (or 2-player single screen co-op such as Gauntlet) with this plugin? If so, how difficult is it to set up that way for either of those types? This would of course require making each player read inputs from a separate Xbox controller.
    2) Is double jump included? I mean like Solar Warrior, where you jump a 2nd time in mid-air.
    3) Can you have the character hang from a ledge and crawl up onto it when you hit a button? Like old school Ninja Gaiden.

    Thanks!
     
    Last edited: May 10, 2014
  20. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    When is the next update?
    Is this still actively being worked on anymore?
    Melee attack or simple shooting attack would be sweet.

    Thanks!
     
  21. BokuDev

    BokuDev

    Joined:
    Jan 2, 2014
    Posts:
    81
    Beginners seem to still ask questions regardless you see that in these posts every-week. A lot of these features like ladders, ropes, melee attacks, swimming, etc seem similar to the earlier posts talking about much requested things things like "- the much requested wall jumping!" (<--- Is that still being worked on?)

    ------------------------
    Q. Wall-jumping? Ledge-grabbing?
    A. Very likely. Any features that get requested frequently, fit the kit, and keep things simple WILL be added!"


    Q."Maybe add: bow, boomerang, grappling hook, glider?
    A. Great ideas! Definite candidates for future updates."
    -----------------------



    Will these features be still updated for the future? Are these considered now too complex for the simple kit style? Ladders was for sure a frequent request for the last couple of months. (Though Melee attack, Wall-Jumping, enemy shooting and Ledge-grabbing) a ton more indeed lately.
     
  22. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741
    Me hopes the well of additional goodness hath not run dry...as the sucking sound of stillness chills the bones.
     
    Last edited: May 11, 2014
  23. MaartenUT

    MaartenUT

    Joined:
    Aug 21, 2013
    Posts:
    18
    $49414888.jpg
     
  24. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Bought this. I've modified PlayerMove.cs to add the following:

    1) Run button changes your accel to another number, settable in Inspector.
    2) When running, you jump higher. Alternate "run jump" fields for all jump force fields are used.
    3) Added true air double jump.

    Author, if you'd like me to send you this file for a future update, let me know. The code is very straightforward.
    Next I'll be working on adding projectile weapon capability.
     
  25. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    There's been no update to this package in the Asset Store for over 4 months. Perhaps the author isn't planning on doing any more updates. I hope the author can at least publish updates that some of us experienced coders make?
     
  26. sirius_002

    sirius_002

    Joined:
    Aug 16, 2012
    Posts:
    65
    I think most novice coders on here, me included, would be very interested in what you contribute to this kit. I hold you in high regard as a coder and developer, so please share what you are comfortable with. Thanks!
     
  27. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Thank you, I can't share entire files even over email, because I can't verify who in fact purchased this kit. I'll need the author's permission to share changes even don't I? I'm not sure how that works, and I don't want to assume.
     
  28. sirius_002

    sirius_002

    Joined:
    Aug 16, 2012
    Posts:
    65
    You are probably right, maybe the author can eventually shed some light on this. Because we really want to move forward with this package which is stagnating right now and it's too bad since it had such a running start.
     
    Last edited: May 14, 2014
  29. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    My offer to send my upgrades to the author is now retracted, due to zero response after an extended period of time. However I will likely package these upgrades into an optional package that I will include in our Core GameKit plugin ($2 on sale currently - 96% off!), and will consider eventually making a standalone Physics Platformer Extensions plugin. I'm too busy to make a completely new package, but adding it to Core GameKit would be quicker. Please respond here to let me know how much interest there is in this approach?

    So far I have done:
    1) True air double-jump
    2) Run button
    3) Alternate jump forces for running
    4) Projectile weapons

    Our just-started XBox game uses these plugins together (Core GameKit + Physics Platformer), and it seems to be a great combo. And you get pooling for free, along with tons of other features.
     
    Last edited: May 20, 2014
  30. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Yes.
     
  31. outtoplay

    outtoplay

    Joined:
    Apr 29, 2009
    Posts:
    741
    Thanks Brian,

    I can't believe that Greg would just abandon the package and his users. It's quite good. There must be a good explanation. Greg... where are you?
     
  32. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I doubt he is permanently abandoning the product. I agree it's quite good, and can think of tons more additions. He's probably just really busy with something else right now. I've seen he still replies sometimes on this thread. But 4 months without an update though, that doesn't bode well.
     
  33. parnell

    parnell

    Joined:
    Jan 14, 2009
    Posts:
    206
    Interested in an add-on.

    Melee attack would be dope too.
    Thanks again.
    B
     
  34. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    I agree, it's harder to do though (melee). I haven't tackled this yet and I haven't thought of a way to do it where different weapons will "just work". Might need to think some more.
     
    Last edited: May 21, 2014
  35. Greg-Sergeant

    Greg-Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    GameIntern - I believe i responded to this via support email, let me know if that wasn't you!

    1. Yes! Co-op platformers are awesome (Bugs Bunny and Taz time busters was great!) Duplicate the main player and its scripts, but just change the inputs for the 2nd player. You may also need to do the same for the manager so health logic runs for both players.
    2/3. No, the triple jump is a consecutive ground bounce like in mario 64. A double jump would not be too much trouble for a beginner programmer to add: check you haven't already jumped in the air with a boolean, check an input, then run the included Jump function. (edit: read you added it in. Nice work, i'm glad you're finding the kit easy to modify!)

    Jerotas - Thankyou for your generosity, i'm glad you're enjoying the kit. As far as sharing code goes, if you keep your modifications in their own functions feel free to publicly post those excerpts for people here to copy/paste into their own projects but of course please don't share big chunks of the original code. Some things like enemy projectiles and double jumping are very likely to feature in a future updates regardless.


    This complete physics platformer kit ($25) was "complete" the day it was released and i still believe it is THE BEST value for money and the most complete yet simple to use platformer package on the entire asset store - if not on any engine available today! The countless 5 star reviews, school-room licenses, unity team accolades, features and amazing games posted here are all testament to that! I want to make YOU HAPPY so i've given 24/7 customer support since release, responded to every forum post, have listened to countless requests and added TONS of free updates that YOU GUYS requested - including support for 2D and 2.5D games at the click of a button, more advanced and precise camera control, more in-depth enemy AI tools and video tutorials. You guys really help to build this package and community into the fantastic resource it is and i whole heatedly appreciate that. Please have faith that i will keep adding free updates you're happy with and continue to provide lightning fast customer support. Thankyou, and happy platforming!
     
    Last edited: May 21, 2014
  36. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Gotcha, thanks!
     
  37. BokuDev

    BokuDev

    Joined:
    Jan 2, 2014
    Posts:
    81




    Here is a video of the kit with moded code to have co-op. Works nicely!
     
  38. Greg-Sergeant

    Greg-Sergeant

    Joined:
    Feb 18, 2011
    Posts:
    76
    Woah! That looks really fun and something that might sit on the PS4 online store nicely!

    You could also quite easily use the physics for teamwork:
    - a balance beam
    - a see-saw
    - jumping on the other player

    or some kind of football game where you knock a ball into the other players goal!

    I havent tried it but you could also modify the throwing script to throw objects tagged "Player" as well, and have players lift/throw each other across gaps.. which could result in some really innovative co-op puzzles!
     
    BokuDev likes this.
  39. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    I will have to side with Greg here in response to all of the "complaints" and feature requests for this kit; it really is a phenomenal starter kit. I decided to learn Unity and abandon Unreal Engine because of his demo for this kit and haven't regretted it in the least. With that being said, it really is not that difficult to add a lot of the things that people have been suggesting be added. I came in with no knowledge of Unity (or C#) and was able to tweak this kit to get what I wanted:



    To sum up the list of changes built from his kit:
    • Double jumping instead of the triple jump.
    • Wall sliding and jumping.
    • Enemy projectiles.
    • Power-ups.
    And those are just the gameplay tweaks. I've also been able to implement level changes, serialization/saving/persistent data, prettier water, and more enemy behaviors. To be fair, I do have previous knowledge of how games are made but again, if a Unity novice can add and build on the offerings of his kit, anyone with a little time and patience can. Thanks again Greg! :D
     
    Last edited: Jun 2, 2014
    BokuDev likes this.
  40. BokuDev

    BokuDev

    Joined:
    Jan 2, 2014
    Posts:
    81
    Thanks Greg! I will for sure use those suggestions for some cool gameplay! I will make red knight be able to chuck other players farther than the others. I'm sure as well it will be awesome for puzzles, thank you!
     
  41. sistematix

    sistematix

    Joined:
    Dec 26, 2012
    Posts:
    9
    hi guys, i know this is very simple for you, so i want to activate the blur effect C# on the main cam when player is inside the water collision box, i know the activate component script but i cant figure it out where to integrate it?
     
  42. nonameu

    nonameu

    Joined:
    Apr 8, 2014
    Posts:
    18
    Hi Greg really nice work :)
    Just one question, how do you reset the onJump after you jumped the third time? I'm asking because after I jump three times, onJump is continuos at the value of two
     
  43. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    I did something similar (before I decided to go the double-jump route) and I just added an onJump = -1; to the else if (onJump == 2) statement to reset the counter after performing the third jump.
     
  44. nonameu

    nonameu

    Joined:
    Apr 8, 2014
    Posts:
    18
    thanks but I figured out and this is what works best for me

    Code (CSharp):
    1. .........
    2. else if (onJump == 2){
    3.                         Jump (thirdJumpForce);
    4.                         StartCoroutine (resetJumpCounter());
    5.                 }
    6.              
    7.             }
    8.  
    9.         }
    10.      
    11.     }
    12.     IEnumerator resetJumpCounter(){
    13.         yield return new WaitForSeconds (1);
    14.         onJump = -1;
    15.     }
     
  45. Camtrack

    Camtrack

    Joined:
    Jan 1, 2013
    Posts:
    27
    I just have bought this kit ,

    really nice !!

    I some questions...

    what could be the best approach
    for making a game wiht some zones in 2d and others in 3d...

    some portals that made the trasition ¿?

    and what could be the solution for the convergence for the 3d to the 2d limitation , colision walls ¿?

    lot of thanks for doing this asset !
     
  46. jerotas

    jerotas

    Joined:
    Sep 4, 2011
    Posts:
    5,572
    Right on, can you describe how you did wall sliding and jumping in the code?
     
  47. Cooper37

    Cooper37

    Joined:
    Jul 21, 2012
    Posts:
    383
    Would you care to share exactly how you did those camera movements/events/cutscenes?
     
  48. Besus

    Besus

    Joined:
    Mar 9, 2014
    Posts:
    226
    Using Camera Path Animator (from the asset store). I just created a trigger zone which kicked-off the camera animation (and freezes the player to prevent movement for the duration).

    While I won't share my code, I will gladly share my logic. Basically I used the "Grab Box" trigger already on the player to detect when it touches an object tagged with "Wall" (I'm sure there is a way to use a Raycast or similar method to detect if the wall is flat or not but I opted for the tag method). As long as they are not grounded and the Grab Box is touching the "Wall", I rotate the player to face the wall, reduce their movement speed in the Y axis, and greatly reduce the air rotation speed to make it feel like they are sticking to it. They can still rotate off if the wall is tall enough but typically they will stay stuck until grounded again. While they are wall sliding, I flip a bool to enable a wall jump which just applies a jump force (with more emphasis on X-axis force) and rotates them 180 degrees when they press the Jump button. Once they break free from the wall (Grab Box leaves the "Wall" object) or touch the ground, the default air rotation variables are restored and the bool to wall jump is reset.
     
    MOAI_ and DanielSnd like this.
  49. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hi Greg,

    Is double jump ready in kit ?

    +++
     
  50. Phenomonaut

    Phenomonaut

    Joined:
    Sep 30, 2012
    Posts:
    61
    Trying to put a new animated model in, but it constantly thinks that it's falling. Any idea what I've missed?