.:: Alex Erne :: PHP/MySQL & Unity3D/C# projects ::.
Recent news
* advertisement *
  10 July 2015 - Ending the use of 2Dtoolkit :: Posted in Unity3D

2Dtoolkit was the 1st plugin I bought from the Unity Asset Store. I bought it back in the days because I wanted to make TetraGems, a game in 2D, while 2D was not supported natively by Unity. Ans while I still think 2Dtoolkit was worth the price I paid for it, I want to drop it in favor of Unity's native 2D support.

2Dtoolkit has a lot of awesome features and the best is the 'sprite collection', which allows you to related sprites on one pile. From this sprite collection you create a sprite object on the screen and in that object you can easily switch from one sprite to the next. With that, 2Dtoolkit also has an incredable support for sprite sheets that can be read directly and used with the same ease as the sprite collections mentioned above.

But 2Dtoolkit being a great tool, it also has it's flaws. One of the biggest (litterally) is the loading of big images. Today I wanted to experiment on a 2D camera scrolling system where the controlled character on the foreground scrolls slightly faster than trees and clouds in the background, while a massive image (skybox, in this case 3840x1090) stands still. And it's that skybox picture that's too big for 2Dtoolkit to handle The rest (different speeding objects) was not a problem at all and I could have done that in 2Dtoolkit as well.

So now I'm on fully with Unity's 2D engine and again there's a lot to learn. Where to find certain stuff that I could easily find in the 2Dtoolkit. Oh yeah, everything (well, I guess everything) that 2Dtoolkit handles can be handled from Unity's 2D engine as well - it's jsut getting used to it again

An other problem I heard about (and I'll keep an eye on it) are the 2D meshes. It seems that unity's 2D engine handles the sprite meshes badly. I know there's a tool for it, but first I want to see how badly they're handled. If it's too much a dealbreaker (mainly for Android games), then I'll grab a small tool that reworks those sprite meshes into something with less points...

Post A Comment! :: Permanent Link
  29 January 2015 - List.Contains() problem :: Posted in Unity3D
Once again I'm having problems with programming. And from all the questions on the Unity3D forums, I'm not the only one. Here's the problem explained...

For the Bubble project, I'm in need of a list that contains data for bubbles that need to be processed. The list is declared below:

public class myBubbleList:IComparable<myBubbleList>
    public int myFoundX { get; set; }
    public int myFoundY { get; set; }
    public int myColor { get; set; }
    public myBubbleList(int myX, int myY, int myC)

    public int CompareTo(myBubbleList other)
            return 1;
        return myFoundX - other.myFoundX;

And as a global declaration for the main game routine I've added:

    List<myBubbleList> MyBubbleList = new List<myBubbleList>();

and also:

    List<myBubbleList> tempList = new List<myBubbleList>();

in a small routine of myself.

The aim is to use tempList in the routine to make a temporarily list and when the Bubbles I need match my requirements, I copy the NEW ENTRIES from tempList to MyBubbleList. Logic dictates that I have to use the List.Contains() method for this task. The code I wrote for this is:

    foreach(myBubbleList entry in tempList)
        // Add current entry in MyBubbleList ONLY IF it's not already there

Sadly though, the if() statement ALWAYS returns FALSE and thus duplicate entries can be added to MyBubbleList. And though the list is a small one and I can work around it, I don't want to have duplicate entries in the list. I have asked on the Unity3D forums, and it's confirmed that my code is correct.

After having tried a lot of different List methods as well as a lot of different ways to call List.Contains(), I just can't seem to get it working as it should. Over an hour later I was really fed up with it and came up with this very small method of my own to check for duplicate entries:

    bool InList(int tempx, int tempy, int tempc)
        foreach(myBubbleList entry in MyBubbleList)
            if (entry.myFoundX==tempx && entry.myFoundY==tempy && entry.myColor==tempc)
                return true;
        return false;

This method seems to be working perfectly when I change the List.Contains() line into


and no duplicate entries are stored into MyBubbleList any more.

I know, this is not the way I should be checking this and instead I should use List.Contains(), but right now I'm so fed up with figuring out why this problem that I've chosen the 'easy option' for my problem. It's a good thing though that the list I'm using now is small and this method I made doesn't really affect the performance of the game. I know that when I'll be using real large lists I should really figure out List.Contains(), but that's a problem for an other time

Comments ( 1 ) :: Post A Comment! :: Permanent Link
  21 January 2015 - Got the Moto G working :: Posted in Unity3D
About a year ago I renewed my wife's phone subscription and I picked an Android LG L5-II for the development of TetraGems. I quite quickly found out that that phone was about the minimum I could use for development and testing purposes, because it ran extremely low.

About 4 months ago I renewed my own phone subscription, and this time I picked the Motorolo Moto G 4G as phone. This phone basically is the closest thing to a Nexus phone, but a lot cheaper and only 1 dedicated tool that I can turn off (and I did turn it off ).

The only problem so far was to get that Moto G to work with Unity... My PC found it without problems. When I plugged it in and ordered a 'Build & Run' for Android, Unity just said it couldn't find an Android device This would leave my to a lot of .APK compilation, copy & paste and install every new version on the Moto G to test it. And me being lazy I'd rather not do that...

It's a good thing that I haven't really been programming for Android the last couple of months. But now with the new Bubble project (which might be released on Android), I felt the need to get the Moto G to work with Unity. Google wasn't really helpful, aside from pointing me to my own topic on the Unity forums where I said I couldn't get it to work. But looking further, I found out that Motorola has drivers available for the phone.

Of course, I downloaded and installed them immediately (they do install slow though) and tested it with the Bubble project. Aside from a couple of project settings (I didn't yet set a product name, version and password ), the phone was recognized by Unity and is working perfectly!
There is only one odd thing though. The Moto G has a resolution of 1280x720, but I can't seem to get to ditch the system's menu-bar. This causes the resolution to be only 1197x720 for me to work with But I'm sure I can figure out how to remove that menu-bar as well...

Post A Comment! :: Permanent Link
  10 March 2014 - Android SDK bug with Samsung Galaxy Tab :: Posted in Unity3D
A friend of mine was testing my game with her Samsung Galaxy Tab 10.1 v2 (P5100 model).

We first tested my game on her work where she can't access the WiFi, and the game did (obviously) not show any ads. But when closing the game, it would not close at all but remain in memory with only 0Mb used. The game had to be closed from Settings -> Apps by force. I thought it had something to do with no WiFi connection at her work, so she decided to try it at home. The next day she told me that at home the game didn't show any ads though she did have WiFi available. When she tried to exit the game, it had the same behavior as it had the day before on her work location.

For testing purposes she lent me her Galaxy Tab so I could hunt this one down at home. Oddly enough, I had a similar behavior on my WiFi, but not all the time. At times AdMobs would pickup the ads from the internet. Like at her home, when no ad was shown and upon closing my game when no ad was shown, it would hang and I had to close it with force from Settings -> Apps.

After downgrading the Android SDK 6.4.1 to 6.3.0 for my game I gave it an other run. This time ads are shown every time I'm using the Galaxy Tab and closing down goes without a problem. When disabling WiFi, no ads are displayed (duhuh ^^) and closing down my game works normally.

I think there's something wrong with either the plugin I'm using (AdMobs Android for Unity), or with the SDK running with Unity. But it's clear I'll stick with 6.3.0 for now

Post A Comment! :: Permanent Link
  15 February 2014 - 3D modeling made easy :: Posted in Unity3D
I was wondering what the easiest way was to make 3D objects for Unity. I know, the Unity3D editor does allow some basic editing, but that's mostly pretty simple and I can't make anything 'good' with it

In the time I 'take a bit of leave' off the TetraGems project (nothing long), I'm playing with the Unity 3D options. I have already made a simple physics marble thingy, just to experiment a bit. And today I decided to take the experiments somewhat further into character modeling.

Okay, Unity3D allows me to make a ragdoll, but it's really that: a ragdoll. It's a simple doll without any spine or coherency and I can't use it as character in any way. This was somewhat a letdown (though a good learning moment on how to make one) because I wanted to play a bit with animations and actual characters I could control.

Googling a bit, I ended up on the Unity forums where someone said that you can export your SPORE creatures and import them as .OBJ mesh into Unity. I was like WTF? I have SPORE with both it's expansion packs, so I decided to google a bit more. There I found the way to export my SPORE creatures *YAY* Okay, EA claims copyright because blah blah blah. That might work in the US, but in Europe their blah blah blah is worth shit, and they are my creations and I hold the copyrights of them

Lets look at at my old PORE creature that I still had available (yes, I had to fully reinstall SPORE again) in SPORE.
 photo SporeApp2014-02-1517-33-18-71_zps8f153717.jpg

Then how it looks in Blender (I have no money for MAYA...)
 photo blender2014-02-1517-31-52-55_zpsfa9c9055.jpg

And lastly how it looks in Unity's editor.
 photo Unity2014-02-1517-33-47-08_zps3920f4b0.jpg
...don't mind that ragdoll in the back please

At the moment, the beasty looks darker in Unity only because I have no lighting turned on yet. I bet when I have done that, the beasty will look the same in Unity as in SPORE.

Next thing I have to figure out is how to animate the beasty. I have already found that in Blender the bones are all there as they are in SPORE, and Blender also has an animation ability build in. Bit at this moment I just don't have the time to figure that out. Not to mention, this beasty is a bit too complex to start learning animation in the first place. I guess for that I have to make a real simple humanoid and experiment on that one.

Now that I know how to export stuff from SPORE, the next quest for me is to figure out how to export stuff from, The Sims 3. I have that one with almost all expansions as well, and there's enough to play with. Not to mention, The Sims 3 gives me immediately some good humanoids I could use for Unity

Post A Comment! :: Permanent Link
  06 November 2013 - Unity3D physics :: Posted in Unity3D
This morning I've been playing a bit with the Unity3D editor and it's physics capabilities, and I gotta say that I'm impressed with all that's possible with it!

To start I decided to make a small (up coming) company logo under which I'll be distributing the games I will be creating in the (near or far - don't know yet how long it'll take ) future.

I know, it's all gray and dark for now. I still h ave to add textures to it and the like, but I wanted to see if what I wanted as logo for games and movies was possible to accomplish. Well, it looks like it is

Next up is use that same physics project and expand it a bit. I think I'll start with a simple mouse-click and/or key press to let the balls bounce up and down again a bit. I really would love to see that work! After that see if I can work with the camera using controls and from there on I'll expand things further.

Also worth to note that the pyramid object in this small physics movie is not part of the standard Unity3D object library. I had to make one myself using Wings 3D. I will use this program as well to create more (and more complex) 3D objects later on to be used in my games...

Post A Comment! :: Permanent Link
  04 November 2013 - Visual Studio completely removed :: Posted in Unity3D
After the problems I've had with the XNA update and my focus on Unity3D, I decided to drop the whole Visual Studio C# idea.

The reasons to remove Visual C# is quite obvious. Unity3D is offering a lot more compared to Visual C# to start with, and Unity3D also offers support for more platforms as well. Only if I want to make XBOX360 games I need to buy a license for Unity3D, where Visual C#/XNA gives that for free. But since Microsoft has ditched the support for XNA, that XBOX360 support most likely will be close to none existing anyway

Then there's the amount of (free) resources. I haven't really seen any for Visual C#, but when I look at the Unity3D asset store, it kinda overwhelms me. Unity3D has all (free) assets cataloged on their own site, making it easier to pick (buy) the thing I like.

Last but not least there's the amount of crapware required to use Visual C#/XNA, which is either automatically installed or needed to be installed later on. It took me over half an hour to remove all stuff that Visual C# and XNA added on my system, as well as remove all stuff added by activating the (somewhat mandatory) Microsoft Media Player for sound support in XNA.

Post A Comment! :: Permanent Link
  Page navigation
  Page 2 of 3 :: Previous Page :: Next Page
* advertisement *
* advertisement *

This website is Copyright © 2009 - 2018 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é