Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411281 Posts in 69324 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 10:03:13 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)TutorialsHomebrew 2D platformer physics
Pages: [1]
Print
Author Topic: Homebrew 2D platformer physics  (Read 13890 times)
mysteriosum
Level 1
*


I just lost the game ;(


View Profile WWW
« on: January 06, 2014, 09:20:22 AM »

Hello there!

So I've been working on getting good, custom platformer physics in Unity for a while, and I've come up with a system that works pretty well for me. I decided to write a series about it.

It's a text tutorial so if you're into that kind of thing and want to do 2D platformer physics in Unity, this might interest you.

Also if you're already awesome at doing this and feel like giving me some feedback, I'd be much obliged! Smiley

-mysteriosum



Gravity:
http://deranged-hermit.blogspot.ca/2014/01/2d-platformer-collision-detection-with.html

Lateral movement:
http://deranged-hermit.blogspot.ca/2014/01/2d-platformer-collision-detection-with_20.html

Jumping:
http://deranged-hermit.blogspot.ca/2014/01/2d-platforming-physics-with-raycasts.html

Slopes (part 1):
http://deranged-hermit.blogspot.ca/2014/02/2d-physics-in-unity-with-raycasts-slopes.html

One-sided platforms:
http://deranged-hermit.blogspot.ca/2014/03/2d-platformer-collision-detection-with.html

Moving platforms:
http://deranged-hermit.blogspot.ca/2014/06/2d-platforming-in-unity-using-raycasts.html
« Last Edit: June 11, 2014, 02:43:21 PM by mysteriosum » Logged

akilladakeith
TIGBaby
*


View Profile
« Reply #1 on: January 06, 2014, 12:03:42 PM »

Thanks for this great tutorial!  I was moving onto setting up a very similar system for a Unity 2D project so reading through this before getting started really helped me organize lots of my thoughts.  Much appreciated, look forward to any future tutorials.
Logged
mysteriosum
Level 1
*


I just lost the game ;(


View Profile WWW
« Reply #2 on: January 07, 2014, 08:50:45 AM »

Hey no problem! I will be doing the next one for lateral movement this weekend Smiley
Logged

mysteriosum
Level 1
*


I just lost the game ;(


View Profile WWW
« Reply #3 on: January 20, 2014, 12:22:36 PM »

I have finished part 2 - check it out if you like! This time it deals with lateral movement - using unity's input to move a character left and right.
Logged

BapeNAsians
Level 0
*


View Profile
« Reply #4 on: January 25, 2014, 04:58:42 AM »

Hmmm.
Logged
mysteriosum
Level 1
*


I just lost the game ;(


View Profile WWW
« Reply #5 on: January 30, 2014, 06:31:19 AM »

I did a short thing on Jumping - specifically, a subtle input nuance. Here:
http://deranged-hermit.blogspot.ca/2014/01/2d-platforming-physics-with-raycasts.html
Logged

mysteriosum
Level 1
*


I just lost the game ;(


View Profile WWW
« Reply #6 on: February 13, 2014, 02:31:00 PM »

The latest post in this series, where I discuss slopes and how to deal with them. Check it out!

http://deranged-hermit.blogspot.ca/2014/02/2d-physics-in-unity-with-raycasts-slopes.html
Logged

mysteriosum
Level 1
*


I just lost the game ;(


View Profile WWW
« Reply #7 on: March 04, 2014, 08:21:49 AM »

Hello everyone! I have made a tutorial about one-sided platforms, that you can only go through from one side. It also involves a basic explanation of Bitwise operations, and how they apply to layer masks Smiley

Here it is!
http://deranged-hermit.blogspot.ca/2014/03/2d-platformer-collision-detection-with.html
Logged

mysteriosum
Level 1
*


I just lost the game ;(


View Profile WWW
« Reply #8 on: June 11, 2014, 02:48:33 PM »

I have updated this series with a tutorial on moving platforms! Remember that this series is for if you want to make your own physics in Unity for platforming, which I think is always the right choice for that kind of thing. I started this before I knew about their 2D physics engine but I maintain that this is a good exercise and more optimal, especially for bigger projects.
Logged

JasonPickering
Level 10
*****



View Profile WWW
« Reply #9 on: July 10, 2014, 02:17:55 PM »

is there any specific reason, you used regular physics as opposed to Physics2D?
Logged

mysteriosum
Level 1
*


I just lost the game ;(


View Profile WWW
« Reply #10 on: August 07, 2014, 11:03:31 AM »

I started it before the 2D physics were a thing, and I convert it to 2D physics about half way through  Coffee
Logged

Fayer
Level 0
**



View Profile WWW
« Reply #11 on: March 30, 2015, 05:26:41 PM »

Interesting, I was looking for something like this. Thanks for the tutorials, will try to achieve this tomorrow.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic