Showing posts with label Unity 3d. Show all posts
Showing posts with label Unity 3d. Show all posts

Sunday, 29 June 2014

Penalty shoot-out using Unity3D

Hi

I have made this game prototype on the weekend . Kindly let me know if you think it needs other modification.





It basically works without gravity and new ball is spawned on the same position once it is is kicked using a gesture. I know it's a rough one but it can convey the gist of the project. :)

Here you can download the project : Link

Sunday, 15 June 2014

FPS in progress

Hi everyone,

I have been working on a multiplayer FPS for handheld devices lately. Its a personal project . I am making it using unity 3D and photon cloud.
Here are the screenshots





Tuesday, 28 January 2014

Endless Runner(Part 2)


Ok time to get your hands dirty with code. In game we will have small class to represent cell properties.We will be doing most of the code in one script(Using JS). Lastly I am not saying it is the best approach which I will share, this is what I know there could be better other solutions too.

Create a new JS script name it GameController . First of all we will declare few enumeration type variables for representing directions and type of cell.


enum direction { N, E, W, S, NS, EW}
enum cellType {run,jump,jumpObstacle,duck,left,right}


now create an inner class in GameController name it "CellProperties".  It will hold the information about the cell that will be displayed on screen. The member variables in class will be position,dir,type,model,neighbours,coins,spikes and visited bool.

class CellProperties

{

var position:Vector3;
var dir:direction;
var type:cellType;
var model:GameObject;

var neighbourN:CellProperties;
    var neighbourE:CellProperties;
    var neighbourW:CellProperties;
    var neighbourS:CellProperties;
    var visited=false;
    var coins = new ArrayList();
    var spikes = new ArrayList();
    
    function setValues( cPosition:Vector3,  cDir:direction, cType:cellType)
    {
   
    this.position  = cPosition;
this.dir = cDir;
this.type = cType;
this.neighbourN = null;
this.neighbourE = null;
this.neighbourW = null;
this.neighbourS = null;
    }

};

This is the structure of cell class. In next part I will setup the scene and make the prefebs for the cells. 
Thank you.

Here you can find the source code : https://dl.dropboxusercontent.com/u/79608708/CellClass.js