Search Unity

[Released] 2D Platform Controller

Discussion in 'Assets and Asset Store' started by JohnnyA, Mar 11, 2013.

  1. BioFan

    BioFan

    Joined:
    Mar 4, 2013
    Posts:
    24
    Ahhh cool, but the beta allows you to do all the moves you have in the kit? or just specific to the ones that has the transitions? Are you going to fully support this for future versions?
     
  2. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    If you just want to get going with a quick 3D sample the existing stuff is fine. I think its missing one or two moves but it is not hard to add them, the bridge passes all of the information to mecanim, you just have to determine what animation plays for a given state.

    If you are polishing your game for release its almost certain you will be using your own animations, will be adding new states, will have gestures and facial expressions, you may want blend tree locomotion, etc. You are going to have to edit the mecanim animator for your behaviours anyway.

    With that in mind, and the eventual release of Platformer PRO, there's no plans to provide a mecanim sample that includes every state.

    Here's a look at the basic idea:

     
  3. BioFan

    BioFan

    Joined:
    Mar 4, 2013
    Posts:
    24
    Thanks @JohnnyA that's true :) Maybe I'll wait for the Platformer PRO then :)
    will learn some coding for now. I will need to know to finish my game anyway. Thank you :)
     
  4. ZenUnity

    ZenUnity

    Joined:
    Apr 21, 2013
    Posts:
    28

    Hi @JohnnyA, I got this explosion to work with my character but it is shooting my character through walls. I need the explosions to be forceful, but the raycast colliders don't seem like they like high velocities. Any ideas on how to solve this??
     
    Last edited: Oct 27, 2014
  5. vidjo

    vidjo

    Joined:
    Sep 8, 2013
    Posts:
    97
    Johnny, since its going to be a while for the release, is it possible for current owners of 2DPC to get their hands on a working Platformer Pro version?
     
  6. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Not technically as it ended up being a lot of hassle to support... however if you asked my a few times in a nice way (maybe add me on youtube and twitter or some such) then I could be persuaded.

    - - - -

    In other news I've just retrofitted some of the slope stuff from PRO back to 2DPC. Its not quite as good, but it makes certain situations (i.e. non rotating characters) much easier to set up. Haven't polished/tested enough to push to the store but in the man time if you are interested let me know via support request including your asset store order number.

    - John A
     
  7. vidjo

    vidjo

    Joined:
    Sep 8, 2013
    Posts:
    97
    Haha, fair enough. I do already have you added on Youtube and Twitter, however ;)
     
  8. ZenUnity

    ZenUnity

    Joined:
    Apr 21, 2013
    Posts:
    28
    Hi @JohnnyA, I'm still really in need of some type of solution to this. The characters in my game need to be able to be move at high velocities in certain instances (ex. dashing, explosive push backs). For now my solution has been to extend the raycasts in these instances, but it is causing some messy behavior such as pushing my character through walls if the character is next to a wall when the raycasts are extended. I'd really appreciate your input on the matter. Thanks @JohnnyA!
     
  9. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Hi @ZenUnity,

    please use support requests if you want timely help. I check here sometimes but not frequently. Support requests will rarely go unanswered for more than a day.

    If you need to go really fast you can do a couple of things, the first is as you have mentioned increase collider length... in the end if you move further than the collider length in a frame then you can miss collisions. The best thing to do here is to grow the collider as your speed increases. I've got some sample code for this if you need.

    The other thing you can do is to reduce maximum frame time, if you know you can maintain 60fps (for example) you can reduce the static variable in the controller itself.

    Once again please contact support@jnamobile.com (or raise a ticket using the button on the left hand side of the website) if you want more details in a timely fashion.

    Regards,
    John A
     
  10. DeepSeaDigital

    DeepSeaDigital

    Joined:
    Nov 9, 2013
    Posts:
    14
    pc2d.gif

    Hey Johnny

    I have been trying to use the Raycast Character Controller script for my main character,
    I tried to build on the Basic Character Controller first but it would sink into the ground colliders. then and tried to use Raycast Character Controller 2d on the Character and build It just like the Alien 2d example but it still sinks in.

    Is there anymore documentation or a very in depth tutorial of how to swap out the example Character for your own Character?

    Thanks in Advance

    -Nick
     
  11. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    A bit hard to say why it is sinking in to the ground from a gif, but personally I usually start from Basic or Hero. What type of character are you swapping in (Sprite, Mecanim, Legacy, 2D ToolKit)?
     
    Last edited: Nov 6, 2014
  12. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Given that Platformer PRO has been so slow to arrive I have submitted v1.9.2 and will likely follow up with several more minor updates and fix versions.
    Code (csharp):
    1.  
    2. v1.9.2
    3. - Fixed direction issue in new animator
    4. - Added ability to handle slopes without any rotation
    5. - Added 2D to Ladder Wizard
    6.  
    Will also be adding some more basic getting started type tutorial to the website/youtube channel.
     
  13. DeepSeaDigital

    DeepSeaDigital

    Joined:
    Nov 9, 2013
    Posts:
    14
    its a puppet2d rig that uses Mecanim

    run.gif

    The gif came out weird but that is the rig, its smoother in game lol
     
  14. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    What does:
    mean exactly :D ?
     
  15. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    760
    I assume it means that you can now easily have a character that walks up and down slopes without the actual character rotating to the angle of the slope. I thought there was already a way to do that but maybe there wasn't or it was wonky.
     
  16. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Yeah, that's why I asked, I thought there was already a way by setting the rotation speed.
     
  17. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    @BTStone @TheValar

    You could do it previously by rotating the controller, and then adding a don't rotate script to the sprite. This worked but in some cases could cause jerkiness issues, resolving these was possible but sometimes tedious.

    The new method is an alternate method which requires less set up (tutorial to follow, but basically you type one number in to two boxes) but has some other limitations (if you are able to run faster than gravity pulls you to the slope it becomes jerky). Its basically a simpler method.

    - - - -

    Its the same old chestnut. When I wrote the controller it was aimed at experienced programmers familiar with Unity but thats not the reality of the audience. Given Platformer PRO is so delayed I'm trying to get some minor fixes and some more entry-level tutorials done so at least these folks can get started and see some value.

    On a positive note, I've stopped taking on contract work, my latest game is done and day job has settled down, so hoping to make some more progress on assets. Should be a new Platformer PRO video soon.
     
    theANMATOR2b and TheValar like this.
  18. ZenUnity

    ZenUnity

    Joined:
    Apr 21, 2013
    Posts:
    28
    Hi @JohnnyA, I am curious to see the sample code you have for the growing the lengths of the colliders as the character's speed increases. Thanks again.
     
  19. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Can you please raise a support request, its much easier for me to track of what is going on via the support system. It also means if you have a later request I can see the history and provide answers with more context!

    - John A
     
  20. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    New getting started tutorial, aiming to do a few over this weekend, as well as another release (found a couple of editor bugs):


    @DeepSeaDigital This may suit your needs depending on if you want to use non-blending animations, if you want smoothed transitions you would need to use a different animator.
     
    outtoplay likes this.
  21. Banky

    Banky

    Joined:
    Sep 10, 2014
    Posts:
    24
    Hi ,

    I'm working on a basic 2D game (no climbing or ledge hanging) and I realized after update to 1.9.2 my character is walking slower when he approaches the end of a platform (just before start falling). Anyone else is experiencing this? Is there a way to disable this behavioud? It didn't happen in 1.9.0

    Thanks!
     
  22. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422

    Does the AnimationBridge-Comp. work with 2DToolkit-Animations?
     
  23. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    No it drives mecanim. I must admit I haven't looked at 2DTK stuff for a long time, if you are having any issues fire of a support request, be happy to update it.
     
  24. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Send me a sample package to support@jnamobile.com please. I pushed 1.9.2 out pretty quick so may have missed something along the way.
     
  25. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Submitted a small update to day with some bug fixes for 2D.
     
    vidjo likes this.
  26. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Updated approved.
     
    Mr-Stein and vidjo like this.
  27. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Howdy folks, just mentioning that I will be on leave from work from next week and will be dedicated a large chunk of time to assets (which should mean Platformer PRO gets quite a lot of momentum).

    Cheers,

    John A
     
  28. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,790
    JohnnyA you work too hard!
    Please keep it up! :)
     
  29. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Here's the feature list I'm working to for the holidays (note that this does not include features already delivered).


    Must Haves

    Movements:
    - Double Jump/Triple Jump/N-Jump

    Interactions:
    - Decaying/Falling Platform
    - Keys and Doors

    Animation:
    - Mecanim Animator for 3D

    Items:
    - Collectible items (coins, lives)

    Code Fixes:
    - Wrap GUI/Inspector code in #if UNITY_EDITOR

    Camera:
    - Camera follow with smoothed centring

    Input:
    - Sample with Xbox and PS3 controls (okay to use Unity inputs)


    Should Haves

    Movement:
    - More wall movements - Jump, slide, run, etc.
    - Ledge Hang and Climb
    - Swimming
    - Ropes

    Interactions:
    - Trampoline
    - Fan
    - Pipe <- Mario Style
    - Button and Lever Example (trigger with animation)
    - Bobble Bricks <- Mario Style
    - Break Bricks <- Mario Style

    Overrides:
    - Default Movement Override from Power Up - Example: JetPack
    - Animation Override from Power Up - Example: JetPack
    - Single Movement Override - Example: Cut Scene, Ragdoll
    - Complete Character Switch -> With animate character running on/off?
    - Example: Example: Pick up axe and you have an axe, you can attack with it, and you can’t double jump.

    Camera:
    - Camera follow with boundaries (start move only when some percentage of screen from edge).
    - Camera follow with chunks (move a full screen width when hitting edge).

    Attacking:
    - Eight-way shoot

    Animation
    - Legacy 3D Animator

    Input:
    - Configurable Input Sample
    - Touch Input Sample

    Collisions:
    - Auto collider creation (static)

    Integrations:
    - Ferr2D
    - 2D ToolKit
    - cInput2

    Nice To Haves

    Overrides:
    - Complete Character Switch with animated character switch
    - Basic cutscene mechanism
    - Ragdoll

    Interactions:
    - Pickup/putdown/throw - Mario 2 style
    - Push and pull boxes
    - Physics interaction
    - Rope bridges
    - Gravity switch
    - Loop-de-loop

    Animation:
    - Step climbing for 3D
    - IK on slopes for 3D

    Collisions:
    - Auto collider creation (dynamic)

    Integrations:
    - Playmaker
     
    Last edited: Dec 19, 2014
    BTStone likes this.
  30. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    A note on buying Platformer PRO

    Platformer PRO will launch for the relatively high price of $100. I believe the product will be well worth it!

    My current view is that Platformer PRO will be a separate asset store product to 2DPC.

    I will still honour my promise to existing users to get a free version of Platformer PRO, however you will need to request a copy using a support ticket. Those who wish to support further development of PRO and who want to have easy access via the Asset Store are encouraged to purchase the product (if their wallet allows).
     
    superwendel and BTStone like this.
  31. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Glad I'm already an existing user for now :p
    But as soon as the wallet is filled again, I'll support you gladly :)
     
  32. superwendel

    superwendel

    Joined:
    Jun 18, 2013
    Posts:
    105
    Sounds great Johnny. I'm really looking forward to the eventual release of Platformer Pro. Keep up the great work!
     
  33. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    One of the things I would like to do with this asset is provide some samples that closely mirror a small snippet of some good platform games (Broforce, Metroid, Mega Man, Super Meat Boy, Super Mario Bros, etc).

    Accordingly I will need some art (primarily character animations as these are the hardest to source online).

    If anyone would like to contribute some art please get in touch via PM. I can't offer market rates, but I can offer some combination of cash, royalties and good will.
     
  34. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    you say mega man i'am here !
     
  35. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Just a quick update on Platformer PRO, some videos will follow in the next few days (or maybe a bit longer... internet is terrible here).

    Features Added
    - - - - - - - - - - - - - - - -
    Crouch and Crawl
    Double Jump
    Camera(s) with scrolling and zones
    Collectible and Stackable Items
    Jetpack with Optional Fuel
    Legacy 3D Animations with easy drag and drop configuration


    Next step is to build some sample games which I will release here. Then back to features.
     
  36. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    you make good corgi engine look very good and nobody can wait so long
     
  37. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    @kilik128

    Corgi Engine is very pretty and I'm not going to promote my product by pointing out flaws in another. You are welcome to use it or any of the other great kits available.

    When Platformer PRO is released I will list its features and provide lots of videos and samples. You can decide if you want it then.

    Regards,
    John A
     
  38. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    Yes sorry for this joke :)
     
  39. AMO_Noot

    AMO_Noot

    Joined:
    Aug 14, 2012
    Posts:
    433
    Great to see PRO coming together at last! Looking forward to the samples/videos.
     
  40. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Will PRO work with Unity 4.3 ?
     
  41. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Not officially, it has uGUI element so will be released with 4.6.

    However I don't think there's anything major that wouldn't work with 4.3. When I get closer to done I'll give it a shot.

    - John A
     
  42. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    In other news I Implemented gravity flip today, this is an oft requested feature.

    Any Movement can now implement an interface to indicate it works with gravity flip (Character will show a warning if you have a FlippableGravity and a movement that doesn't support it). Currently slopes are supported and I've added gravity flip support to digital air and ground movements. Will slowly expand this out to other movement types too.

    You can assign an action key to gravity flip (user controlled), or you can attach it to a trigger.

    Note this is not arbitrary gravity direction, that one is a bit more of a deviation from how the Movements works so its not likely going to make first release.

    Next day or two will be clean-up of existing features. I built a simple sample game (once I have some fast internet I'll upload it) and in doing so come across a few bugs and usability issues that need to be addressed.

    Regards,

    John A

    PS Attached is a little screenshot showing camera zones. The Camera Zone is an area within which the camera will follow the player. There are currently two types of follow, hard-follow and smooth follow. Smooth follow allows you to set a threshold which needs to be reached before the camera moves, along with acceleration, etc. You can chose different follow moves for each axis (or not follow in a certain axis). The camera zone size is calculated based on your settings plus the current camera settings, so the blue box should represent the exact boundaries that will be shown in the game (unless you change camera settings like ortho size mid-game).

    When the player hits the Trigger the zone will be changed to the second zone. Because the zone is bigger than the camera size we have defined a Transition Point which shows the area the camera will show after the transition based on current settings of camera (Dark blue rectangle outline).

    Often you would have a transition back to the original zone too, although some games have one-way cameras to: in this case you would also want to attach the trigger to a collider which becomes enabled so the character can't walk back in to the old zone.

    Might pretty this up a bit, but thats the basics. As with everything its written to be extensible so currently a tweened move (configurable type and speed) is used between zones, but you could extend so the transition uses fade in/fade out, or whatever you desire.
     

    Attached Files:

    AMO_Noot and superwendel like this.
  43. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    Found a public Library with some slightly less slow internet so posted a couple of rough cut sample scenes.


    Although WIP I guess the main point of interest is that both these samples were created with zero coding.

    Next thing on the agenda is the Mecanim Animator(s) for 3D and also a set of movements which use mecanim root animation instead of translating the character directly.
     
  44. superwendel

    superwendel

    Joined:
    Jun 18, 2013
    Posts:
    105
    Looks great Johnny, thanks for sharing the progress video with us.
     
  45. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    No videos today (back home in 2 days) but a quick list of some things that have been done:

    - Mecanim Animator done (the one that does animation only, not root movement)
    - Cleaned up movement custom editors so they have sensible defaults and undo works across the board.
    - Sticky wall cling and wall jump similar to Super Meat Boy.
    - Added enemies to CommandBro sample.
    - Variable height jump that simply takes a height min and max and a time value indicating how long the player has to hold the jump button to jump to max.
    - Added gravity flip support to a few more movements.
    - Started working on controller support.

    Not a lot as new years wasn't conducive to doing a lot of work, but a few big wins IMO (mecanim and undo).

    A few things that I'm hoping to do over the next few days:

    - A sample similar to Super Meat Boy with the floaty jump and precise ground and wall movement.
    - Ledge Climb
    - Multi item Inventory with simple GUI
    - Finish Basic controller support (XBox, PS3).

    A few days after I get back home will do an extensive video.
     
    BTStone likes this.
  46. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    Why can't you update the existing asset and put the price up like most other sellers do?
    I thought this was the point of the store, so your existing customers don't have to keep asking for updates and they get the product they were promised? I'm pretty sure most of your customers would prefer this approach and would be happy to backup any previous versions.
     
  47. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,422
    Hey @JohnnyA

    regarding Controller-Support: do you think you can add XONE/PS4-Controller-Support?
     
  48. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    2DPC has had many updates over its life (originally it was simply collision physics based on raycasts), but that life has come to an end.

    Platformer PRO is a complete rewrite with no shared code, it is a different product with a different mandate. It is still available for free to 2DPC however they will need to request a copy using a support ticket. Those who wish to support further development of PRO and who want to have easy access via the Asset Store are encouraged to purchase the product (if their wallet allows).
     
    superwendel likes this.
  49. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    5,041
    I don't have either of those controllers but I don't expect they are vastly different to existing controllers. Furthermore controller presets will be defined in an XML file which users can share between themselves (or with me, anything I can verify can move to the package itself).
     
    BTStone likes this.
  50. Ryan-Hayle

    Ryan-Hayle

    Joined:
    Feb 16, 2014
    Posts:
    142
    I can see your reasons for selling this as another product, but as your customer I bought this asset for Platformer PRO, which you stated would be included. I have been waiting patiently for it since my purchase date, I even got to try a couple of betas and now to be told I can not have access to it via my asset account does not make me happy. I have been checking and your reading updates on Platformer PRO for the past 10 months, so I am pretty surprised to be reading this last statement now Platformer PRO is close to complete, did I just get mislead?

    Okay say I'm fine with this, how will I receive my regular updates for Platformer PRO as I don't want to keep spamming you with update requests? And what if you decide to rename it Platformer PRO 2 six months later, will I still get my updates?

    From my point of view, 10 months ago I was sold Platformer PRO including the asset store updates. If this was not your intention, why was this not clearly stated over the last year?

    Please don't be offended Johhnny, it is nothing personal. I just want the product I paid for. I'm fine with the another new yearly version/product, another new upgrade fee approach. However I'm not fine with being told Platformer PRO is included and then backtracking 1 year later. Please provide more information regarding existing customer access to Platformer PRO and how you plan to resolve this matter.

    Thanks!