.:: Alex Erne :: PHP/MySQL & Unity3D/C# projects ::.
Recent news
Categories
Like me on Facebook
* advertisement *
  13 November 2016 - GEOvox and RPG project start :: Posted in Unity3D

I know it's been very quiet the last few months from my side, but that's because of therapy and meds kicking in (with extreme fatigue as a side effect). None the less, I am busy on things and one of them is creating a MASSIVE map with GEOvox for a (hopefully) upcoming RPG I'll be making with my brother.

The maps I'm creating at the moment is a dwarven hold, which will resamble one of the many landmarks from the pen-n-paper RPG we've played back in teh early 90s and which is a creation of my brother. Luckily he still has a lot of lore (on paper) available from that world and luckily I still had the 2D map (made with Campaigh Cartographer) in .BMP format.

While I do realize that RPG projects are one of the most failed gaming projects around, my brother and I both decided to give it a go and see where things will go. If for some reason the project takes to long or will fail, at least we did get a lot of experience out of it and can use it for future projects


Post A Comment! :: Permanent Link
  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! :: Permanent Link
      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! :: Permanent Link
      28 August 2016 - Tetragems version 0.96 released :: Posted in TetraGems (released)

    It's taken me a while, but the new version of TetraGems is readyt and released on the Google's Play store. Below is a list of the most important fixes and changes.

  • Removed the game's autorisations for Phone and Device ID & Call information (have no clue how they ended up in the previous version to start with)
  • Updated the AdMob advertisement system to the current 'standard'
  • Optimized the code by giving the menu system and the actual game their own scene
  • Using the new Unity3D UI system, offering more flexibility to make changes later
  • Implemented encryption for the data storage on your Android device
  • Convert stored data to the new encryption system

  • There is one issue that I am aware of where on certain devices the leaderboard (top-20 world high scores) will not fit into the bit 'O' block.


    Post A Comment! :: Permanent Link
      28 August 2016 - Merging blogs :: Posted in General

    With my decision not to focus (and thus stress) too much on developing games (see my post earlier this month) to avoid stress and get too many mood swings from my bi-polar disorder, I've just merged the old AE games blog into this one.

    However, I also stated that I'd be (silently) closing the AE games Facebook page, but I've changed my mind about that. Eventhough I'll be closing the AEgam.es site, I will keep using the trademark I own on AEgames and thus still have some use for the facebook page. This will also mean that I'll include the facebook button that's currently on the AEgam.es site into this one.


    Post A Comment! :: Permanent Link
      08 August 2016 - ALL PROJECTS ON HOLD INDEFINITELY :: Posted in General

    I've been diagnosed with Asperger's syndrome and ADD back in 2009, but I always felt that was not all there was to me. Only recently I've been diagnosed with a bi-polar disorder, which is most likely the missing piece of the puzzle of my mental state of mind. The last 20 years my moods have been going up and down like that of a 7 month pregnant woman (no offense to the female readers), and the cycle in which the mood changes happen went from about a year to around 3 months now. That does not mean that I have 90 'good days' and 90 'bad days' - it's just the general state of my mind, with peaks both up and down from one minute to the other at times.

    Earlier today I've had yet an other such peak in the form of a very sudden deep depression. It was that bad that I gave my wife my wedding ring and I was about to walk out the door never to return. Good thing she was there to talk me out of it. The next 2 hours suicidal thoughts were on my mind constantly and I had to restrain myself not to take the pills that I have lying around the house, or just grab some knife and start cutting myself. Instead I just used my nails to inflict the pain I was yearning for...

    This all is somewhat related to my programming work. I can only work on my prejects when I'm doing well and with those times getting shorter and shorter, the progress will become very slow. Not to mention, the stress caused my the need to code and deliver the project to the public is not doing my mental state any good either.

    Of course, programming is still one of my greatest hobbies, and I will keep programming. I just will not make any big projects like the d20 project, or the re-coding of TetraGems and complete overhaul of Burst-a-Bubble. That's just the stress I can't need anymore and I have to put it down for that reason. Will I completely quit making games? Not at all! I just won't be making announcements or anything like that, and when I think the game I made is good enough, I'll just drop it on you all.
    With that, the main site of my programming activities (AE games) will be closed down as well later this year, as well as a (silent) closure of the Facebook page I created for it. I will keep my twitter account, but don't expect a lot of tweets from me there...

    Then TetraGems... I was busy re-coding it and it's basically ready on the 1st stage. I will make some (simple) modifications to code to so that the highscores, which are stored through the aegam.es site, will stay available after the closure of the site. I can't tell any date yet for that release though - it all depends on how I'm doing...


    Post A Comment! :: Permanent Link
      13 July 2016 - Implementing AdMob in your Unity project :: Posted in Unity3D

    I've recently recieved an eMail from Google, stating that the Android Google Mobile Ads SDK will become obsolete coming September 15th. The AdMob SDK versions 6.4.1 and lower will simply stop to work from that data, and if you have used it in your projects (like I did with TetraGems), you will need to upgrade the AdMob handler to version 7.0.0 or higher. Sadly though, there's NO stand alone AdMob SDK anymore and it's been fully integrated into the Google Play SDK.

    It's the Google Play SDK that does give some problems though. With the current latest version of the Google Play Services (rev. 31 in the Android SDK Manager) kinda missing in the package, you have to grab the SDK elsewhere. I've found a copy (rev. 28) on the Unity forums and will share it through my dropbox for your conveneince. The contents of the Google Play Services (rev. 28) needs to be copied into your Android SDK installation directory (C:Program Files (x86)Androidandroid-sdkextrasgoogle by default).

    Next up you need to check a couple of packages that MUST BE INSTALLED in your Android SDK Manager. These packages are:
      - Android SDK Build-Tools rev. 23.0.3. I've read reports that rev. 24 is broken, and I couldn't get it to work either.
      - Android Support Repository
      - Android Support Library (Obsolete). I'm not 100% certain this one has to be installed, but the Google representatives keep hammering on the forums that it has to be there - odd though for an obsolete package...
      - Google Play services, even while it's not actually installed right now...
      - Google Repository

    With the Android SDK Manager now setup correctly, it's time to download the Unity plugin for the Google Mobile Ads SDK from GitHub. I realize that there are enough alternatives on the Unity Asset Store, but I'm a bit reluctant to use those because you have no clue what's been done to those packages. With that, I've tried 2 free ones from the Asset Store and I could not get those to work, while the paid ones are just plain stupid when you can code it yourself!  Having the plugin, you now need to add this one to your current project (either double-click the GoogleMobileAds_305.unitypackage file or use Unity3D's Import Asset function).

    So far that's all you have to do. Now all you need to do is add a bit of simple code to get the AdMob plugin to actually work and drop the advertisement on your app. And the code required is very small:

    using UnityEngine;
    using System.Collections;
    using GoogleMobileAds.Api;
    
    public class Create_AdMob : MonoBehaviour {
      #if UNITY_ANDROID
      string adUnitId = "ca-app-pub-XXXXXXXXXXXXXXXX/XXXXXXXXXX";
      #elif UNITY_IPHONE
      string adUnitId = "INSERT_IOS_BANNER_AD_UNIT_ID_HERE";
      #else
      string adUnitId = "unexpected_platform";
      #endif
      public static BannerView bannerView;
    
      // Use this for initialization
      void Start () {
        // Create a 320x50 banner at the top of the screen.
        bannerView=new BannerView(adUnitId, AdSize.SmartBanner , AdPosition.Top);
        RequestBanner();
      }
    
      private void RequestBanner() {
        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().Build();
        // Load the banner with the request.
        bannerView.LoadAd(request);
      }
    }

    Now all there's left is create an EMPTY GAMEOBJECT in your scene and attach the Create_AdMob.cs script to it and you're ready to go!

    A couple of notes though....
    1) I haven't tested this on iOS since I'm not an Apple fan and don't own ANY (mobile) Apple devices. Please leave feedback if it works as well under iOS as it does under Android.
    2) Obiously, the string asUnitId should hold your app's advertisement ID.
    3) Do keep in mind that it's against Google's agreement to click your own ads! If you want to test your ads, replace the AdRequest request into

    // Test device
    AdRequest request = new AdRequest.Builder()
      .AddTestDevice(AdRequest.TestDeviceSimulator)
      .AddTestDevice(SystemInfo.deviceUniqueIdentifier)
      .Build();

    4) I've made bannerView public and static so that you can call it from any other routine and use Create_AdMob.bannerView.Show() and Create_AdMob.bannerView.Hide() so you can toggle visibility of the displayed advertisement.

    There's a lot more to this plugin and all is described in it's official documentation. I just figured to describe the easiest way to make your advertisement work with your apps...


    Post A Comment! :: Permanent Link
      Page navigation
      Page 1 of 28 :: Previous Page :: Next Page
    * 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é