Thursday, November 20, 2014

Unity how to copy 1 scene from one project to another

So at first what i am trying to do is to copy paste the scene but that will not work as all the dependency and object reference is gone,

what you need to do is

right click the scene you want to copy then "export package" then tick the "include all dependancy" then once you are done give it a name such as "myexportpackage"

open your other project

under edit -> import package, then choose your package to import, it work fine


Wednesday, November 19, 2014

Unity, PlayerPref saving array of item

Ok, say I want to buy a lot of item and save it into the PlayerPref, how should i do it???

var totalitem: int;

//so first i try to get the totalitem from the player pref "totalitem" at first it will return 0 as there are nothing inside

totalitem = PlayerPref.GetInt("totalitem");

//then, say i click buy item 1, so i save the item 1 into player pref "item1"
PlayerPrefs.SetInt("item"+totalitem1);
totalitem+=1;

//if i click multiple time buy item1, it will then save item 1 into "item0", "item1","item2"

PlayerPrefs.SetInt("totalitem",totalitem);            

//EXAMPLE LET SAY I CLICK BUY ITEM "1" for 4 times, it will save it inside playerpref as below
//totalitem=4
//item1=1,item2=1,item3=1,item4=1


//SAVING IS DONE


Now I want to do the loading, I need to load the stuff back into the selling screen, since i only save number "1" in the "item1", "item2", "item3", i can load it back as below

var myitemArrayList;

function Start () 
{
    myitem=new ArrayList();
    totalitem=PlayerPrefs.GetInt("totalitem");

    fori=0 ; i < totalitem ; i++)
    {
        myitem.Add(PlayerPrefs.GetInt("item"+i));
    }


}


 GUI.Label(new Rect(50,100,100,100),"My Item"+myitem[0]);
 GUI.Label(new Rect(50,170,100,100),"My Item"+myitem[1]);
 GUI.Label(new Rect(50,240,100,100),"My Item"+myitem[2]);
 GUI.Label(new Rect(50,310,100,100),"My Item"+myitem[3]);




51 days after quiting my job

Ok, lets get back to work

seem like a lot of time have been wasted

today goal

3 block of area of programming

- buy 1 item, then sell 1 item via auction house (done 75%) it took me around 2 hour
- let user buy painting and gems
- let user go casino play casino war


how it went today
=============
wake up 9:30am
went to pos office deliver item to client, buy some grocerry, eat breakfast, see doctor
came home 11:30am
code from 11:30am to 12:30pm (1 hour code)
lunch
went out to see property i invested few years back leave at 1pm
came home 3:30pm
sleep
wake up 6:30pm
code from 6:30pm to 7:30pm(1 hour code)

so my 2 hour i am able to finish 1 block , so will spend some time finish another 2 block

maybe i should plan ahead, cannot just 1 day go on see one day

because time is so limited

tomolo will need to serve 30 people on the offline shop, so need to work from 1pm onward to midnight

today thurs - only 2 hour code, the rest busy other
fri - only have morning session can code, the rest busy offline shop
sat - only have morning session can code, the rest need to busy other
sun - only have morning session can code, the rest need to busy other

sigh...cant believe i dont have any time even though i have resigned, no wonder if no resign, can literally do absolutely nothing


let imagine, how would it went if i keep my '9-5'day job
===============
7am wake up jam all the way to office
9am work till 6pm
6pm jam all the way home reach home 8pm
8pm dinner + bath
9pm tired like hell need to nap 1 hour
10pm still too tired dont feel like doing anything beside entertainment
10-12 midnight - youtube, movie, games
12 midnight sleep
but i can make 100 dollar, will never hungry but will never rich


income:
USD10 from ecommerce

expense:
daily default USD60



Thursday, November 6, 2014

Travelling for 10 days

So I will go travelling for 12 days and will not update this blog until 19 nov, stay tune

Tuesday, November 4, 2014

marketing 101

Okay, I do not know much about marketing

below is a few good blog post about marketing

http://gamedevelopment.tutsplus.com/articles/marketing-your-indie-game-the-single-most-important-thing-that-no-one-knows-how-to-do--gamedev-7157


http://www.indiegamegirl.com/how-to-market-your-app/


so it talk about you need
1. website (CHECK)
2. facebook page (NOT YET)
3. twitter (NOT YET)
4. youtube trailer (NOT YET)
5. steam greenlight (NOT YET)
6. find journalist (NOT YET)
7. launch kickstarter (NOT YET)

so you can see, all i have is one website and one development blog, no wonder I fail to make any money, if you want to make money you need to market your game, using all sort of way, and it is not an easy job, fail to market, then your game is a flop



My new game: Life as a Billionaire

Okay, So I am building this new game, "Life as a billionaire" a point and click adventure games , below is a few screenshot for you to see if you would like it or not, due to the heavy schedule ahead this game might take a long time to finish, I would take a long vacation travelling other country will only come back around end of november, so this game might release during december(HOPEFULLY)