Porting New Sokoban to Unity3D

After playing around a bit with Unity I’m starting to feel comfortable with it. That’s why I decided to try to port New Sokoban to Unity3D!

Ok, not the entire game, just a little demo. I wanted to work on a little serious 2D project that serve me as a learning experience of what I should expect from developing 2D games with Unity. And I think that a port of New Sokoban is perfect for this!

Following you have the demo.

New Sokoban in Unity

LAUNCH DEMO

I have used the Orthello2D framework (free version) to manage sprites and the build in physics engine to move the red box around.

The most interesting part of this demo is the fact that I have used a “realistic” physics engine to model the simple “physics” of this little game. I detect the mouse drag in a specific direction (right, left, up, down) and apply a force to the rigid body of the red box. The Unity physics engine does the rest 🙂

However, I think that this approach is not the best one for this kind of game due to the “unpredictable” nature of modern physics engines. Actually, in the demo bellow there are a few issues related to the physics engine. So, I guess that a “tweening” animations based approach would be more suitable for New Sokoban.

Anyway, this was a lot of fun! And the learning experience was great! I still think that Unity is great even for 2D games like New Sokoban. It is surprising the amount of work I managed to do in just a few hours.

2 thoughts on “Porting New Sokoban to Unity3D

  1. Hello Toni!

    I’m using cocos2d-iphone for 2D game development, and I think it’s a great 2D rendering engine, but it’s not a complete game creation tool, so development of demanding games becomes a bit complex and slow.

    After trying Unity3D, do you think it’s worth the price for 2D game development?

    Thanks in advance!

    • Yes, definitely. The initial learning curve is quite hard but in the long run it is worth it. Specially if you plan for multi-platform development.

      Nowadays, there are plenty of 2D frameworks based on Unity. Just look for the one that fits better your needs on the asset store.

      Moreoever, you can try Unity for free an even publish on iPhone an Android for free with some restrictions. After working with it for a while, you can decide by yourself.

      Unity is a awesome piece of code 😉

Leave a Reply