.:: Alex Erne :: PHP/MySQL & Unity3D/C# projects ::.
Recent news
Categories
Like me on Facebook
* advertisement *
  03 September 2016 - Removing 2D Toolkit in favor of Unity's 2D implementation :: Posted in Burst-a-Bubble (project)

A couple of months ago when I was busy re-coding TetraGems, I figured how I could make Burst-a-Bubble fun, or at least more fun than how I imagined the game to be in the first place. By now I've started coding Burst-a-Bubble again, but before I can implement my new ideas on the game I do need to make some other changes...

Those changes include the complete removal of the 2D Toolkit from the game and make the game 100% based on Unity's 2D support. And while 2D Toolkit is not a bad plugin for Unity, I think it has served it's prupose for me by now.
I started using Unity back in November 2013, when there was no 2D support at all from Unity's sid, and the 2D toolkit was the only way to implement 2D graphics. When Unity started to implement 2D graphics, the wireframes of the sprites were all over the place, making games unneccisary slow (and most certainly on older Android devices). But Unity has come a long way since then and it's 2D implementation has improved a lot!

 photo BaB Unity2D 20160903_zpsbvyaippl.png photo BaB 2Dtoolkit 20160903_zpskkgms68a.png

The image above shows the 2 different ways of coding (left Unity's 2D and right 2D Toolkit). As you can see, 2D Toolkit still has a better wireframe than Unity's 2D implementation (1 wire against 5 in Unity's 2D), but Unity's 2D implementation has a lot of other plusses that I can't seem to get to work with 2D Toolkit (and that's not to bad-mouth 2D Toolkit - I still think it's an awesome plugin!).
The most important reason to switch to Unity's 2D is the new UI system that has been implemented with version 4.6. This UI system is awesome (on the right side of the Unity image and it has a minimum wireframe) and so far I haven't been able to use it effectively with 2D Toolkit (trust me, I tried it with TetraGems' main game routine). An other BIG PLUS for Unity's 2D is that when I change the resolution of the game when it's running (or rather rotate my Android phone and thus go from landscape to portrait or vice-versa), the resolution stays the same, while in 2D Toolkit changes to the new situation.

Sadly though, with this transition of 2D engine, I do have to re-code a lot of things in Burst-a-Bubble. For starters, where in 2D Toolkit I can use sprite collections and just say that I want sprite number <X>, in Unity 2D I need to move all sprites to the resources and each change of sprite has to be loaded from that location. Also, where in 2D Toolkit I could just drop a sprite(collection) to the (outside of the visible) screen and instantiate things from there to the game, in Unity's 2D I need to create actual prefabs of these things and instantiate them from there to the screen, and with 7 colors of Bubbles in the game that means 7 pre-fabs against 1 sprite(collection) on the screen with 2D Toolkit.
Last but not least, where 2D Toolkit has a 2D implementation of a TEXT MESH, Unity's 2D does not have such a thing. I tried to use a 3D Text mesh, but sadly those appear BEHIND the 2D sprites and thus are useless. The only way to implement 2D text iin Unity's 2D is by using the new UI ystem.

By now I've removed most of the 2D Toolkit from Burst-a-Bubble and as you can see on the left picture, the bubbles appear on the screen already. However, I still need to re-code the drag & drop functions of the Bubbles, because I frankly removed the 2D Toolkit implementation from the bubbles the hard way, and they don't do sh*t at the moment  

Removing 2D Toolkit from the Burst-a-Bubble project will also be a good trial for TetraGems. I still aim to remove it from that game as well, but I'm afraid of several pitfals that might happen. I hope that Burst-a-Bubble will be a good 'experiment' to succesfully remove 2D Toolkit from TetraGems as wel


Post A Comment!
Your comment:
Title

Your name

Image text
* advertisement *
* advertisement *

This website is Copyright © 2009 - 2016 Alex Erné
PHP/MySQL coding by Alex Erné Copyright © 2009 - 2016 Alex Erné
...all rights reserved...

AE games™ and the AE games logo are Trademarks owned by Alex Erné
TetraGems™, Burst-a-Bubble™ and the Burst-a-Bubble logo are Trademarks owned by Alex Erné