Wednesday, December 06, 2006
COMPLETE!
The project is complete.
There are tweaks to be made, bugs to fix even now. But we are officially "released to the public". All features of the game have been implemented, gameplay, sound, 3d models, textures, etc.
All planned functionality has been implemented.
We are finished.
If you wish to get yourself a copy of the game, please post stop by my website: www.greyminds.com, or my partner's website:
digitalarts.bgsu.edu/portfolios/adamre, and dig up one of our e-mails and drop us a line.
There are tweaks to be made, bugs to fix even now. But we are officially "released to the public". All features of the game have been implemented, gameplay, sound, 3d models, textures, etc.
All planned functionality has been implemented.
We are finished.
If you wish to get yourself a copy of the game, please post stop by my website: www.greyminds.com, or my partner's website:
digitalarts.bgsu.edu/portfolios/adamre, and dig up one of our e-mails and drop us a line.
Saturday, December 02, 2006
Game screenshots
The finish line cometh...
I am done.
The game is done.
For all intents and purposes, it is fully functional.
Only audio remains to be added in with some minimal functionality so it runs on cue.
Look for screenshots soon.
The game is done.
For all intents and purposes, it is fully functional.
Only audio remains to be added in with some minimal functionality so it runs on cue.
Look for screenshots soon.
Friday, November 17, 2006
The AI
That morass of code was a snippet of the functionality for my in game enemy AI.
Crazy...
Crazy...
Some code...
var speed = 17;
var gravity = 10;
var layerMask = 1 << 8;
var e_rand = 0;
var timex;
var nextMoveTime = 0.0;
var d_counter = 0;
var moveDelay = 5;
var bloat_rand = 4;
var controller : CharacterController;
private var moveDirection = Vector3.zero;
function Update ()
{
var locn = -1;
var loci = -1;
var master_object = GameObject.Find("/MasterGO");
var master_script : MasterGOinit;
master_script = master_object.GetComponent (MasterGOinit);
var hit : RaycastHit;
var ehit : RaycastHit;
//var hit2 : RaycastHit;
var controller : CharacterController = GetComponent(CharacterController);
e_rand = Random.Range(1, 5);
e_rand = Mathf.Round(e_rand);
//bloat_rand = Random.Range(1, 4);
timex = Time.deltaTime * 10;
if (nextMoveTime == 0){
nextMoveTime = Time.time;}
if ((controller.collisionFlags & CollisionFlags.Sides) != 0){
master_script.burgerman = 0;
master_script.respawnb = 1;
counter = master_script.bcount;
counter --;
master_script.bcount = counter;
Destroy(gameObject);}
if (d_counter > 10){
master_script.burgerman = 0;
master_script.respawnb = 1;
counter = master_script.bcount;
counter --;
master_script.bcount = counter;
Destroy(gameObject);}
// if (!(controller.transform.position.x < -64 || controller.transform.position.x > 56 || controller.transform.position.z < -101 || controller.transform.position.z > 20)){
moveDirection.y -= gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime);//}
Debug.DrawRay (transform.position, Vector3.forward);
locn = master_script.opos[1];
loci = master_script.opos[0];
switch(0){
case 1:
loci++;
if ((master_script.mastergridx[loci] == 1 && master_script.mastergridy[locn] == 1) && !(locn > 8) && !(locn < 0) && !(loci > 8) && !(loci < 0)){
controller.Move(Vector3(-speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;
master_script.opos[0] = master_script.opos[0] + 1;}
break;
case 2:
loci--;
if ((master_script.mastergridx[loci] == 1 && master_script.mastergridy[locn] == 1) && !(locn > 8) && !(locn < 0) && !(loci > 8) && !(loci < 0)){
controller.Move(Vector3(speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;
master_script.opos[0] = master_script.opos[0] - 1;}
break;
case 3:
locn++;
if ((master_script.mastergridx[loci] == 1 && master_script.mastergridy[locn] == 1) && !(locn > 8) && !(locn < 0) && !(loci > 8) && !(loci < 0)){
controller.Move(Vector3(0, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;
master_script.opos[1] = master_script.opos[1] + 1;}
case 4:
locn--;
if ((master_script.mastergridx[loci] == 1 && master_script.mastergridy[locn] == 1) && !(locn > 8) && !(locn < 0) && !(loci > 8) && !(loci < 0)){
controller.Move(Vector3(0, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;
master_script.opos[1] = master_script.opos[1] - 1;}
break;
}
ehit = hit;
switch (e_rand){
case 1:
if ((Time.time > nextMoveTime) && Physics.Raycast((transform.position + Vector3(0,-15,0)),Vector3.forward,hit,10)){
Physics.Raycast(transform.position + Vector3(0,15,0), Vector3.forward,ehit);
if ((hit.collider.name == "NatureTile - 1(Clone)") || (hit.collider.name == "NatureTile - 2 - Smooth(Triangle)(Clone)") || (hit.collider.name == "NatureTile - 3(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(0, 0, speed));
nextMoveTime = nextMoveTime + moveDelay;}
Debug.Log("forward!");
}
else if ((hit.collider.name == "burgertime - Tile(Clone)") || (hit.collider.name == "oil_refinery - Tile(Clone)") || (hit.collider.name == "shoefactory - Tile(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(0, 0, speed));
nextMoveTime = nextMoveTime + moveDelay;}
}
}
break;
case 2:
if ((Time.time > nextMoveTime) && Physics.Raycast((transform.position + Vector3(0,-15,0)),Vector3.back,hit,12)){
Physics.Raycast(transform.position + Vector3(0,15,0), Vector3.back,ehit);
if ((hit.collider.name == "NatureTile - 1(Clone)") || (hit.collider.name == "NatureTile - 2 - Smooth(Triangle)(Clone)") || (hit.collider.name == "NatureTile - 3(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(0, 0, -speed));
nextMoveTime = nextMoveTime + moveDelay;}
Debug.Log("back!");
}
else if ((hit.collider.name == "burgertime - Tile(Clone)") || (hit.collider.name == "oil_refinery - Tile(Clone)") || (hit.collider.name == "shoefactory - Tile(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(0, 0, -speed));
nextMoveTime = nextMoveTime + moveDelay;}
}
}
break;
case 3:
if ((Time.time > nextMoveTime) && Physics.Raycast((transform.position + Vector3(0,-15,0)),Vector3.right,hit,10)){
Physics.Raycast(transform.position + Vector3(0,15,0), Vector3.right,ehit);
if ((hit.collider.name == "NatureTile - 1(Clone)") || (hit.collider.name == "NatureTile - 2 - Smooth(Triangle)(Clone)") || (hit.collider.name == "NatureTile - 3(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;}
Debug.Log("right!");
}
else if ((hit.collider.name == "burgertime - Tile(Clone)") || (hit.collider.name == "oil_refinery - Tile(Clone)") || (hit.collider.name == "shoefactory - Tile(Clone)")){
if ((ehit.collider.name != "mainman") && (ehit.collider.name != "shoeman(Clone)") && (ehit.collider.name != "burgerman(Clone)") && (ehit.collider.name != "oilman(Clone)")){
controller.Move(Vector3(speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;}
}
}
break;
case 4:
if ((Time.time > nextMoveTime) && Physics.Raycast((transform.position + Vector3(0,-15,0)),Vector3.left,hit,10)){
Physics.Raycast(transform.position + Vector3(0,15,0), Vector3.left,ehit);
if ((hit.collider.name == "NatureTile - 1(Clone)") || (hit.collider.name == "NatureTile - 2 - Smooth(Triangle)(Clone)") || (hit.collider.name == "NatureTile - 3(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(-speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;}
Debug.Log("left!");
}
else if ((hit.collider.name == "burgertime - Tile(Clone)") || (hit.collider.name == "oil_refinery - Tile(Clone)") || (hit.collider.name == "shoefactory - Tile(Clone)")){
if ((ehit.collider.name != "mainman") && (ehit.collider.name != "shoeman(Clone)") && (ehit.collider.name != "burgerman(Clone)") && (ehit.collider.name != "oilman(Clone)")){
controller.Move(Vector3(-speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;}
}
}
break;
}
}
function Awake ()
{
var controller : CharacterController = GetComponent(CharacterController);
if (!controller)
gameObject.AddComponent("CharacterController");
nextMoveTime = Time.time;
}
var gravity = 10;
var layerMask = 1 << 8;
var e_rand = 0;
var timex;
var nextMoveTime = 0.0;
var d_counter = 0;
var moveDelay = 5;
var bloat_rand = 4;
var controller : CharacterController;
private var moveDirection = Vector3.zero;
function Update ()
{
var locn = -1;
var loci = -1;
var master_object = GameObject.Find("/MasterGO");
var master_script : MasterGOinit;
master_script = master_object.GetComponent (MasterGOinit);
var hit : RaycastHit;
var ehit : RaycastHit;
//var hit2 : RaycastHit;
var controller : CharacterController = GetComponent(CharacterController);
e_rand = Random.Range(1, 5);
e_rand = Mathf.Round(e_rand);
//bloat_rand = Random.Range(1, 4);
timex = Time.deltaTime * 10;
if (nextMoveTime == 0){
nextMoveTime = Time.time;}
if ((controller.collisionFlags & CollisionFlags.Sides) != 0){
master_script.burgerman = 0;
master_script.respawnb = 1;
counter = master_script.bcount;
counter --;
master_script.bcount = counter;
Destroy(gameObject);}
if (d_counter > 10){
master_script.burgerman = 0;
master_script.respawnb = 1;
counter = master_script.bcount;
counter --;
master_script.bcount = counter;
Destroy(gameObject);}
// if (!(controller.transform.position.x < -64 || controller.transform.position.x > 56 || controller.transform.position.z < -101 || controller.transform.position.z > 20)){
moveDirection.y -= gravity * Time.deltaTime;
controller.Move(moveDirection * Time.deltaTime);//}
Debug.DrawRay (transform.position, Vector3.forward);
locn = master_script.opos[1];
loci = master_script.opos[0];
switch(0){
case 1:
loci++;
if ((master_script.mastergridx[loci] == 1 && master_script.mastergridy[locn] == 1) && !(locn > 8) && !(locn < 0) && !(loci > 8) && !(loci < 0)){
controller.Move(Vector3(-speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;
master_script.opos[0] = master_script.opos[0] + 1;}
break;
case 2:
loci--;
if ((master_script.mastergridx[loci] == 1 && master_script.mastergridy[locn] == 1) && !(locn > 8) && !(locn < 0) && !(loci > 8) && !(loci < 0)){
controller.Move(Vector3(speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;
master_script.opos[0] = master_script.opos[0] - 1;}
break;
case 3:
locn++;
if ((master_script.mastergridx[loci] == 1 && master_script.mastergridy[locn] == 1) && !(locn > 8) && !(locn < 0) && !(loci > 8) && !(loci < 0)){
controller.Move(Vector3(0, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;
master_script.opos[1] = master_script.opos[1] + 1;}
case 4:
locn--;
if ((master_script.mastergridx[loci] == 1 && master_script.mastergridy[locn] == 1) && !(locn > 8) && !(locn < 0) && !(loci > 8) && !(loci < 0)){
controller.Move(Vector3(0, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;
master_script.opos[1] = master_script.opos[1] - 1;}
break;
}
ehit = hit;
switch (e_rand){
case 1:
if ((Time.time > nextMoveTime) && Physics.Raycast((transform.position + Vector3(0,-15,0)),Vector3.forward,hit,10)){
Physics.Raycast(transform.position + Vector3(0,15,0), Vector3.forward,ehit);
if ((hit.collider.name == "NatureTile - 1(Clone)") || (hit.collider.name == "NatureTile - 2 - Smooth(Triangle)(Clone)") || (hit.collider.name == "NatureTile - 3(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(0, 0, speed));
nextMoveTime = nextMoveTime + moveDelay;}
Debug.Log("forward!");
}
else if ((hit.collider.name == "burgertime - Tile(Clone)") || (hit.collider.name == "oil_refinery - Tile(Clone)") || (hit.collider.name == "shoefactory - Tile(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(0, 0, speed));
nextMoveTime = nextMoveTime + moveDelay;}
}
}
break;
case 2:
if ((Time.time > nextMoveTime) && Physics.Raycast((transform.position + Vector3(0,-15,0)),Vector3.back,hit,12)){
Physics.Raycast(transform.position + Vector3(0,15,0), Vector3.back,ehit);
if ((hit.collider.name == "NatureTile - 1(Clone)") || (hit.collider.name == "NatureTile - 2 - Smooth(Triangle)(Clone)") || (hit.collider.name == "NatureTile - 3(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(0, 0, -speed));
nextMoveTime = nextMoveTime + moveDelay;}
Debug.Log("back!");
}
else if ((hit.collider.name == "burgertime - Tile(Clone)") || (hit.collider.name == "oil_refinery - Tile(Clone)") || (hit.collider.name == "shoefactory - Tile(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(0, 0, -speed));
nextMoveTime = nextMoveTime + moveDelay;}
}
}
break;
case 3:
if ((Time.time > nextMoveTime) && Physics.Raycast((transform.position + Vector3(0,-15,0)),Vector3.right,hit,10)){
Physics.Raycast(transform.position + Vector3(0,15,0), Vector3.right,ehit);
if ((hit.collider.name == "NatureTile - 1(Clone)") || (hit.collider.name == "NatureTile - 2 - Smooth(Triangle)(Clone)") || (hit.collider.name == "NatureTile - 3(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;}
Debug.Log("right!");
}
else if ((hit.collider.name == "burgertime - Tile(Clone)") || (hit.collider.name == "oil_refinery - Tile(Clone)") || (hit.collider.name == "shoefactory - Tile(Clone)")){
if ((ehit.collider.name != "mainman") && (ehit.collider.name != "shoeman(Clone)") && (ehit.collider.name != "burgerman(Clone)") && (ehit.collider.name != "oilman(Clone)")){
controller.Move(Vector3(speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;}
}
}
break;
case 4:
if ((Time.time > nextMoveTime) && Physics.Raycast((transform.position + Vector3(0,-15,0)),Vector3.left,hit,10)){
Physics.Raycast(transform.position + Vector3(0,15,0), Vector3.left,ehit);
if ((hit.collider.name == "NatureTile - 1(Clone)") || (hit.collider.name == "NatureTile - 2 - Smooth(Triangle)(Clone)") || (hit.collider.name == "NatureTile - 3(Clone)")){
if ((ehit.collider.name != "MCube") && (ehit.collider.name != "Scube") && (ehit.collider.name != "BCube") && (ehit.collider.name != "OCube")){
controller.Move(Vector3(-speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;}
Debug.Log("left!");
}
else if ((hit.collider.name == "burgertime - Tile(Clone)") || (hit.collider.name == "oil_refinery - Tile(Clone)") || (hit.collider.name == "shoefactory - Tile(Clone)")){
if ((ehit.collider.name != "mainman") && (ehit.collider.name != "shoeman(Clone)") && (ehit.collider.name != "burgerman(Clone)") && (ehit.collider.name != "oilman(Clone)")){
controller.Move(Vector3(-speed, 0, 0));
nextMoveTime = nextMoveTime + moveDelay;}
}
}
break;
}
}
function Awake ()
{
var controller : CharacterController = GetComponent(CharacterController);
if (!controller)
gameObject.AddComponent("CharacterController");
nextMoveTime = Time.time;
}
Thursday, November 16, 2006
Oilrefinery Tile Texture
These are the final textures that will be used for the oil refinery tile. There is only one more addition that I have to work on that has been unannounced onto the blog.. This will be updated soon.
- Adam
Monday, November 13, 2006
ShoeFactory Tile Texture
This is the Shoefactory Tile that I have been texturing lately. I only have one tile left and its the oil refinery. I will post more information soon as I finish.
- Adam
Sunday, November 12, 2006
Functional AI!
Corporate machinations are afoot!
The AI (well, it's not really AI...just an event driven script, but whatever) is functional!