Search Unity

  1. How can our website serve you better? Give us your feedback. Take our survey and let us know.
    Dismiss Notice

[Released] 2D Platform Controller

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

  1. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    Hi Ryan,

    on a discussion board people discuss things. Although I try and prefix my statements here with a qualifier like "my current plan" sometimes in my enthusiasm I may forget to add such a qualifier.

    What is your purpose? Are you trying to be right? Yes I'm sure I've made some statements that are not consistent, my plans change. It becomes very tedious if I have to write every forum post and email as if its part of a contract negotiation.

    Are you trying to be the defender of the innocent customer base? Well let me say that the overwhelming sentiment from the customer base is positive, more people have asked for me to make this a separate product with a separate charge than have complained about it. This may be a little surprising, but I guess most people understand that if I am getting a reasonable financial return from the product I'm much more likely to be devoting time to improving it.

    Are you trying to get the product you paid for? Well you did, you got what was in the asset store description. You will also get a copy of Platformer PRO when it is ready if you are willing to take some small action such as sending an email or filling in a web form. Updates will be obtainable in the same way. Alternatively if you don't believe you will get what you paid for I will authorise a refund from the asset store (literally the first such occurrence for this product).

    Now let me be very clear:

    * Platformer PRO does not yet have nor ever has had a beta. I sent a very early very incomplete preview version to a few people because i thought it might by fun for them to take a look.

    * Platformer PRO does not have a release date. Its not complete or close to complete. I've just had some time off work so I have been able to progress it fairly rapidly.

    * The way Platformer PRO will be released or obtained, its price and the terms are not defined. The only guarantee is that those who own a copy of 2DPC will be able to get a copy of Platformer PRO without paying for it.

    If you have a problem you still think is not addressed by the above please use email.

    - John A
     
  2. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    Here's an update which goes in to lots of details on creating enemies (it also shows some of the new stuff in the CommandBro Sample such as animation overrides, particle effects, destructible platforms, the ground movement RollOnFall, etc).


    The video might be a touch boring as it goes through all the details feel free to skip :)

    Performance is a bit crap as my laptop can't handle the video recording at full screen very well, so the jittering isn't present on normal play (or even mobile). Demo's will eventually be published for IPhone, Android and Web so you can verify.
     
    Last edited: Jan 11, 2015
  3. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,237
    Great video. Are we able to create custom enemies or extend them, too? I mean by creating a childclass of Enemy and suit it to the needs of the game(play), but still be able to work with the other classes (Animation Bridge. Damage-Scripts etc.)
     
  4. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    @BTStone

    You can create a custom Enemy class as everything is written to be extend, however most of the time you wouldn't need to do this. More typically you would create custom AI and/or custom Movement classes. These classes are much smaller and focused on a particular task.

    The idea is users will be able to share their custom AI's and movements and there will a growing library of them. Of course I'll be adding these too, through general updates and in response to support requests. This concept extends to Character Movements, Platforms, Items, etc, basically every thing is written to be extensible and pluggable.

    There will be of pre-made (prefab) enemies which have all the bits already added for those getting started.

    Basically the responsibility is as follows:

    Enemy - Health, damage, base collisions and orchestration. Makes sure the other bits do things in the right order.

    AI - Senses things in the environment and makes a decision about what to do next.

    Movement Distributor - Turns an AI decision into a movement by mapping from AI decision (state) to a Movement class.

    Movement - Moves (translates) the enemy and sets the animation state.​

    Here's a diagram from the manual:

    EnemyPatterns.png

    In the first case you have one Movement class doing everything. If you don't want to use the AI system you can write more complex Movement classes which also embed all of your enemy AI. If there is only one Movement class attached to an enemy it has a method similar to Update called DoMove() which gets called every frame.

    In the second case you are separating the movements in to pieces, and using the AI class to pick which one to use at a given time. The benefit of this is the modularity: you can write lots of small movements like Charge, Slash, Hide, Chase, etc and then combine them together to make different kinds of enemies.

    - - - -

    NOTE: You can also create enemies that are full blown characters with an Input class as an AI similar to the sample in 2DPC. This should be pretty rare but if you want very complicated enemies the option is there.
     
    Last edited: Jan 11, 2015
    BTStone likes this.
  5. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,237
    Love it. Can't wait to get my hands on this! :)
     
  6. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    Howdy guys just quick text update, I'm back at work but have managing to get a bit done on the train every day (I have quite a long trip in to work). This week been focusing on verifying my claims that the package can theoretically support any kind of movement by implementing some advanced movements: namely 90 degree wall running and sonic style loops (i.e. complete 360).

    They are all but done and you should have a video of it over the weekend (although it wont be very pretty as I haven't got art for a sonic like demo yet).
     
  7. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    And a quick video as mentioned, basically showing loops hit at various speeds and a few other bits 'n' pieces:


    Next is finishing off input system, cleaning up some of the inspectors and maybe a couple more platform types and I think we will be ready for closed beta.
     
  8. StevenWendel

    StevenWendel

    Joined:
    Jun 18, 2013
    Posts:
    105
    The 360 degree sonic style loop looks great.
    Will the possibility of a closed beta be available to someone who has 2DPC?
     
  9. snake77jt

    snake77jt

    Joined:
    Dec 23, 2014
    Posts:
    46
    Hey Johnny I just bought your asset and its amazing. I was just wondering how to create a trap (spikes), so when my character touches the spike he will die and re spawn back in to the spawn point. And how do you create a spawn point. Thank You!
     
  10. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    @snake77jt - If you take a look at the samples with "damage" in the title and you will see how health and hit boxes can be added to the Character. Basically your spikes are just like the bullets in the sample.. except they don't move.

    Respawn points are created by adding the Respawn script to a platform (i.e. a game object with a collider that you walk on). The respawn is triggered by the SimpleHealth script if you set your zero health action to ZeroHealthAction.RESPAWN.

    If you need more details send me a support request.

    @StevenWendel - Closed beta is only available to those who have 2DPC, but it will probably be leaked out to a small group of people at a time. Sending a support ticket mentioning your interest is the best way to get on the list.
     
  11. snake77jt

    snake77jt

    Joined:
    Dec 23, 2014
    Posts:
    46
    I also have another question, how do i implement the dpad controls on to my character. BTW sorry for asking on the forums, and not asking on the support site. Whenever I go to the support site I would get a connection error.
     
  12. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    Not sure what is happening on the support site (seems fine for me) but you just need to send an email to the address in the documentation.

    - John A
     
  13. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    New demo scene coming soon, this one showing some more enemy behaviours and character movements plus six-way aiming/shooting.
     
  14. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    723
    I've been away for 8 months, but was curious when we will be seeing the new version?
     
  15. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    I'm learned that promising release dates is not a good thing. Platformer PRO closed beta is hopefully going to start soon. The only thing I need to finish off for it is user configurable and touch inputs.
     
  16. EddieChristian

    EddieChristian

    Joined:
    Oct 9, 2012
    Posts:
    723
    That's good to know because I just started a new project today using your tools. :)
     
  17. The_Daleatron

    The_Daleatron

    Joined:
    Nov 26, 2013
    Posts:
    43
    Hay havent been on here in a long while, but i have been keeping up with the you tube video updates, Has any of the updates in the video's been updated into the asset store version ? if not how do i get any of the new stuff, thanks.
     
  18. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    Hi @The_Daleatron this is a completely new product not an update to 2DPC. When released you are encouraged to purchase from the asset store to support development BUT all 2DPC customers are entitled to a free copy of Platformer PRO (and upgrades) which they can get by sending a support ticket.

    In other news I posted another sample which includes six-way shooting:


    I've also added a (very) simple menu system and the ability to configure keyboard input in game. Once joystick input is also configurable in game (soon) then I will write up some doco and begin the beta testing!

    - John A
     
    StevenWendel likes this.
  19. The_Daleatron

    The_Daleatron

    Joined:
    Nov 26, 2013
    Posts:
    43
    thanks johnny, i bought the pro version a while ago but i put my little project on hold for some of the updates so il put in a ticket on your site later on thanks for the reply.
     
  20. StevenWendel

    StevenWendel

    Joined:
    Jun 18, 2013
    Posts:
    105
    Thanks for the video update John, looks great. I noticed that you pointed out that you're using mecanim for the six way shooter example, will the other examples within your kit be using using your AnimationBridge script?
     
  21. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    @StevenWendel there are a couple of animators included:

    One is similar to the AnimationBridge in 2DPC (although it does a few extra things like allow for animation overrides). This one is used in all the other videos (except 3D ones). Best for most simple 2D games.

    One is a more traditional Mecanim which sets variables and relies on transitions. As seen in this video. Probably best for 3D characters too.

    One is similar to the first except it allows you to add transition states as well (by for example selecting FALL and IDLE as a "transition pair"). Use this if you want more complex 2D or 3D that is more direct. Not in any videos as yet but I could have used this for the example above and got the same behaviour.

    One is a Legacy 3D animator similar to found in 2DPC.​

    Note that except for Legacy they are all Mecanim (which is required for Unity sprites). The difference is around how the animations are played (directly or via transitions). I'll also likely add a 2DTK animator before initial release.

    - John A
     
  22. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    Configurable controls for keyboard and controller are in place, and a simple (but fairly flexible) menu system is almost done too:

     
  23. BlankMauser

    BlankMauser

    Joined:
    Dec 10, 2013
    Posts:
    116
    Amazing.

    How are you planning to handle closed beta? 2DPC buyers will be allowed to apply?

    I thought at first 2D Pro would be mostly superficial enhancements but this has me in total anticipation now.
     
  24. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    @BlankMauser

    Expressing interest via a support ticket is the first step. I'll be sending emails out pretty soon (probably next weekend) with details of the next step. I will be looking to get a mix of programmers, artists, newbies and pros.

    - John A
     
    BlankMauser likes this.
  25. Mr.Stein

    Mr.Stein

    Joined:
    Dec 4, 2013
    Posts:
    169
    @JohnnyA i have a question, Im a 2DPC buyer and I know we r going to have a free copy Platformer PRO (and upgrades) as you say, but if I can get the money and I decide to buy the "Platformer PRO" to support even taking the previous product(2DPC), We will have a some surprise or benefit separated from the fast download via Assets Store?

    thx for your work @JohnnyA =)
     
    Last edited: Feb 8, 2015
  26. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    Thats not a bad idea, I should have some way to encourage people to make a purchase (beyond the kindness of their hearts ;) ).

    How about something like 2DPC customers who purchase Platformer PRO from the asset store can request a custom feature like a movement, enemy AI, etc and I will implement it in to the engine as a high priority item. Thoughts?
     
    The_Daleatron and BTStone like this.
  27. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,237
    Seems fair enough. And on top of that a hug whenever you see one of your customers!
     
    The_Daleatron likes this.
  28. Kirbychwan

    Kirbychwan

    Joined:
    Aug 14, 2012
    Posts:
    430
    Glad to see PRO is finally making it out there!
    I'm sad that I won't be able to use it for my current project, (too much code and time invested in 2DPC!) but rest assured I'll be purchasing it and using it for my next one; as it's looking fantastic. Really wish we had that great AI feature in 2DPC.
     
    Last edited: Feb 10, 2015
  29. StevenWendel

    StevenWendel

    Joined:
    Jun 18, 2013
    Posts:
    105
    Sounds like a good idea to me. I was already planning on buying Platformer Pro to help support it but the extra incentive is a nice touch.
     
  30. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,237
    Just another question regarding Platformer Pro:

    Did you redesign the Slopes-Logic, too? For now in 2DPC one should be more carefully with the slope-angles, how is it going to be in Pro?
     
  31. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    Hi mate, everything is redesigned, about the only thing similar is that it is still based on the notion of "raycast colliders" pushing the character.

    Slope angles now use the normals of the surface (it checks the rightmost foot and leftmost foot angles and then if they are different drills in to the other feet to find which one is preferred). You can also set (relative) angles which are ignored by side colliders (so you control at what angle something becomes a wall instead of a floor).

    There shouldn't be issues with vibrating and there is no need for smoothing geometry even with large changes of angle. I did this stuff a while ago but so far haven't run in to any problems.

    - John A
     
    BTStone likes this.
  32. BTStone

    BTStone

    Joined:
    Mar 10, 2012
    Posts:
    1,237
    Oh boy, looking really forward to this!
     
  33. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    Platformer PRO - Beta - Registration of Interest links have been sent out to those who have expressed interest. If you didn't get one but think you should have send me a PM or support request.

    - John A
     
    The_Daleatron likes this.
  34. The_Daleatron

    The_Daleatron

    Joined:
    Nov 26, 2013
    Posts:
    43
    silly question but i dont recall how to find my asset store order number for 2dpc
     
  35. StevenWendel

    StevenWendel

    Joined:
    Jun 18, 2013
    Posts:
    105
    On the Asset Store invoices that you receive through email, it is listed there. I don't personally know of any other way to find it if you don't have it anymore though.
     
  36. The_Daleatron

    The_Daleatron

    Joined:
    Nov 26, 2013
    Posts:
    43
    got it sorted thanks, finally being lazy and unorganized when it comes cleaning out my inbox has paid off.
     
  37. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    @The_Daleatron Personally I try not to 'clean up' invoices :p

    Anyways thanks everyone for the replies. Every day I keep adding things to my TODO list however I'll be drawing a line in the sand for the first beta quite soon, maybe this weekend (although me and my two little ones are 'home alone' for the weekend which probably wont be conducive to large amounts of work).
     
    The_Daleatron likes this.
  38. Ylex

    Ylex

    Joined:
    Apr 9, 2012
    Posts:
    14
    Hi Johnny, I have two questions.
    Platformer Pro will have a support for workflow with quads and textures like 2DPC has now, or everything will be sprites?
    And will there be something for games with more than one game level, like persistent score, game managers and singletons?
     
  39. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    @Ylex Like 2DPC animation is separate from physics.

    I'm not really sure what workflow you are referring to when you talk about quads and textures. If you mean animating 3D objects using animation clips then yes that is supported via Legacy or Mecanim animators.

    If you are doing 2D I don't really see a good reason not to use either sprites or maybe some 3rd party package (2DTK, Puppet2D, Uni2D etc). A 2DTK animator is likely to be included on release, others will be developed as people request them.

    There is an ItemManager for handling collectible items across levels, and a level manger for handling level unlocks. I plan to add something for scores and lives too (before release but probably not in the beta).

    - John A
     
  40. Ylex

    Ylex

    Joined:
    Apr 9, 2012
    Posts:
    14
    Well, I was more referring that ropes don't work with sprites for now as I understood, so 3D objects has to be used for that? I mean more on that than animation itself. I'm sure that will work in Platformer Pro with 2D but it's good to have legacy until then. Thanks for clarifying.

    Is it relatively easy to make a multi level game with 2DPC (or with 2DPC legacy in Pro) ? I'm not so good in programming so I'm a bit worried about that. Is there a some good place to put DontDestroyOnLoad and all that stuff which are needed for more levels?
     
    Last edited: Feb 12, 2015
  41. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    All physics in PlatformerPRO is 2D. You can visually use 3D objects but level geometry MUST be 2D.

    The goal for Platformer PRO is that you can build a release quality game without writing a single line of code*. The reality is it probably wont be like that from day one, but it should be pretty close.

    - - - -

    * Of course coders can still delve in to the API and create their own custom stuff (and hopefully share it with others).
     
  42. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    Hi Johnny
    I can't tell by your documentation, but how is the character controlled on iOS/Android/TouchDevice?
    Is it a joystick, or a 'follow the finger' style movement/touchpad?

    & What if you have two characters or more on screen that you want to be able to control - are they selectable?

    Thanks.
     
  43. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    @juicymangoz There is an abstracted input class which you can connect to any concrete input mechanism. Out of the box there is a simple button/joystick touch controller (it is simple but effective, if you have an iOS device you can try it out in my free iOS game Sorlo by Two which is built with 2DPC).

    Also included is a wrapper for Unity Standard Assets Touch control. If you want to use a third-party asset store party package its pretty easy to integrate and I can assist if required.

    If you have multiple characters you can assign inputs as desired (character.input = XXX).
     
    CoCoNutti likes this.
  44. JohnnyA

    JohnnyA

    Joined:
    Apr 9, 2010
    Posts:
    4,990
    CoCoNutti and TheValar like this.
  45. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    Excellent, thanks for the fast response, and I'll check these out. At this stage, we're probably looking at similar controls to what you find in Temple Run, as an example, but will definitely check out Sorlo.

    Cheers
     
  46. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    TheValar likes this.
  47. TheValar

    TheValar

    Joined:
    Nov 12, 2012
    Posts:
    760
    Just to confirm this from a user perspective. In my game (shown just 2 posts above) I was able to assign both characters to the same controls and turn them off individually as needed. Additionally not only did I roll my own touch controls, but I also integrated a third party asset called InControl for controllers, and a few default unity keyboard inputs as well. Was able to get all 3 input systems working together seamlessly very easily with 2DPC :)
     
    CoCoNutti likes this.
  48. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    Thanks for this. I'll check out InControl. I have previously used EasyTouch, but haven't been 100% satisfied with it.
     
  49. CoCoNutti

    CoCoNutti

    Joined:
    Nov 30, 2009
    Posts:
    513
    Downloaded this @TheValar. Love it. Bloody hard though! (But I'm hopeless at twitch-platformers lol)
     
    TheValar likes this.
  50. nitekrawler

    nitekrawler

    Joined:
    Dec 8, 2013
    Posts:
    11
    I finally got on device multiplayer working for my in progress game Pocket Smash. It took forever to make sure that the players controls weren't being confused.



    The game tends to run above 60fps but Recordable is very power hungry on my tablet so I had to film in 1/2 the resolution and the framerate isn't ideal. I'm having some issues with the player 2 analog not showing up so to avoid confusion the visible analog stick is controlling Mario in this video. Hope you guys enjoy.
     
unityunity