Thursday, March 21, 2013

Unity3D + C#: Nested Coroutine (Coroutine within a Coroutine)

To call a coroutine inside a coroutine, like how you would normally call a function within a function:

// function within a function
void Attack()
{

}

void Battle()
{
Attack();
}


// coroutine within a coroutine
// the about-to nested coroutine also have to be an IEnumerator method
IEnumerator AttackCoroutine()
{
yield return new WaitForSeconds(1);
Debug.Log("Attack");
}

IEnumerator BattleCoroutine()
{
// call the method using "yield return StartCoroutine(FunctionHere())"
yield return StartCoroutine(AttackCoroutine());
yield return new WaitForSeconds(1);
Debug.Log("Defend");
}

Source: http://answers.unity3d.com/questions/14081/nested-coroutines.html

Thursday, January 31, 2013

#1GAM JAN: InvolveRPG


Finally completed my first #1GAM entry, and it's called "InvolveRPG".

Download links:
InvolveRPG_PC
InvolveRPG_Mac

It was designed and made in 8 hours (roughly 3 nights of my regular working days).

This entry was made to test an idea where, what if, you're playing an ATB (Active Time Battle) turn-based game, and the charge meter is hidden.

Charge Meter, the one on upper right corner (screenshot from Chrono Trigger)

You'll have to get involve into the game by timing the charge meter yourself, using a... STOPWATCH!

Further instructions can be seen in the game, good luck playing it.
P.S> There's a way to win the game.

Monday, January 14, 2013

Unity3D + C#: Acquiring the length of an Enum


Acquiring the length of an Enum:

int enumLength = System.Enum.GetValues(typeof(nameSpace.type)).Length;

Replace the "nameSpace" to the source (script name) of the Enum type, and "type" to the Enum type.

Source:

Saturday, January 12, 2013

My 2013 Resolutions


After seeing all the 2012 resolutions unachieved, I realized I need to be a little more sensible and be clearer about my goal this time. 
Try not to go too big, scope down a little, and have some solid variables in them.

My 2013 Resolutions:
1. Make 12 games

2. Finish Little Green Hood (full version) within the first half of 2013, and publish it for both iOS and Android

3. Finish studying all chapters of Minna no Nihongo 1 (Japanese language text book)

4. Finish reading all my game development books, and learn about designing better games

5. Play as much JRPG, stealth adventure, and survival horror games as I can

6. Complete leezhifei.com website design

7. Go to Japan

8. Seriously workout and lose at least 10kg

9. Start a JRPG, stealth-adventure, and survival-horror game mechanics analysis column for my blog

10. Be happier this year

A look back at 2012 resolutions


1. Publish 2 iOS good game on the appstore that will do well (FAIL)
Published 1 iOS game on the AppStore (Little Green Hood Lite), that doesn't so well. It's more of a tech demo to me though.

2. Continue mastering the languages (FAIL)
C# is still my most used language, plus I had a ongoing game project I had to attend to.
I built my website using HTML and Twitter Bootstrap, still not very good at it though.
Barely spend 1% of my time in 2012 to study Japanese.

3. Earn 100,000 USD (FAIL)
I realized making money isn't really my thing, let alone creating the kinds of game that make money.
I've decided to go back to the basics and make games just for the fun of making games. I felt happier that way.

4. Go to Japan (FAIL)
Never did go to Japan, didn't even get a chance to go to TGS while I was having my previous job.
Probably should've master my Japanese speaking first.

5. Learn to drive well (PASS)
I did try learning to drive better around December due to specific reason. Still counts.

6. Take a vacation or two (PASS)
Went to Singapore in November to watch Perfume's concert. 

7. Make a short film (FAIL)
Didn't even have a camcorder. Though I did make a game based on a short film in a 48 hours game jam. But I don't think that counts.

8. Write a blog post a week (FAIL)
Most of the time, I write a new blog post only when I learned something new which I fear I might forgot, or when I developed something interesting that I wanna to share with the world.
I barely do those things anymore now that I've a full time job. Sigh.

9. Start a comic series (FAIL)
Been doing way too many coding works that this resolution had slowly fades away and forgotten.

10. Make the Pokemon (fan-) game I always wanted to make (FAIL)
I don't even remember what the idea was, it was something about "Pokemon" and...

11. Make a gross-able game (FAIL)
Should be the same as 1 and 3, I didn't make any gross-able games as I wasn't so much into the money grinding thing.

12. Lose weight (10Kg) and get a life (FAIL)
Still have the same weight, and no life as always.

13. Survive the apocalypse, and be a hero (PASS)
Survived the apocalypse, hell yeah~!

Conclusion
3 out of 13, that's like 23%. It's bad. 
I've made too many no-so-easy-to-achieve resolutions.

A lot of things had happened to me in 2012, some good, some bad:
- received a grant to develop a mobile game; 
- experienced working with a money-minded investor (although, what kind of investors isn't money minded? lol);
- had a huge amount of stress working on two projects at the same time, even broke down crying in front of my colleagues and boss;
- quit my first job, got broke, and got my second job soon after; 
- had a quarrel with an artist during a game jam which makes me realized how much I need learn about working in a team;
- finished my studies and graduated from MMU;
- experienced rushing a project for a release, and crunching too, as an indie developer (solo);
there's still a lot which I don't quite remember… but I really do learned a lot from these "incidents". 

Hopefully 2013 will be a better year for me, I'll also try my best at the same time.

Friday, December 21, 2012

Project Green: Why Lite and no Pro?

If you searched for "Little Green Hood" on the AppStore, you may be able to find something called "Little Green Hood Lite". If you played the game and you like it, you might start wondering... where the "Little Green Hood Pro"? Why can't I find "Pro"? Where the hell is it?
If you don't like it, well, you don't have to worry a thing.

Well the thing is, the game is not 100% complete yet. I was simply releasing this as sort of a Beta-demo... or as iOS developers like to call it, the "Lite version".

This game was funded by Mdec under the ICONdap program. Getting funded means there're obligations which I must follow. And one of those obligation is that I have to release a build of the game on November (which was eventually dragged to mid-December, which is right now).

To fulfill those obligations, I chose not to release the Pro version too early, as the game is still rigged with bugs, many planned features are still not implemented, the UI design are still not very elaborate, lack of art assets, the story has not been implemented yet, etc.

Instead, I focus on creating a Lite version using the only resources that I have at the moment, to bring you a less buggy version, with most of the working features at the moment, that can show you what the game is really about and what it's really capable of.

The project I envisioned was much bigger than what I wanted to work on when I pitch it for the funding, and obviously having a full time job while working on this as a side project wasn't enough for me to complete it, let alone working on it solo (programming side). But of course, this has taught me to scope down the project and cut down some not-so-important features.

I promise I'll try my very best to finish up the game and release the Pro version by the first quarter of 2013.

You can try the game by following this link:
https://itunes.apple.com/us/app/little-green-hood-lite/id588214686?ls=1&mt=8

Credits (for the people who are involved in this project, as I do not have time to place them in the game, was so rushed to push the game to the store):
- Game design/programming: Lee Zhi Fei (Me)
- Game design/writing: Lance Ee Uli
- Concept artist (Outsourcing): Jarold Sng
- 3D Character Artist (Outsourcing): INOTRI Creative (Carson)
- 3D Environment Artist (Outsourcing): Billy Wong
- Concept artist (Prototype): Gan Zin Jer
- Composer: Richard Daskas
And last but not least, the ICONdap program by Mdec, for making it possible for me to make this game.

Well, wait for the Pro version then~ ^^

Thursday, December 20, 2012

Games I created in 2012

Since I'm joining a game making event called One Game A Month next year, I think I should come up with a list of the games I created this year.

1. AppQuest (PC/Mac)
A game which me and my team created in 24 hours during a local jam called Hackweekend.
You can read more about it by clicking the title (link) above.

2. Company's Game #1
A non-disclosable, casual-type game that I made while working in my previous company. It was cancelled half way through, but I did finish a simple prototype.

3. Company's Game #2
With nothing to do while working in my previous company, I propose a new turn-based strategy game project to my boss, and was working on it for about 2 to 3 months before I quit my job due to stress-related issue. I did finish the prototype though, but too bad I won't have the chance to continue working on it.

4. Ganggu (PC/Mac)
Also a game which me and my team created in 48 hours during a local jam called iTrain Hackathon.
Where we are required to create an app or game based on the one of the short films created by the contestants from another 48 hours film-making event. We chose one called "Ganggu" (which means "interfere" in Malay), a comedic shorts about ghosts and bomoh, and decided to create a 3D adventure game project based on it. 
The end product is a bit of a failure, mostly because I aimed way to big, and couldn't finish the environment art on time. Anyway, you can still download the game if you want:

5. Little Green Hood (iPad)
A "little" game projects I started in November 2011, inspired a lot by the rescue missions in Hitman and MGS... with a little bit of Zelda (visual side). I've been working on it on and off for the past 12 months. You can see me blog about it sometimes in the posts with "Project Green" in the title. I even had a Facebook page for it: 
I recently submitted a demo build (Lite version) to the AppStore and hope it can pass through the Apple review, for a release by the end of December 2012

-----

So that's about it, I created 5 games in 2012.

Tuesday, November 20, 2012

EGP October Roundup Reviews

It's a bit late (it's almost the 3rd week of November now), but I'm doing it while I have some free time to play games.


The EGP's October theme was "Vegetation", it's quite an interesting theme. The games created for the month of October looks pretty interesting too.

Let's start reviewing.

Sunday, November 18, 2012

Unity3D + JavaScript: Fading screen in and out in a scene

It's JavaScript's time again. Today's topic is on fading screen in and out in a scene, because for some reason, people finds it cool to implement that in game, even myself. 

Well, I usually do that I was setting up the scene (like placing characters, what animation pose it should have when the game started). I don't really wanna show people the ugly side of the setting up part, so I add a fade in screen to hide those activities (which usually took 1 millisecond to carry out) in the background.

Wednesday, September 26, 2012

Project Green: Finishing a build

I admit, finishing a game is hard. 
Project Green is nowhere near finish yet, but I haven't make a single build in months. The latest playable build was 4 months ago if I'm not mistaken.