Think twice, code once.

About Me

My name is Daihua Ye. I have been living in the United States for four years since I immigrated from China in 2007. After I came to the United States, I know my life is going to change significantly. First of all, I am able to choose Computer Science as my major in college. During the days living in the United States, I am always dreaming I can create a social and innovational game for people to play. There will be one day my dream is going to be reality. Right now, I am spending my time working on learning Unity3d software and other 3D models software. Until now, I have published a few free browser games in Google chrome stores. In the future, I will make more exciting games. Enjoy!


Portfolio

My Projects will add to here!

Close Project

World Life Expectancy

One Page Website to show the life expectancy from 1800 to 2010 using Gapminder Database to show the result of how people expect for their life.

Credit: webgl globe project

Link to the webpage: World Life Expectancy

Close Project

Gromunity

Gromunity is an online community for sharing and trading with your own garden’s crops, helping out your neighbor, and helping rid your community of food waste. We hope that it will help you localize your food sources and simplify your life, so you finally don’t have to worry about where your produce came from. Happy farming and bon appetite.

The project is designed and implemented by Aiden, Alex, Alex, Jae, Jake and Me.

The project is created in CleanWeb Hackathon Event. In the event, we only have about 24 hours to complete the application. But we did it. The website is created in Ruby on Rails. Right now, I am going to maintain the website and create tests for website. Even though everyone can view the website, the application does not complete and not to be ready for public usage. We are not taking any responsibility for everyone who use our sites for commercial purpose.

Close Project

Tool Managment

Click here to Run Time Project

Developer: Daihua Ye

Time Frame: From August 15th to August 26th

Project Detail:
This is the a simple project that is learned how to write scripts for creating folders, prefabs and managing time in unity. It is very handy tools for enhancing the development more effective.

1. Tool: “Make Folders” ( Alt + Shift + F ) — Folder Structure of my personal favor
Scripts
Scenes
Audios
Textures
Prefabs
Meshes
Materials
Fonts
Resources
Packages
Physics
Project Description
Editor // must be created by hand at the beginning.

2. Tool: “Make Prefabs” ( Alt + Shift + P )
Created multiple Prefabs based on objects selected in the hierarchy interface. The game objects will be replaced by a instant object of the new prefabs.

3. Tool: “Make Material From Texture” ( Alt + Shift + T )
This tool is to create a material from a selected texture. And the new material is applied the name of texture to the material. The material will be placed inside Materials folder. If there is a existed material with the same name, it will prompt a caution to ask user whether it should replace it.

// Generate the material for the selected Texture
@MenuItem("Project Tools/Make Material From Texture &#_t")
static function CreateMaterials ()
{
	var assetLocalPath : String = AssetDatabase.GetAssetPath ( Selection.activeObject );
	var materialPath : String = "Assets/Materials/material " + Selection.activeObject.name + ".mat";

	if ( AssetDatabase.LoadAssetAtPath ( materialPath, Object ) )
	{
		if ( EditorUtility.DisplayDialog ( "Caution", "Material already existes. Do you want to overwrite?", "Yes", "No" ) )
		{
			CreateNew ( materialPath );
		}
	}
	else
	{
		CreateNew ( materialPath );
	}

}

// create a new material and assign the texture to the material
static function CreateNew ( materialPath : String )
{
	// create a new material with Diffue shader
	var material : Material = new Material ( Shader.Find("Diffuse" ) );

	material.mainTexture = Selection.activeObject;

	AssetDatabase.CreateAsset ( material, materialPath );

	// checking the existence of object
	if ( AssetDatabase.GetAssetPath ( material ) )
	{
		print ( "Material Create!" );
	}
	else
	{
		print ( "Fail to create the material" );
	}

}

4. Tool : “Make Materials From Objects” ( Alt + Shift + M )
The tool is for me to speed up the process of setting up the development environment. According to previous labs, each object has its own material. As the number of objects go up, the tool will save time of creating materials by hand. The main function of the tool is to created multiple Material based on the objects selected in the hierarchy interface. Also, the objects are assigned with the new materials. Also, there is caution while finding a material with the same name.

// Generate the materials for the selected Objects

@MenuItem("Project Tools/Make Materials From Objects &#_m")
static function CreateMaterials ()
{
	var selectedObjects : GameObject[] = Selection.gameObjects; // selection from the scene view

	for ( var go : GameObject in selectedObjects )
	{
		var name : String = "material " + go.name;
		var localPath  = "Assets/Materials/" + name + ".mat";
		if ( AssetDatabase.LoadAssetAtPath ( localPath, Object ) ) // check whether it exist the same material
		{
			if ( EditorUtility.DisplayDialog ( "Caution", "Material has already existed, Do you want to overwrite?", "Yes", "No" ) ) // choose whether it should replace it
			{
				createNew ( go, localPath );
			}
		}
		else
		{
			createNew ( go, localPath );
		}
	}
}

// create a new material and assign the material to the Object
static function createNew ( selectedObject : GameObject, localPath : String )
{
	var material = new Material ( Shader.Find ( "Diffuse" ) );	// create a new material with Diffue shader

	AssetDatabase.CreateAsset ( material, localPath );			// Create a new material asset

	selectedObject.renderer.material = AssetDatabase.LoadAssetAtPath ( localPath, Object );		// assign the new material asset into the material of object

	// checking the existence of object
	if ( AssetDatabase.GetAssetPath ( material ) )
	{
		print ( "Material Create!" );
	}
	else
	{
		print ( "Fail to create the material" );
	}

}

Final Thought:
According to personal development experience, making this tool is to save time of clicking and typing. At the same time, these lab help me know more about the Editor API inside Unity. It definitely benefit me on customizing the Editors for future development.

Software Used: Unity 3.4

Time Spending:
Research : 3 hours
Art: 0 hours
Design : 5 hours
Coding: 7 hours
Play Testing: 3 hours

Credit:
walkerboystudio Lab: Unity Project 3 – Unity Tool Development

Close Project

2D Shooting Game

The game is created by UNITY 3D.

Click here to play the game 

Developer: Daihua Ye
Time Frame: From Aug 11st to Aug 13th

Project Detail :
What I did in the game was not only following the video tutorial to do all the code for exercises, but also have done three of Extra Credits, change the player into spaceship model and add some GUI to indicate the shield existing time and number of strength.

Add a pickup item for double shot :
Create a new prefab called “double shot item” with the script, controlling its moving and collision. When it collides with player, it will change one of variables in player script to active the double shot function.

Extra Socket to Fire With :
Create two new positions based on the socket projectile position. Using two new position to create two bullet.

Random Variables
Random Speed for Asteroids :

First, create a new boolean variable for detecting the speed with default value — false.
Second, In the ResetEnemy(), change the value to true, because every time it reset the value, it need recraete the random valuable for speed.

It is same for Random Scale.

Extra Credit :
Pickup Item for Lives :
Create a new game object for the item, it is similar to create a pickup item for double shot.
Player Feedback (Player Flashes if Hit) :

In the “script player”, create a CountDown function to subtract the flashing time and change the color of the game object. In the Update function, having a condition statement for calling InvokeReapeating function. The condition variable only is true when the asteroid hit the player.

Levels :
Create a new scene for selecting the levels and assign the string to sceneManger with the level player selected. When the level is assigned, it will be used in asteroid’s script for determining what kind of range of speed or scales when it create the asteroids.

Software Used: PhotoShop CS5, Unity3d

Final Thought :
This project enhanced the collision detection and using GetComponent to change the variables or call functions between two different game objecs. In addition, I find the necessary comments are important when I go back to read the codes. Every time, the comment will increase my performance of editing the codes to add more functionalities.

My Time Spending :
Setup: 15 mins
Assets: 20 mins
Player: 30 mins
Enemy: 25 mins
Menus:  45 mins
GUI: 45 mins
Build: 10 mins
Review: 30 mins
Exercise
Research: 1.5 hrs
Art: 30 mins
Design: 2 hrs
Coding: 5 hrs
Play testing; 1 hr
Debuging: 1 hr

Total Hours For Lab 2: 14.7 hours

Credits:
walkerboystudio Lab: Unity Project 2 – 2D Space Shooter

Close Project

Space War

The space war is the 2.5D shooting game, which is created by UNITY 3D.
It is similar to gradius and start war fighting game. The game only have
one level and one boss. You can pause the game during the play and
great music to hear.

here is the link to my Chrome Store for this game: goo.gl/dPZqm

Also, let teach you how to play:
you can use the arrow keys in your keyboard.
(Also, the up(w), down(s), left(s), right(d)).
When you holding the left key of the mouse is shooting.
Close Project

Tetris Game

The game is written in javascript. The blocks are draw in canvas in html5.
No flash!

Chrome Store Link: goo.gl/tMeIw

New Feature in 1.1.1 (update on March 31th 2011)
#1, projection for block.
#2, add two short-cut keys, when you press "P" key to pause the game, and "R"
key to restart the game.

Update in version 1.2.1 ( update on April 6th 2011)
#1, Create a pause and game over scene
#2, fix the bug that projection block will not over draw on visible block
#3, fix the bug that when user use space bar, the block  will not move
when it is in the ground.
#4, fix the bug that, when block appears, it will not have space
between the top.
Close Project

Point And Click

Game made in Unity3d software.

Here is the Link to play the Game: goo.gl/1m6Hu

Developer: Daihua Ye

Project Detail:

A high speed challenge mouse clicking game. Using the mouse, click on 4 different shapes by one click or two click to destroy as many as you can in 20 sec. The bottom line for winning the game is 13 points. All shape is worth 1 point. One click explosion of shapes are the Capsule and sphere. Two click explosion of shapes are square and triangle.

Exercise Note:
For Blinking Sphere:
The code are in scriptEnemy.js:
Few new variables:
var flashingTime :float = 3.0; // the time for flashing
var isShpere : boolean; // check whether the shape is sphere

In the update function, after you check the click, you check the isShpere is true or false, when it is true, call FlashingSphere function, starting to call InvokeRepeating(“flashing”, 0.2, 0.2) and set the collider.enabled = false because you don’t want the sphere is clickable, and also pause the time using yield WaitForSeconds(3.0); For the flashing() function, I just change the shape’s color every 0.2 seconds.

Moving Cube
I create a new script attack to the MoveCube object. In the script, I use Random.Range to create random path and transform.Translate to make the shapes move. There is two conditions happening in the update function. When it reaches the edge of screen of x axis, its transform.position.x *= -1. Similarly, when it reaches the edge of screen of y axis, its transform.position.y *= -1.

Random Spawn Time
Use the condition to check whether it is a sphere. If it is, assign the new random spawn time to WaitForSeconds. If not, assign the default one.

Extra Credit:
I use transform.RotateAround to make the sphere and Capsule to move in a cricle.
Just one line of code in the Update function:
Transform.RotateAround(Vector3.forward, Vector3.back, speed*0.05);

Software Used: Untiy3d 3.4, Cinema 4D.

Final Thought:
The GUI Label has no much to make the font the way I want. Next time, I may want to try out the 3D Text for MainMenu. In addition, for optimizing the coding, I thought we can create a class called Enemy for the shapes, because there are 4 different shapes and they have some base properties attached to them.

Breaking My Time:
Setup: 8 mins
Assets: 40 mins
Player: 35 mins
Enemy: 25 mins
Menus: 20 mins
GUI:  30 mins
Build: 10 mins
Review: 20 mins

Exercise:
Research: 1 hours
Coding: 3 hours
Debug: 1 hours

Total Time to complete the Lab is about 8 hours

Credits:
walkerboystudio Lab: Unity Project 1 – Point and Click

  • World Life Expectancy

    World Life Expectancy

  • Gromunity

    Gromunity

  • Tool Managment

    Tool Managment

  • 2D Shooting Game

    2D Shooting Game

  • Space War

    Space War

  • Tetris Game

    Tetris Game

  • Point And Click

    Point And Click

Contact Me