Our chubby cat in a ninja suit has some sick moves he's gonna show you!
Version 1.2.1 of Acrocatic has been released to the Unity Asset Store. It is the last version of Acrocatic. Support has been stopped. Check out the forum thread for more information.
With this Unity asset you can create your own highly customizable (and acrobatic) 2D platforming character. Obviously, we made a chubby cat in a ninja suit! You can walk, run, jump, double jump, wall run/slide/jump, crouch, dash, climb ladders, stand on moving platforms and much more. Customize it to your own liking by simply changing the variables in the inspector—or by diving into the code yourself. Purrrfect for developers who are exploring Unity.
With Acrocatic you can create your own uniquely controlled character by simply changing some values. So, you want your character to do a triple jump? No problem! Need some infinite wall running action? Sure! Want 'press to run' functionality? Well, OK! This asset allows you to add these mechanics in no-time at all.
Acrocatic uses the built-in physics and sprite system in Unity.
We actually started Acrocatic when Robin was learning how to use Unity's new 2D features. He wanted to test out different things and eventually made a rather complex 2D platforming character. We decided to keep working on this character and turn it into something others could use to learn Unity's 2D features and to eventually create their own games. Acrocatic is the result and we're continuing development to make it even better!
Can I add my own sprites?
Yes you can! Acrocatic features some sprites for a simple cat character. You can easily overwrite these sprites to add your own sprites. Make sure the character is facing the right way and you create the correct slices for your sprite. After that you can change the animation for that sprite, so it fits your needs. There’s an animation controller that handles all these animations, so you probably don’t have to work with that if you simply change the animations themselves. There's also a PlayerHitbox class that allows you to easily set the character's hitbox, so it fits your sprite.
Does it support slopes?
It has some support for slopes. You can add collisions to your scene by dragging simple prefabs onto it. When you use the normal 'platform' prefab and you rotate it a bit, the player character will take the platform's rotation when he stands on it.
How can I make the charachter's movement as tight and responsive as possible?
Acrocatic is physics based, so making the movement feel very tight (speed up instantly, stop instantly and make the jump feel less 'floaty') is quite hard to accomplish. There are several things you can do to achieve your desired results. You can play around with the physics material's friction, the player's friction, linear drag and gravity scale AND you can play around with the 'Move Force' and 'Jump Force' values. It takes quite some tinkering to make it feel just right for your game, but you can make your character feel very tight and responsive by playing around with those values. Good luck!
The sprites aren't being shown correctly. What could be the problem?
It appears Unity compresses the sprites on download. User Lothandor found out how to fix the problem: change the compression to 16bit or truecolor. Check out his forum post.
Support for Acrocatic has been stopped. Check out the forum thread for more information.
Fixed a bug when flipping the character.
Fixed a bug with the keepVelocityOnGround feature.
Added triggers for wall sliding and wall jumping.
Unity 5 support.
Namespace for all Acrocatic related scripts.
Jumping through platforms (both up and down).
Platforms can be rotated as well (wasn't possible in 1.1).
Platforms can have several scripts attached. For example: moving and jumping through on the same platform.
Added option to not rotate a player on a slope.
Added option to disable scripts on death.
Added wait at waypoint variable for moving platforms.
Added experimental feature to ignore friction when hitting the ground.
Added horizontal ladder movement (+ animation).
Added ability to stand on top of a ladder.
Added ladder and fence prefabs.
Added feature to reset sinking platform's position after falling.
Added a bouncy platform. Really basic at the moment.
Refactored some code and renamed some stuff.
Fixed several bugs that have been reported.
Added wall jumping while moving in the same direction as the current wall. Called it 'boomerang wall jumping'.
Added ladder climbing functionality. Allows your character to move in all directions on a ladder (or you can disable certain directions).
Added moving platforms. Moving platforms allow you to set waypoints and determine the speed of the platform. There is also an option to only move the platform when the player is on the platform.
Added sinking platforms. Sinking platforms fall down when the player stands on them. The timer is adjustable.
Added screen shaking. This feature is used for sinking platforms.
Added a PlayerComplex and PlayerBasic prefab.
Added option to jump higher when holding down the jump button.
Added option to change the amount of movement while in the air.
Added option to change the speed of the character while in the air.
Added option to disable changing from walking to running while in the air.
Added option to specify which direction the character is facing, so you can easily add sprites that face in a different direction.
Added option to enable or disable double jumping after wall jumping.
Added an ice platform prefab with a lower friction. The physics material for this prefab also works on moving and sinking platforms!
Added a new sprite for wall sliding. Also changed the wall running and wall jumping sprites to add claws to our lovely cat.
Added a new sprite for ladder climbing.
Added three new scenes showcasing what you can do with Acrocatic. There even is an ice scene! The default scene has been changed as well.
Added a background to all scenes with a bit of a parallax effect.
Added a fish at the end of each scene. It does nothing, so you should just imagine the cat eating it. ;)
Added decorator drawers for tooltips and headers inside the inspector. It's a Unity 4.5 thing.
Fixed several collision issues where the player got stuck to edges.
Fixed an issue where interaction with the wall failing because of the sideCheck object's positon. The sideCheckTop and sideCheckBottom objects are now created dynamically and positioned according to the character's boxCollider.
Fixed a bug that triggered the crouched movement animation even when crouched movement was disabled.
Changed some values for the animator that caused small issues.
Changed the 'h' variable to a public variable inside the Player class.
Changed the default wallStickVelocity to 0. Also made sure the player's gravity scale is set to 0 while interacting with a wall.
Renamed canWallJump, canWallSlide and canWallRun to 'enabled'.
Removed the 'Use Force' option for the player's running. This is now enabled by default. Setting the velocity directly didn't work correctly for several new features added to Acrocatic. Another reason is because the physics materials were being ignored when it was disabled.
All folders for Acrocatic are now inside an Acrocatic folder. A highly requested change.
Made sure icy moving platforms also work as expected. Took quite some time, so we hope you like it!
Used some Unity 4.5 specific features, so it should only work on Unity 4.5 and higher.
Initial release. Includes walking, running, jumping, double jumping, dashing, crouching, sliding, wall running, wall sliding, wall jumping and much more!
It should just work right off the bat when you download and install Acrocatic from the Unity Asset Store. Granted you're using Unity 4.5 or higher! If it doesn't work or you have any questions, feel free to e-mail us at firstname.lastname@example.org or submit a post in the forum thread.
Want to try out Acrocatic? Click here to check out a few demo's we made using Acrocatic. Want to know how to use Acrocatic? Be sure to read the documentation below or watch these YouTube videos.
There are several scripts included in Acrocatic. These are located under Assets/Acrocatic/Scripts. You can customize the variables in Unity or you can dive into the code yourself to create your own unique character. All scripts are written in C# and are heavily commented.
The player scripts (located in the Player subdirectory) are the most important scripts. These handle character movement, jumping, wall running, wall sliding, wall jumping and much more. It allows you to define a lot of different options to create your own uniquely controlled character. You can easily enable or disable scripts to add or remove mechanics.
This is the player's base class. This class is used to communicate between all the other classes. There are a few public variables you can change in the inspector.
Sprite Direction determines in which direction the sprites are facing. This allows you to use sprites that face left OR right.
Platform Layer determines which layer should be considered as a platform the player can interact with. This is the Platforms layer by default.
Ground Layer determines which layer should be considered as the ground the player can stand on. This is the Ground layer by default.
Ground Radius determines the radius of the circle created at the feet of the player (the groundCheck object) to see if the player is grounded. When something on the Ground Layer overlaps with this circle, the player is considered grounded.
This class is used to set the hitbox for different states. By default Acrocatic has a default, crouching and jumping hitbox. These hitboxes are simple box colliders. Change these values based on the sprites you're using for your game. You can also change the circle collider if you want to. Check out the script to see how you can achieve this.
When the hitboxes have different widths, you have to change a few extra things. In the PlayerHitbox class, a few lines of code are commented out that handle changing hitbox widths. Make sure you activate this code when the hitboxes you use have different widths.
This class handles all crouching and sliding. You can even add 'air sliding'!
Allow Movement determines if the player can move during a crouch. Enabling this will allow the player to move around while crouching.
Crouch Speed sets the speed while moving during a crouch. This is only used when Allow Movement is set to true.
Allow Running Slide determines if the player should slide when running and pressing the Crouch input. Sliding is like a dash in crouch position with a different animation.
Allow Crouched Slide determines if the player is allowed to slide while standing still or moving in crouch position. The player has to press the Dash input while in crouch position to activate this slide.
Allow Air Slide determines if the player can perform a slide while in the air. This slide can also have a downwards force, allowing the player to get to the ground as quickly as possible.
Slide Force is the X force for the slide. The higher the force, the faster the player slides.
Slide Time is the duration (in seconds) of the slide.
Cooldown Time is the time (in seconds) it takes for the player to slide again. Set this to 0 if you want the player to slide immediately after a slide.
Air Slide Force is a Vector2 that allows you to set the X and Y slide force while in the air. This overrides the Slide Force variable.
This class is used for the Dash mechanic. You can enable or disable this class to allow or disallow dashing.
Dash Force is the X force for the dash. The higher the force, the faster the player dashes.
Dash Time is the duration (in seconds) of the dash.
Cooldown Time is the time (in seconds) it takes for the player to dash again. Set this to 0 if you want the player to dash immediately after a dash.
Dash Gravity determines if the player should be affected by gravity while dashing. When this is set to false, the Dash Y Velocity will be used for the player's Y velocity during a dash.
Dash Y Velocity is used when Dash Gravity is false. It sets the player's Y velocity while dashing. Its default value is 0.4. This is needed to make sure the player isn't slowly moving downwards.
Air Dash determines if dashing is allowed while in the air.
Air Dash Limit can be used to set a limit to the amount of air dashing. Only want the player to dash in the air twice? Set this value to true and the Air Dash Total variable to 2.
Air Dash Total is used to set the total air dashes when Air Dash Limit is set to true. Setting this to 1 will only allow 1 air dash.
This class handles all player jumping. It also allows the player to double jump and gives control over how this double jump is handled.
Jump Type determines what kind of jump the player should perform. There are two options: Single Press to Jump and Hold to Jump Higher. Different variables will be used depending on this variable.
Single Press to Jump - Jump Force is the Y force that should be added to the player when he's jumping.
Single Press to Jump - Double Jump Force is used instead of Jump Force when the player is trying to perform a double jump. You can use the same value, but also change it to suit your needs.
Hold to Jump Higher - Initial Jump is the initial jump's Y velocity change. This is used when the player starts pressing the jump button.
Hold to Jump Higher - Initial Double Jump is the same as above, but for a double jump.
Hold to Jump Higher - Jump Time is the duration for the jump. The player can hold down the jump button during this duration to apply the jump force.
Hold to Jump Higher - Jump Force is the force applied to the player while holding down the jump button, allowing the player to jump higher when holding down the jump button.
Hold to Jump Higher - Double Jump Force is the same as above, but for a double jump.
Total Jumps allows you to set the total amount of jumps the player can do in the air. When you want the player to perform several jumps in the air, make sure this value is higher than 1. Don't want any double jumping? Set this value to 1. If you want, you can even set this value to 999! When the player hits the ground or interacts with a wall, the total jumps allowed is reset and the jumping can start all over again.
Jump Window is used to determine if there's a double jumping window. Only want to allow a double jump when the current jump is at its peak? Simply set this variable to true and change the values below. When you set this value to false, the player can double jump at any time while in the air (and allowed to double jump of course).
Jump Window Min and Max are used to set the Jump Window. These correspond to the Y velocity of the player, so make sure you set the values appropriately.
Change Factor is used to determine how much the player is allowed to change course while in the air. Setting this to a low value will make sure the player isn't really able to change the course of the jump. Setting this to a higher value will allow you faster control over air movement.
Speed Factor is used to change the player's speed while in the air. Setting this to a lower value will slow down the player while in the air. A higher value will make air movement faster than ground movement.
Walk and Run gives you control over walking and running in the air. Disabling this makes sure the player isn't able to change between those states while in the air. So when you start a jump while walking, you can't suddenly get the sprinting speed when pressing the sprint button.
Reset on Wall resets the above behaviour when interacting with a wall. So you can 'walk-jump' on a wall and then 'sprint-jump' from the wall.
This class handles the player's normal movement: walking and running. You can change the following variables in the inspector.
Press To Run is a boolean. Set this to true if you want the player to walk by default and require a button press to run (the Run input). If this is false, the player runs by default.
Walk Speed is used to set the player's maximum walking speed. The higher the speed, the faster the player moves. This variable is only used when Press To Run is set to true.
Run Speed is the same as Walk Speed, but is used for the player's maximum running speed. When Press To Run is false, this speed will be used. When Press To Run is true, this speed will only be used if the player holds down the Run input.
Move Force determines the amount of X force that should be added to the character. The Walk and Run Speed variables are used to make sure the player isn't moving faster than the maximum speed.
This class handles all the wall sticking, running, sliding and jumping.
Wall Layer is used to select the layer for the wall colliders. Colliding with these walls will allow the player to interact with them.
Should Fall is used to determine if the player should fall down when wall interaction failed or has completed. For example: when wall jumping fails (the player is too slow) you can make sure the player can't interact with a wall again by setting this to true. A different animation will be shown and the player simply falls down and isn't able to jump, dash or interact with walls.
Jump To Stick can be set to true to only allow wall interaction while in the air. You can also set this to false if you want the player to run up a wall while on the ground.
Wall Unstick Time is the time (in seconds) allowed between sticking to the wall and trying to wall jump. Wall jumping can be achieved by moving in the opposite direction and then pressing the Jump input. However, the time between being stuck to the wall and moving in the opposite direction is variable. This timer starts running when the player stops moving in the direction of the wall he's facing. This timer is used to make sure the player doesn't fall down when trying to wall jump. When the value is 0.1, it will take 0.1 seconds before the player falls down when the player isn't moving in the direction of the wall. So the player has 0.1 seconds to move to the opposite direction. If the player is successful and wall jumping is enabled, another timer will take over: Wall Stick Time (see below).
Wall Jump - Enabled determines if wall jumping is enabled. Wall jumping can be achieved by moving in the opposite direction of the wall you're facing.
Wall Jump - Wall Stick Time is used to determine how long (in seconds) the player sticks to the wall when trying to wall jump (so after the player moves in the opposite direction). Pressing the Jump input will trigger the wall jump. The higher this value, the easier it is for the player to perform a wall jump.
Wall Jump - Wall Stick Velocity is used to make sure the player stays at the same position while being stuck to the wall. You can also make the player move downwards by giving this a negative value.
Wall Jump - Allow Double Jump determines if a double jump is allowed after wall jumping.
Wall Jump - Boomerang Jump determines if boomerang wall jumping is enabled or disabled. Boomerang wall jumping can be achieved by moving in the samen direction as the curreny wall you're facing and then pressing the jump button. It moves the player away from the wall and makes him come back. You can cancel the boomerang wall jump by simply changing direction while in the air.
Wall Jump - Boomerang Time is the duration for moving in the opposite direction. Setting this to a higher value will make the player move more away from the wall before coming back.
Wall Jump - Boomerang Factor X allows you to change the player's X movement speed while performing the boomerang wall jump.
Wall Jump - Boomerang Factor Y allows you to change the player's Y movement speed while performing the boomerang wall jump.
Wall Jump - Allow Same Wall can be set to true if you want the player to wall jump on the same wall. If you don't want this you can set this to false. Acrocatic remembers the instance ID of each wall you're interacting with and on which side you've interacted with it. This data is used to determine if you're interacting with the same wall or not.
Wall Run - Enabled determines if wall running is enabled. Wall running can be achieved by simply running against a wall.
Wall Run - Run Time is the duration (in seconds) of the wall run. You can set this as high as you want.
Wall Run - Run Speed is the speed while wall running.
Wall Run - Infinite Run can be activated to allow infinite wall running. The Run Time will be ignored.
Wall Run - Run Slowdown can be activated to make the player automatically slow down while wall running. The Run Speed will be lowered based on the Run Time. This option will not work in combination with Infinite Run.
Wall Run - Allow Same Wall can be set to true if you want the player to wall run on the same wall. If you don't want this you can set this to false. Acrocatic remembers the instance ID of each wall you're interacting with and on which side you've interacted with it. This data is used to determine if you're interacting with the same wall or not.
Wall Slide - Enabled determines if wall sliding is enabled. Wall sliding starts after wall running or after making contact with the wall when wall running is turned off.
Wall Slide - Slide Time is the time (in seconds) it takes for the player to slide down. When the timer is finished, the player will fall down (based on the Should Fall variable).
Wall Slide - Slide Speed is the speed while wall sliding.
Wall Slide - Infinite Slide can be activated to allow infinite wall sliding. The Slide Time will be ignored.
Wall Slide - Slide Speedup can be activated to make the player automatically speed up while wall sliding. The Slide Speed will be increased based on the Run Time. This option also works with Infinite Slide.
Wall Slide - Allow Same Wall can be set to true if you want the player to wall slide on the same wall. If you don't want this you can set this to false. Acrocatic remembers the instance ID of each wall you're interacting with and on which side you've interacted with it. This data is used to determine if you're interacting with the same wall or not.
This class handles the player's interaction with platforms.
Moving Platform - Stick To X allows you to make the player stuck to the X velocity of the moving platform. So you don't fall off when the platform is changing direction.
Moving Platform - Stick To Y allows you to make the player stuck to the Y velocity of the moving platform. So you don't fall off when the platform is changing direction.
Moving Platform - Use Friction determines if the player should use the moving platform's friction. Enabling this allows you to use icy platforms.
Moving Platform - Keep Speed On Jump determines if the player should keep the X speed of the moving platform when jumping.
Sinking Platform - Shake Camera allows you to enable or disable camera shaking when the player interacts with a sinking platform.
This class handles the player's interaction with ladders.
Ladder Layer sets the layer that should be used for ladders. The default layer is called Ladders.
Snap Speed sets the snapping speed when snapping to the middle of the ladder is enabled.
Climbing Speed Up sets the player's speed when moving up the ladder.
Climbing Speed Down sets the player's speed when moving down the ladder.
Climbing Speed Left sets the player's speed when moving to the left on the ladder.
Climbing Speed Right sets the player's speed when moving to the right on the ladder.
The platform scripts are located in the Platforms subdirectory. They control everything related to platforms.
This class handles the platform's basic functionality.
Platform Type determines what kind of platform the player is interacting with.
This class handles the moving platform's functionality.
Speed sets the platform's speed.
Stop makes the platform stop when enabled.
Move On Hit makes the platform move when the player stands on it and stop when the player isn't standing on it.
Loop makes the platform loop through all the waypoints. So when the platform is at the last waypoint, the platform will move towards the very first waypoint. If this is disabled, the platform will move backwards and move to the previous waypoint.
Move Forward determines how the platform should move through all the waypoints. If this is enabled, the player is moving from one waypoint to the next. When this is disabled, the platform will move through the waypoints backwards.
Current Index allows you to set a starting waypoint index for the platform.
Stop After Total determines after how many waypoints the platform should stop moving. When there are two waypoints and you set this value to 2, the platform will stop at the second waypoint.
Waypoints is an array containing all the waypoint game objects. The order of the array is important, because it's used to determine the next waypoint the platform should move towards.
This class handles the sinking platform's functionality.
Sink On Hit determines if the platform should sink when the player stands on it. A timer will run to determine when the platform should sink.
Stop Timer When Gone stops the timer when the player leaves the platform. So the platform will only sink when the player is standing on it.
Reset Timer When Gone does the same thing, but resets the timer.
Time sets the duration of the timer. Setting this to 0 will make the platform sink instantly.
Shake Time sets the duration for the camera shake.
Shake Amount sets the shake's intensity.
In the Scripts directory there is a subdirectory for all 'General' scripts. These are used by Acrocatic to make sure everything works purrrfect!
This is the same script used in the 2D platforming example created by Unity. This is used to follow the player around with some smoothing. It is attached to the camera, so you can change it to your own liking.
This script handles death. Currently it's attached to the Death prefab. This prefab is a trigger and restarts the game after 1 second when the player collides with it.
This is a general singleton class used for all global game settings. You can add settings to this class yourself. This class can be easily called from inside other classes (check out ShowCollider for how it's done). There is an empty Settings object inside Scene1 with this script attached. You can easily change the variables in the inspector.
This class is added to all Collider prefabs. It uses the showColliders variable inside GameSettings to determine if the sprites for these prefabs should be loaded.
This class is added to the Camera. It allows you to shake the camera at will for a specific duration and amount.
This class is used to determine how the ladder works. You can make the player snap to the middle of the ladder and allow jumping or double jumping from the ladder. It's also possible to set a default X or Y speed for the ladder and disable movement in certain directions. Another great feature is the ability to enable or disable falling off the ladder from all directions. So you can make sure the player can't fall off when moving to the left.
Acrocatic includes an animator for the player. This animator uses several parameters to show the correct animation. The animator uses several simple sprites and animations to showcase the movement. You should load your own sprites into these animations to customize it to your own liking. All animations are located under Assets/Acrocatic/Animations. Check out the animator to see how animations are called.
There are several prefabs in Acrocatic you can use to create your levels. These are located under Assets/Acrocatic/Prefabs.
First of all you have the Player prefabs. These prefabs include a player character with the Player scripts inside Acrocatic. There is a PlayerComplex and a PlayerBasic prefab. The complex one has all scripts enabled. The basic one only has a few basic scripts enabled. Make sure you use these prefabs and customize it to your own liking.
The Player prefabs also include a groundCheck object that determines where the feet of the player are located. This is used to check if the player is grounded.
In the Prefabs directory, there's a subdirectory called 'Colliders'. In this directory there are several prefabs that can help you create the colliders you need for your scene.
This is the most important collider you can use to create all platforms in your game. Add the prefab to your scene and change the scale and position to fit your needs. The player character uses these colliders to walk around the level.
This works the same as the Platform prefab, but uses a physics material with a lower friction, simulating ice.
Need a wall inside your game? You're at the right place with the Wall prefab! This prefab is used to determine all walls inside your scene. The player character can use these walls to wall run, wall slide and wall jump. Don't want that? Use the Side prefab!
This is the same prefab as the Wall, but without wall interaction. This wall has very low friction, so the player just slides off it. Very useful when you need walls that can't be interacted with.
This is a prefab you can use to create a ladder. It uses the Ladder script to determine how the ladder should work.
This is a trigger used to let the player die and restart the level. You can customize what happens when the player dies in the Death script.
In the Prefabs directory, there's a subdirectory called 'Platforms'. The moving and sinking platforms are located in this directory.
This is a normal platform. Nothing special about it.
This is a moving platform. It has several game objects as children of the object. The Platform child has the PlatformMove script attached to it. Colliders are in a seperate child called Colliders.
This is a sinking platform. The PlatformSink script is attached to the object directly. Colliders are also inside a seperate child called Colliders.
There is also a waypoint prefab. You can use this prefab to add waypoints for your moving platforms.
These are used inside the scripts to determine what kind of collider the player is interacting with. So make sure you don't delete them! You have four layers: Ground, Walls, Platforms and Ladders. When you add new colliders, you have to make sure you add them to the right Layer (or you create a new one).
These layers are for sorting the 2D sprites. Acrocatic has the following Sorting Layers by default:
Be sure to add your objects to the right sorting layer.
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.