0
\$\begingroup\$

I'm developing a 2D game for the iOS platform. I have seen a lot of packages on asset store that makes 2D asset creation for unity easier.

I have narrowed my selection to just 2, 2d toolkit and ex2d. I have to test them and see with fits my workflow better (if anyone has an useful opinion I'm all ears). But my main concern is how to do the collision detection in unity for this kind of games.

My game is a side scroller and I want it to have slopes. I have done this in my own engines using tile height maps, etc... but unity doesn't support all this, but it has a physic engine. Do you think unity own physics engine will be ok for a game like this? I really need a good control on player collision to achieve a nice playability, so, I'm a bit sceptic if I will be able to do it using the physic engine, perhaps, because of my poor knowledge on this subject.

I have thought about rolling my own 2D cuad collider and do my own collision detection on the fixed update call but not sure either if it will be faster that the built-in physics engine because unity3d could be just optimised to use its own collision system.

What do you think?

\$\endgroup\$

3 Answers 3

5
\$\begingroup\$

You should be able have you character go up slopes without a 3rd party tool.

You can attach the character controller(download it off the asset store, its free) and then you can change the angle that the character is allowed to move over (I have my player able to climb up to a 50' angle, be sure the re-angle the character though).

The 2D Toolkit is great as you can create your own collision meshes over sprites, and batch all the images together, increasing performance.

\$\endgroup\$
1
  • \$\begingroup\$ Thanks for the answer. I know how to do the slope thing with unity3D and the built-in physics. The problem is performance. 1 year ago I did some tests with not more than 5 or 6 objects on the screen and it was lagging (less than 30 fps) in my ipod touch 2G. So, my own concern is performance. If anyone could confirm the creation of a 2D platformer with not just 1 enemy and 3 bullets on screen with not high end iphones I would be really happy. \$\endgroup\$
    – Notbad
    Jan 4, 2012 at 9:35
1
\$\begingroup\$

You might want to check Orthello. It's a pretty simple and straightforward 2D framework for Unity.

Orthello has 3 events for handling collisions.

  1. OnCollision (Start)
  2. OnStay (If after the first collision it keeps colliding)
  3. OnExit (It's not colliding anymore)

I'm pretty sure you have to bypass Unity's physics engine to handle 2D collisions.

You can find more info about Orthello at: http://www.wyrmtale.com/orthello

\$\endgroup\$
0
\$\begingroup\$

You might want to check out "2D ColliderGen" for Unity too, you can then automatically generate MeshColliders for your game objects from a sprite image’s alpha-channel at a button-click. Automatically integrates with Orthello, 2D Toolkit and SmoothMoves. Easy to use and still tweakable.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .