Make A 2D 2-Player Platformer Game With Unity 4.3

This tutorial will show you how to make a 2D 2-player capture the flag platformer game using the new 2D sprite tools and 2D physics that were recently added in Unity 4.3.

If the game in this tutorial looks familiar it’s because I showed you how to make this same game last year using a 3rd party sprite manager plugin to handle the sprite display and animation. This time I’m going to show you how to make the game using Unity’s brand new built-in 2D tools.

In This Tutorial

  • Create animated and static sprites using the new 2D sprite tools
  • How to use the new Physics 2D components
  • Connect animation states in Mecanim
  • Basic principles of level design and placing objects in the editor
  • Lots of Unity tips and tricks
  • Project files are included (download link is below)

Before You Begin

The Video Tutorial

Here’s a look at how the completed project will look inside Unity:
Rocket5 2D Game - editor screenshot

Show Your Support
If you found this tutorial useful, please show your support by checking out some of our games and apps (links are on the sidebar) and by following us on Twitter and Facebook.

And if you have any questions or need some help, please be sure to add a comment.

29 thoughts on “Make A 2D 2-Player Platformer Game With Unity 4.3

  1. Mihai Scurtu

    Hi! I tried doing this tutorial but I got stuck at a pretty elementary issue.

    Around 8:20 you create an animation out of 3 sprites, and it shows up in the Animation tab. For me the Animation tab is always greyed out. After I create the blank fall animation I can’t open it, the way you do in the video.

    Here is what it looks like:

    I googled this issue and couldn’t find any fixes.

    Any advice?

    PS I have Unity 4.3.4f

  2. Pietro Polsinelli

    This is tricky. You need to have an instance of your object selected in the scene in order to activate the animation tab. From the tab you cannot directly reopen and existing animations – its a misleading UI. In the case of a prefab, you have to drag an instance inside the scene to edit the animation – it will be changed globally for the prefab anyway.

  3. Mihai Scurtu

    Oh my god I can’t believe it, this was it!! You can’t imagine how much I banged my head against this! I’ve literally had 50 tabs open at some point trying to fix it. You are a gentleman and a scholar!

  4. Pingback: SkillSwap: Making A 2 Player 2D Game With Unity | Rocket 5 Studios

  5. Matt Duffield

    Hi, great tutorial. I tried testing this on my iPad and iPhone and the screens didn’t match. It would be awesome, if you could show a tutorial on making this game work across devices where each device sees the exact same content.

  6. Wind Cheong

    Hi, I got a problem…>,< Firstly, the control key "S" doesn't work for player1, he can't throw the ball. And then, when I press the "arrowkey Down" player1 throw his ball but arrowkey Down is for player2. Finally, when i press the arrowkey UP, both player1 and player2 jump! =.="???? what's wrong ? I didn't change anything in codes.

  7. Patrick Böhm

    Hi, i got a problem. I’m a real beginner with Unity and I follower your tutorial till ~20:33, saved and closed it because I hadn’t more time. But when i open it again I can not drag the sprites in the scene editor with the mouse, only with Inspector -> Transform, but there it does not snap to the grid. How can i turn on mouse dragging again?

  8. Shamil


    I really need your help, guys…

    I am not sure if it is a glitch of Unity3D, but after I have done all animations and attached “Player1” and “CharacterAnims” and other stuff to the player, I play it. However it constantly shows that it “Falls”, it barely changes to “walk” or “idle”, sometimes it does. Plus in the upper tab “Play, Pause, Fast Forward”, “Play and Pause” buttons are always clicked and I have to click (to make it unclicked) “Pause” button so it actually works. And it becomes “clicked” again and it gets stuck…

    Any help? I guess it is a glitch of ground…

  9. Shamil

    Nope, everything was fine. I realized it was a glitch of unity. I have removed optional groundmask from Raycast, and then I added it back and it worked… I dunno why it happened…

    So, everything is fine now. Should I delete my comment?

  10. Pingback: Top 5 Unity 3d Tutorial sites | VGMZ

  11. wut

    Dear god I’m missing something obvious here. My sprite falls in the fall anim, but when he lands he stays like that and using w,a,s,d, does thing to change his animation. He moves left and right and can jump twice before he can’t jump anymore. Any ideas?

  12. sumiguchi

    Turn on the 2D mode for your Scene View. Hold the command key to snap to the grid.

  13. pickaname

    The character can only ever jump twice and then never jump again. And yes i have set the ground textures to the “Ground” layer.

  14. Jin

    Hi is this a true android/ios project ? as most tutroils online are web based and are not true mobile ?

  15. Tim Miller

    It’s designed to be a desktop game with 2 – 4 players so it would be hard to make it work on a mobile device. Not impossible tho.

  16. benjamin

    it all worked, but i want to add a animation state? so wen i press G it looks like he picking up something. is there a simple way to add that to te code or something?

  17. Mike Gooch

    So I’ve encountered a problem. When the player picks up the ball it will continue to slowly fall to the ground through the player, in which it resets back above the player when making ground contact, to which the cycle continues. The gravity of the ball seems heavily weighted, and doesn’t have much movement with out constant player contact.

    If I set the kinematic to true when the player hold the ball, it stays in place, but then get thrown to infinity when released.

    If anyone has an idea how to fix this, it would be much appreciated.

  18. Pingback: IAT410 Week 4 | iat410gcc4

  19. Bob Treecher


    This was a greater tutorial and we’d like to use it as the basis for the first game that we make.

    What we noticed was that there was no license information associated with the tutorial.

    Do you have any issue with it being used as the basis for another game?

    The sprites will be changed and a few additional game mechanics elements added.

    I’ve sent an email asking the same question.


Comments are closed.