Search Unity

[RELEASED] Acrocatic - Highly customizable 2D platforming character

Discussion in 'Assets and Asset Store' started by RobinBrouwer, May 7, 2014.

  1. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Hi there!

    I don't have any experience with mobile in Unity, so I can't really help at the moment. I'll add it to the backlog.

    I guess you'd have to create a game object that acts like an analogue stick / buttons and use it to control the character. There is an asset that does that for you: http://forum.unity3d.com/threads/co...e-virtual-controller-for-unity-mobile.203823/. I hope that helps a bit in the meantime. :)
     
  2. greenrift

    greenrift

    Joined:
    Jun 25, 2014
    Posts:
    6
    Any pointers on camera x/y settings to have the camera follow the player? I attached the CameraFollow script to my camera and set the min/max x/y to 5,-5 respectively (out of ignorance). When moving across the screen, the player and level moves in a choppy fashion...not smooth like in the web demo you have. Any thoughts on this?
     
  3. greenrift

    greenrift

    Joined:
    Jun 25, 2014
    Posts:
    6

    Ok, got this one figured out. Had to play with the x/y smoothing values. The smaller the better in my case.
     
  4. greenrift

    greenrift

    Joined:
    Jun 25, 2014
    Posts:
    6
    New issue: "Out of the box" I can't seem to get wall sticking or climbing working. I have used the pre-built prefabs you have and created a simple player, platform, wall scenario. Whenever the player hits the wall I expect it to stick or climb, however that is not the case. The player just continues the jump animation and never sticks or climb the wall. Again, this is with out of the box settings. It appears as if everything is set up to allow sticking or climbing....unless I"m missing something?
     
  5. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Glad you could resolve the camera issue. Indeed, you should play with the smooth values. I have it set up like this: XMargin = 0, YMargin = 0, XSmooth = 5, YSmooth = 5.

    Did you put the 'Wall' prefab on the wall? And if so: is the layer for this wall 'Walls'? And make sure that you select the correct layer in the PlayerWall class (in the inspector). That should also be 'Walls'. If you did all that, maybe you could send me the example (support@battlebrothers.io), so I can take a look at it.
     
  6. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Finished the two remaining bugs! Movement on fast platforms is working great and you can even create 'icy' moving platforms (took me quite some time to figure that one out...). I'm updating the documentation and I'm adding some extra scenes before submitting it to Unity.

    If you want to try v1.1 right now, please email support@battlebrothers.io with your Invoice ID. I can use that to check if it's a valid purchase. Then I'll email the project. But remember: the documentation isn't up-to-date and there aren't any new scenes. You'll get those when I've submitted it to Unity. If you have any feedback or when you find any bugs: let me know!
     
  7. sirius_002

    sirius_002

    Joined:
    Aug 16, 2012
    Posts:
    65
    I had the same problem at first, just go into the Player child object "sideCheckTop" and set the position x value to 0.5 instead of 0.4, worked for me at least.
     
  8. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Hmm ok, could be it. Version 1.1 has a new feature that sets the sideCheck gameobjects automatically at the side of the boxCollider, so that should fix that. :)
     
  9. sirius_002

    sirius_002

    Joined:
    Aug 16, 2012
    Posts:
    65
    Sounds good, problem prevention is kind of rough when you think about the multitude of ways your kit is being used. An error could easily occur when adding your own characters and levels.
     
    Last edited: Jun 26, 2014
  10. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Yeah, it's a lot different than creating a 'normal' game. You have to think of so many ways the developers will want to use it and try to find a correct solution that fits almost all ways. Sometimes it's hard, but it's a nice challenge. :)
     
  11. greenrift

    greenrift

    Joined:
    Jun 25, 2014
    Posts:
    6
    Yep, that fixed it for me. I have to say this is a great tool! A lot of customization! Thanks for all the hard work!
     
  12. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    You're very welcome! Good luck developing your game. :)
     
  13. BSBalazs

    BSBalazs

    Joined:
    Jul 5, 2013
    Posts:
    8
    I see you are working hard on this pack, and great job!
    But I dont know the c# :/ ok this is my fault.. but...

    Do You think about that make alternative this in .JS ?
     
  14. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Not really sure. It takes quite some time to rewrite all of it. And future code needs to be rewritten as well. I'll think about it and add it to the backlog. C# isn't really hard to learn though. The syntax is a bit different, but if you understand JavaScript, learning C# shouldn't be a problem. :)
     
  15. Lothandor

    Lothandor

    Joined:
    Jul 1, 2014
    Posts:
    4
    Hi, so far I am LOVING the scripts! Money well spent. I am however having a slight problem. For some reason It seems like unity is not registering the grounded state properly on a completely consistent basis. That is my guess at least. I say this because, about ten to twelve percent of the time it will not allow jumping unless a high number of multi-jumps are enabled. Any light you can shed on this issue would be greatly helpful. I am still learning C# so this problem may simply be a novice's incomprehension about something basic in the scripts. Also for some reason the default sprites for the ninja cat mascot seem to consistently download somewhat scrambled.

    As an amusing side note Acrocatics works prodigiously well with 2D Collider-Gen.
     
  16. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Great that you'e loving Acrocatic! The bug you're experiencing is something I've fixed for version 1.1 (which I'm writing the docs for at the moment before submitting). It's because of the line that checks if the player is grounded before resetting the jumps (in the PlayerJump class). That line also checks if the Y velocity is equal to 0 and that causes some issues (especially with slopes). This is the code at the moment:

    Code (CSharp):
    1. if (player.grounded && rigidbody2D.velocity.y == 0) {
    2.   jumps = totalJumps;
    3. }
    You should try and change it to something like this:

    Code (CSharp):
    1. if (!jump && player.grounded) {
    2.   jumps = totalJumps;
    3. }
    That should fix the issue. At least, it did for version 1.1. :)

    Could you explain the issue with the sprites? Is it being downloaded incorrectly from the asset store or is there a different issue?
    And it's great to hear that it works well with 2D Collider-Gen! :)
     
  17. Lothandor

    Lothandor

    Joined:
    Jul 1, 2014
    Posts:
    4
    The code fix worked beautifully. Thank you for the help, and also for the swift response! I am definitely looking forward to the update.

    As for the sprite sheets the files themselves checked out fine in photo shop. Unity's engion seems to have some problem with them. It happened to me when I loaded up the web demo as well. I cannot find any issues with the files themselves. It seems to be some issue with how Unity is distributing them.

    P.S. The new script works fabulously on slopes and odd terrain. I will have to make some animated terrain to see how it handles it. Thanks again!
     
  18. Lothandor

    Lothandor

    Joined:
    Jul 1, 2014
    Posts:
    4
    Hi I found out what was wrong with the textures. They were compressed by unity for the download. If anyone else runs into the graphics glitch just change the compression to 16bit or truecolor that fixes the issue. Also random question. Do you have any plans for making a script to allow walking/crawling on ceilings? Also keep up the good work! I am looking forward to the update. No rush though.
     
  19. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Ok, great that you figured it out. I'll add it to the FAQ!
    Yep! It's on my backlog. Along with normal climbing on vertical walls (instead of wall running and jumping).
     
  20. kilik128

    kilik128

    Joined:
    Jul 15, 2013
    Posts:
    909
    I'll try to fix the rotating issue for version 1.1. The issue where you couldn't jump should be fixed in version 1.1. It's because there is a check on the player's velocity before it's considered grounded (and you can only jump when you're grounded). It checks if the Y velocity is equal to 0, but that doesn't work on bouncy materials (and moving platforms as I figured out when creating that feature). You can delete that part in the code yourself. I believe it's in the Player script.

    how my god ! to mutch fight for thats !

    ok i can now finish my game it's will be realse tomorow


    i suggest add sound and special effect
     
  21. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Looking good! It's great to see Acrocatic being used in a project. :)
     
  22. Lothandor

    Lothandor

    Joined:
    Jul 1, 2014
    Posts:
    4
    Huzzah! I am looking forward to it. As a side note, with carful placement some truly spectacular vertical rail segments can be made by angling wall colliders into fluid slopes. I ended up experimenting with that for far to long for it to really be any kind of actual production work. It was simply a blast to see what it does with the physics. Thanks again for a great product. I am going to have to make an actual, proper review soon.
     
  23. joubqa

    joubqa

    Joined:
    Jul 8, 2014
    Posts:
    13
    Looks great!
    Are you going too add enemies, melee and shooting any time soon?
     
  24. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Enemies and melee attacks will probably be in v1.3. Maybe shooting will be in v1.4. I'm submitting version 1.1 this weekend, so it will take some months before those versions are released.
     
  25. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    YEAH! Version 1.1 has just been submitted to the Asset Store! So it will probably be available for download next week. Check out the changes: http://battlebrothers.io/acrocatic/#v1.1.

    Want to try version 1.1 right now? Send an email to support@battlebrothers.io with your Acrocatic invoice ID. I'll send you a ZIP file containing version 1.1.

    Now I'll just have to create a video for version 1.1. :)
     
    Lothandor likes this.
  26. meapps

    meapps

    Joined:
    May 21, 2013
    Posts:
    167
    Great will check it out soon;)
     
  27. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Created the video for version 1.1! Be sure to check it out. :)



    Also, the website received a little update. The new documentation is also available.
    http://battlebrothers.io/acrocatic/
     
  28. joubqa

    joubqa

    Joined:
    Jul 8, 2014
    Posts:
    13
    Well, you sold me on it with v1.1 :)
     
  29. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Great! Enjoy. :)
     
  30. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    It seems version 1.1 has just been released to the Unity Asset Store! It's also in the 'A few favorites' section on the frontpage. :)
     
  31. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    Now that version 1.1 is officially released, I started work on version 1.2. I've already completed the 'jumping through platforms' feature. Check out this preview video!

     
  32. meapps

    meapps

    Joined:
    May 21, 2013
    Posts:
    167
    Awesome finally. now i can finish most stuff of my game. Still missing the rope;)
     
  33. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    GREAT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    6R
     
  34. jpatinop80

    jpatinop80

    Joined:
    Jul 29, 2012
    Posts:
    55
    Hi nice work, I´m very interested in buy the project but I need for mobile games, I´m not worried about control, more in performance, do you think is compatible with mobile platforms iOS Android? would be excellent the cat movements could be with gyroscope and tap for jump... let me know.. thanks!!!
     
  35. RobinBrouwer

    RobinBrouwer

    Joined:
    Dec 9, 2013
    Posts:
    114
    I haven't tested it, so I'm not sure. I also don't have an Android phone, so can't test it on that at the moment. Optimising for mobile is already in the backlog, so it'll be in an upcoming version.
     
  36. meapps

    meapps

    Joined:
    May 21, 2013
    Posts:
    167
    i have both android and iOS ( also a S5). i will test it soon;)
     
  37. Elzean

    Elzean

    Joined:
    Nov 25, 2011
    Posts:
    584
    The Direction enum on top of your player class is conflicting with several Direction enum in NGUI (but they are not declared globaly). so i change yours to AcrocaticDirection.

    Just though you should know, NGUI being popular.
     
  38. joubqa

    joubqa

    Joined:
    Jul 8, 2014
    Posts:
    13
    was scene1 supposed to work out of the box? as it is it gives:
    NullReferenceException: Object reference not set to an instance of an object
    Player.OnPlatform () (at Assets/Scripts/Player/Player.cs:332)
    Player.Update () (at Assets/Scripts/Player/Player.cs:146)
     
  39. jannera

    jannera

    Joined:
    Jul 11, 2014
    Posts:
    1
    Hello and thanks for this asset, it's really nice for a beginner like me. Saves a lot of time.

    However, as it often is with existing code, sometimes it doesn't fit your purposes completely as is.

    So it would be nice if you'd refactor the code into smaller pieces which could be overwritten in deriving classes. If I do code changes directly to Acrocatic codes and then there is a new version, I would lose the changes.

    At the moment what I have made into the base classes and overwritten in derived class has been touch controls. For example in PlayerJump I have moved Input.GetButton("Jump") into its own method
    protected virtual bool IsJumpInput()
    {
    return Input.GetButton("Jump");
    }
    which I derive in my class PlayerJumpTouch and add my custom touch input checks. In general, would it be harmful if pretty much each of the methods or members would be virtual instead of non-virtual as everyone might have their one special need which doesn't come out of the box.
     
  40. Mr Greebone

    Mr Greebone

    Joined:
    Jul 24, 2014
    Posts:
    53
    hello, first off Acrocatic is exactly the kind of asset ive been looking for for quite some time however i have a few questions about the control inputs, im quite new to coding in general so i wondered what was the best and easiest method for changing the movement, sprinting and jumping controls, the readme file attached to the asset contained some useful info and said "The input used inside Acrocatic isn't the default one. We added Dash, Run and Crouch inputs and changed some other variables. Be sure to check it out to see what the controls are." now this may be me being inexperienced with unity but i couldn't seem to find an input folder or script in the asset.

    Anyways i was wondering if anyone could help me with this, I know there are a few scenes preloaded onto the asset which allow me to run and jump but im wondering how i can change it so jump is maybe ctrl or something instead of space, or how to make the original prefab jump with space to begin with as it seems to only be able to run and has no animations, do i have to physically go through the script or is there just an option to change inputs somewhere, also if anyone has any useful tutorials it would be much appreciated.

    thanks
     
  41. sirius_002

    sirius_002

    Joined:
    Aug 16, 2012
    Posts:
    65
  42. Mr Greebone

    Mr Greebone

    Joined:
    Jul 24, 2014
    Posts:
    53
    Thanks Sirius_002, ive managed to build a basic level using the character prefab and assigning sprites wall and ground layers, the ice works just fine however im having trouble with the sinking/moving platforms, ive tried setting up all the scripts the same in the scene 1.1 platforms on a new scene but every time i try to play the level it just says "object reference not set to instance of an object", it does this if i try and make one and attach the scripts and also just load the platform from the prefabs folder, its also doing the same thing with ladders and the death zone, i must be missing something somewhere but i cant seem to figure it out, anyone else have any issues?
    acrocatic 01.png
     
  43. Nicrom

    Nicrom

    Joined:
    Nov 17, 2013
    Posts:
    421
    Another great function would be the ability to push and pull objects like boxes.
     
  44. Nicrom

    Nicrom

    Joined:
    Nov 17, 2013
    Posts:
    421
    Have you added the script Game Settings to an Empty Object, because from what I can see, this is most likely the reason for the Error?
     
  45. nluckett

    nluckett

    Joined:
    Jul 30, 2014
    Posts:
    14
    Hi, I was wondering if this extension is still being worked on? Loving playing around with it.

    A couple questions... how can I make it so that the player stands on the top of the ladder? Or a ladder that ends up at a new higher floor for the character to move to?

    Also, any plan for ledge hanging?
     
  46. nluckett

    nluckett

    Joined:
    Jul 30, 2014
    Posts:
    14
    Me again. I love this tool and have been playing with it. I found your latest video (for my question above) on your youtube channel and cant wait for the new features.

    Anyway, figured it would be better to ask technical questions in here than keep bugging you on the youtube page. This is probably a very basic question, but how can I add Acrocatic to an existing scene?

    I have another project Im working on and would like to use Acrocratic inside of that one to control my character. I know how to start a new project and open an Acrocratic scene and start editing and playing from there, but Im not sure what all needs to be brought into (or exactly how to bring it in) an existing scene.
     
  47. Nicrom

    Nicrom

    Joined:
    Nov 17, 2013
    Posts:
    421
    The simplest way would be to place the Acrocatic Character Prefab in your scene, break the prefab instance and replace the sprites that form the animations with your own.
     
  48. sirius_002

    sirius_002

    Joined:
    Aug 16, 2012
    Posts:
    65
    Yeah it's still being worked on, the guy is probably just on vacation.
     
  49. Mr Greebone

    Mr Greebone

    Joined:
    Jul 24, 2014
    Posts:
    53
    Ah great that seems to have fixed the problem, thanks a lot, i can now at least put platforms down though the sinking platforms still crash the game when you touch them, i get this error message on the console

    error message 2.png
    on an unrelated note i had a question on game mechanics, is it possible to make it so the character can slide down certain walls and run up others, see i wanted to split them up rather than having the player character able to do everything all at once and instead have certain surfaces which would allow him to either slide or climb, any ideas?
     
  50. Nicrom

    Nicrom

    Joined:
    Nov 17, 2013
    Posts:
    421
    You did not add the Script, Camera Shake to your Camera, that's why you get this error.
     
    Last edited: Jul 31, 2014