.:: Alex Erne :: PHP/MySQL & Unity3D/C# projects ::.
Recent news
Categories
Like me on Facebook
* advertisement *
  14 September 2016 - Re-coding TetraGems is more work than expected :: Posted in TetraGems (released)

Like I did with Burst-a-Bubble, I'm busy re-coding TetraGems to remove the old 2D Toolkit from it. For TetraGems it'll take quite a bit longer though because of some (noob) decisions I've made back in the days, as well as some 'forced' decisions. Let me walk through these noob and 'forced' decisions...

  • Camera issues. Yes, this was a real noob decision on my side. What was I thinking to give the 2D Toolkit camera a size of 600x720 pixels while my phone had a resolution of 720p? With that, the position of the sprites on the grid were so off that I was constantly correcting their location to match the grid. Needless to say I'm now using a 720p resolution with Unity's 2D engine AND have moved the camera along a bit so that the lower-left corner of the grid matches it's (0,0) location. This way I can multiply the grid's location by 40 to get the location on the camera.
  • Self-build collider. This was one of those 'forced' decisions. When I started using 2D Toolkit, there was no 2D in the Unity engine, and one of the short comings of 2D Toolkit is that when I rotate a sprite (i.e. the Tetris block), the collider box didn't rotate along with it. Today I tested the Unity 2D collider box and IT DOES rotate when I rotate the sprite!
  • Breaking down the Tetris block into 4 bits. An other noob decision and while it seemed handy at the time, I didn't take performance into account. With the coming update I will remove those weirdo bits to form the Tetris block (also because the collider now works as it should), which will increase the game's performance with 50% to 75%
  • Database saving. One of those other 'forced' decisions. Back in the day there was no Google Games Service that'd store stuff like highscores and achievements (which I still need to implement BTW), so I made a connection with my own database to get that job done. And while I'm not yet implementing Google Games Services, I will eventually implement it (most likely in 2 or 3 versions down the road).

  • As you can see, there's still enough to do to re-code TetraGems, and therefor I can't give a date yet on the WHEN for a new release. At this moment I'm just taking it easy on the whole re-coding thing by (trying to) spend about 2 hours a day on it. At least I know now where I need to make my modifications and I certainly hope that those will work out just fine.
    With that, the falling of the Tetris blocks and the alignment of the gems is already working perfectly in the ned Unity 2D environment. But beause I just figured out that the Unity 2D collider boxes DO rotate along with the sprite, there's a lot of work ahead now to make it all work perfectly (meaning - more code to re-write )


    Post A Comment!
    * 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é