Tuesday, June 7, 2011

Final Game + Other Things

A few hours late with this, but I wanted to add some things that I felt would improve it! I still need to update my blog with a couple other assignments from the class, which I will do very shortly.

My final game was constructed in a different fashion compared to most people's projects. Rather than use a separate ActionScript file, I did all of my ActionScript coding within each frame that required it. The code most definitely isn't as complex as what many have written, but when I discovered this method I thought it might be fun to see what I could come up with. The main benefit was that the player can go through various menus and pages without complex ActionScrip. The limitation is in complexity of gameplay.


The title of my game is called "MAZE!" and it's exactly that... two Maze levels that the player must navigate through using their mouse cursor without touching the walls. If the player touches the wall, it's game over and Jim Carrey will call the player a "pathetic loser." Once the player completes the first maze, the second one loads automatically. If the player makes it to the end of the second maze, Jim Carrey is much less mean but equally excited. Neither maze is MovieClip, but rather a button. When the cursor rolls over it, an action is triggered. In this case that action is calling in a new specific frame on the Timeline. A frame is frozen until an input is triggered using the "stop" command. Additionally, I animated a short intro that plays when the player first starts the game. The tune that goes along with it is two notes recorded in Garage Band on my iPad.

Link to Flash file:

https://sites.google.com/a/sou.edu/austin-gurwell-s-sfws/sfw-files/Maze.fla

Here is the ActionScript code broken up by frame:

Frame 1 ("Click..." screen):

stop();
import flash.events.MouseEvent;

firstButton.addEventListener(MouseEvent.CLICK, startIntro)
function startIntro (event:MouseEvent)

{
gotoAndPlay("frame1");
var c = new Jingle();
c.play();
}


Frame 61 (instructions):

stop();
import flash.events.MouseEvent;

startGameBTN.addEventListener(MouseEvent.CLICK, startGame)
function startGame (event:MouseEvent)

{
gotoAndStop("Level 1");
}


Frame 62 (Level 1):

stop();

borderLevel1.addEventListener(MouseEvent.MOUSE_OVER, runOverBorder)

function runOverBorder(event:MouseEvent)
{
gotoAndStop("End Game");
var a = new loser();
a.play();
}
endGame1.addEventListener(MouseEvent.MOUSE_OVER, endLevel1)

function endLevel1(Event:MouseEvent)
{
gotoAndStop("Level 2");
var c = new alrighty();
c.play();
}


Frame 63 (Level 2):

stop();
borderLevel2.addEventListener(MouseEvent.MOUSE_OVER, runOverBorder2)

function runOverBorder2(event:MouseEvent)
{
gotoAndStop("End Game");
var a = new loser();
a.play();
}
endGame2.addEventListener(MouseEvent.MOUSE_OVER, endLevel2)

function endLevel2(Event:MouseEvent)
{
gotoAndStop("Game Won");
var b = new theGame();
b.play();
}


Frame 64 (Winner screen):

stop();
restartBTN2.addEventListener(MouseEvent.CLICK, restartGame2)
function restartGame2 (event:MouseEvent)
{
gotoAndStop("Start");
}



Frame 65 (Loser screen):

stop();
restartBTN.addEventListener(MouseEvent.CLICK, restartGame)
function restartGame (event:MouseEvent)
{
gotoAndStop("Start");
}




Project 5: First Game






package {

import flash.display.MovieClip;
import flash.events.Event;
import flash.ui.Mouse;
import flash.media.Sound;

public class GameTime extends MovieClip {

//Global Variables
var player:MovieClip;
var ball:MovieClip;
var birdsArray:Array = new Array;
var vx:Number=0;
var vy:Number=0;
var maxAngle:Number;
public var speed:int;




public function GameTime()

{
// constructor code

//Make birds
makeBirds();

//Hide the mouse
Mouse.hide();

// Fill variables
player = new Snake;
ball = new Apple;
ball.vx = 5;
ball.vy = 5;
maxAngle = 15;
trace("Les do dis!!!");


//Add stuff to stage
addChild(player);
addChild(ball);

player.x = stage.stageWidth * .5;
player.y = stage.stageHeight * .85;
ball.x = stage.stageWidth * .5;
ball.y = stage.stageHeight * .1;

player.scaleX = .2;
player.scaleY = .2;
ball.scaleX = .15;
ball.scaleY = .15;



//event listeners
addEventListener(Event.ENTER_FRAME, onEnterFrame);

} //end constructor function

//Event Handler and other functions

function makeBirds():void

{
for (var i:int = 1;i>=0;i--){
var tempThing:MovieClip;
tempThing = new Thing();
tempThing.y = Math.floor(Math.random()*stage.stageHeight);
tempThing.x = Math.floor(Math.random()*stage.stageWidth);
tempThing.vx = 3;
tempThing.scaleX = .2;
tempThing.scaleY = .2;
trace("tempThing"+i+"vx = " + tempThing.vx);
trace("tempThing"+i+"vy = " + tempThing.vy);
addChild(tempThing);
birdsArray.push(tempThing);
}
}

function onEnterFrame(event:Event):void
{
{
// move things
moveThings();
moveThing(ball);
player.x = mouseX;
player.y = mouseY;
boundaryBounce(ball);
checkCollision(player, ball);
}

function moveThings():void
{
var tempThing:MovieClip;
for (var i:int = birdsArray.length-1;i>=0;i--){
tempThing = birdsArray[i];
tempThing.x -= tempThing.vx;


}
}

function moveThing(objectA:MovieClip):void
{
objectA.x += objectA.vx;
objectA.y += objectA.vy;
}

function checkCollision(objectA:MovieClip, objectB:MovieClip):void
{
if(objectA.hitTestObject(objectB))
{
objectB.vy = -objectB.vy;
objectB.vx = getCollisionAngle(objectA, objectB);
}
}

function getCollisionAngle(objectA:MovieClip, objectB:MovieClip):Number
{
//returns a new objectB.vy based on where objectB hits objectA
var relativeX:Number = objectA.x - objectB.x;
var relativePercentage:Number = (relativeX/objectA.width)*2;
if (relativePercentage > 1)
{
relativePercentage = 1;
}
if (relativePercentage < -1)
{
relativePercentage = -1;
}
var newVx:Number = -(relativePercentage * maxAngle);
// DEBUG CODE
if (objectB.x < 0)
{
objectB.x = 1;
objectB.y = objectA.y - 20;
}
if (objectB.x > stage.stageWidth)
{
objectB.x = stage.stageWidth-3;
objectB.y = objectA.y - 20;
}

return newVx;
}

function boundaryBounce(objectA:MovieClip):void
{ //STAGE COLLISIONS
if(objectA.x > stage.stageWidth || objectA.x < 0)
{
objectA.vx = - objectA.vx;
}
if(ball.y > stage.stageHeight || ball.y < 0)
{
objectA.vy = -objectA.vy;

}

}

}
}
}


Project 4: Animation Nation


Check it.















It's hard to recall three interactive events in my life that touched me the most. But I'll try.

1. Going to Disneyland for the first time when I was eight years old. Never in my life up to that point had I been able to interact with so many different fun, physical, real things. Disneyland has been dumbed down a bit over the years, and I was lucky enough to have had the chance to see Tom Sayer's Island in its fully open, explorer-friendly form.

2. Playing Grand Theft Auto III for the first time. This was back in my middle school days. The PS2 had just come out and people were unsure of what GTA3 would be. I hadn't been following the game closely before its release and rented it after it came out. Love at first car jacking. Never had I played a game that offered so much freedom to the player and with such amazing humor. I quickly bought the game and for weeks my friends and I talked about nothing but GTA. "So what did you do in GTA last night?" "I hit an old lady in the face with a baseball bat."

3. Dark Brotherhood quest in ESIV Oblivion where you're locked in a house full of people you need to kill. This quest in Oblivion made me really appreciate the amount of work that goes into games that most people will overlook and never see again. The quest begins with the player entering an old manor. The owner has set up a "contest" for some acquaintances he needs to get rid of. He has told them that treasure has been hidden somewhere in the house but that nobody can leave until it's found. The player assumes the roll as one of the contestants but must kill each person. What's amazing about this quest is it can be done in literally DOZENS of ways and each one is totally different. If you make friends with someone in the house, they will be more likely to suspect someone else of a murder instead of the player. And if they're convinced they know who the murderer is, they'll attack that person. Depending on the friends or enemies you make within the house, it's different every time.

There are probably much more significant events than these but these are what came to mind.

Wednesday, April 20, 2011

Project 3: Collage Via Code






Constructor code:

package
{

import flash.display.MovieClip;
public class Main extends MovieClip
{
//Declare variable here - STEP ONE
var world:MovieClip;
var welcome:MovieClip;
var welcomeA:MovieClip;
var lazer:MovieClip;

public function Main() //constructor funcion
{
// constructor code
trace("Welcome ta Earf");

//Fill variables here - STEP TWO
world = new Earth; // Fill variable named space with new instance of Lazer
welcome = new Welcome;
welcomeA = new Welcome;
lazer = new Lazer;

// addChild to stage - STEP THREE
addChild(world);
addChild(welcomeA);
addChild(welcome);
addChild(lazer);

//Specify properties of the child - STEP FOUR
world.x = 160;
world.y = 125;
world.scaleX = .4;
world.scaleY = .4;

welcome.x = 400;
welcome.y = 350;
welcome.scaleX = .5;
welcome.scaleY = .5;

welcomeA.x = 410;
welcomeA.y = 360;
welcomeA.scaleX = .5;
welcomeA.scaleY = .5;
welcomeA.alpha = .3;

lazer.x = 400;
lazer.y = 100;
lazer.scaleX = .7;
lazer.scaleY = .7;
lazer.rotation = 30;

}

}

}


When most people see a list of game development roles, they think of how awesome it would be to be a game tester. The reality though, as many will attest to, is that it's absolute hell and one of the most tedious tasks one can perform. The thrill of playing a game that the rest of the world doesn't even know about is quickly purged by the mundane task of reporting bugs and glitches... and there are A LOT of bugs and glitches in pre-release software.

So it's clear that I definitely do not want to be a game tester. Maybe if it were for a developer like Rockstar North, but how many Imagine: Babiez and Barbie Horse Adventure titles would you need to slog through before being hired to test the next Grand Theft Auto?

The best role for me as a member of a game development team would be an artist. Specifically, 3D modeling and texturing sounds like the most interesting to me. I feel that it would be much more rewarding to see your 3D models on screen than to know the game is less glitchy because of my bug reports. I did a little bit of 3D modeling with Solid Works (a CAD program designed for mechanical engineers) and I found myself creating things totally unrelated to engineering. Guns, brass knuckles, etc.

Project 2: Collage








More to come...


It's no question that Miyamoto was and still is a legend within the game industry. What makes him unique and an excellent game designer in my opinion is his passion for fun, family-oriented games that stand up against the modern "heavyweights" like Call of Duty, Halo, Grand Theft Auto, etc. His games are proof that you don't need to shoot people to have fun. And while I and many others disagree with the some of the hardware design choices and lack of "core" titles from Nintendo, Miyamoto still manages to impress time and time again.

The article discusses Miyamoto's fascination with caves when he was young and how that translated into some of his game design. I think that's a pretty good model to follow. There are tons of elements from places I've been and experiences that I've had that could translate into a game or some aspect of a game. When I was in high school, I also wanted to create a virtual replica of the school using the Source engine. Who knows, maybe someday I still will!

Sunday, April 3, 2011

DMF 203 Symbols

Here they are!




Favorite Non-Computer Game

My favorite non-computer game is the board game Monopoly. There are a ton of really amazing board games out there today, but perhaps I can attribute my love for this game to exposure I had to it when I was really young. Almost everybody grew up playing Monopoly with their family, and I'm no exception. The rules are easy to understand, the goal is clear, and there is a lot of decision making required throughout the game. There are tons of different incarnations of Monopoly, but the original (Board Walk, Park Place, etc) is generally what comes to mind. The property names and colors along with the unique playing pieces (I'm always the car!) have become very iconic over the years.

The game I create probably won't have anything to do with Monopoly. However like in Monopoly, I will try to give it iconic elements that aren't overcomplicated and will stick in the minds of players. A Flash game should be very "pick up and play." As soon as you over-complicate it, you lose the people who would rather be playing Call of Duty.

Sunday, February 27, 2011

Final Presentation and Self-Evaluation

The type of project I worked on this term (and will continue to work on) is the installation of unique "digital signage" at the EMDA center. This project combines digitally produced images, the latest in projection technology, and a large, physical space to create a dynamic "EMDA @ SOU" holographic projection display visible to anyone walking by the center. Although I had originally planned to have an interactive version of the letters ready by now, I vastly underestimated the difficulty of creating a small interactive Flash program. Thankfully, I will be taking DMF 203 in the spring and will have a much better understanding of Flash. The greatest challenge for me during the course of this project has been researching and putting together a project proposal in order to obtain funding. Although we know exactly what components we need for the project to work, the proposal is only just starting to make the rounds and we may not know for a while whether or not we will receive funding. Of course, I didn't want this to stop me from working. To test our theory and to provide a proof of concept, I ordered a sample of the clear holographic projection film that we plan to use on a large scale. We won't be able to create the final dynamic video feed until we actually receive the projectors we need, so I created several simple concept looping video feeds. The first was used to show what a range randomly changing type faces would look like forming "EMDA." The second set of videos used our clear screen sample as the canvas. We borrowed a projector and and were able to project a video feed into the window with changing letters followed by the EMDA logo. As you can see by the image below, the EMDA logo shows up very brightly. It isn't as bright when viewed from a wide angle, but the impact should be very apparent when we increase the scale of the projection.


Here is a video of the short loop projected onto the sample. It's backwards because it is projected from behind the screen:


Although I was not able to accomplish everything I set out to do in one term, I worked very hard on my research and concept material. The only thing holding me back from fully completing the project is money. However, everyone so far who has seen my proposal and concepts seems to be on board and thinks it will be a very unique attraction on campus. I sincerely hope that those capable of providing funding will not only see a very cool artistic installation, but an opportunity to get students interested in the EMDA program. Thanks to everyone (especially Professor Arellano) who has helped with and supported this project and I look forward to completing it in the weeks to come!

Thursday, February 17, 2011

Project Proposal for the Higher-Ups

Here is a version of my project proposal. I will be changing a few things about it. It's different from the one we did in this class in that it's intended for those who will decide to fund or not fund this project.









Monday, February 7, 2011

Artist's Rendering



Here is a Photoshop composition that should give an idea of what my window projections could look like. I'm not expecting them to be this bright during the day, but they'll really come alive at night. Keep in mind that the letters were change to a different design either on a time scale or via some kind of input.

I would like this to fit in well with the design of the building. I don't want it to jump out at people, so to speak. That said, it will be unlike anything most people have seen on campus and will certainly get the eMDA word out there!