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!


Friday, January 28, 2011

Gadgets for Ineractivity

Howdy y'all. I know some of you (including myself actually) are interested in ways in which we can add a bit of interactivity to our digital media projects. This doesn't have to be extremely expensive. In most cases we can take a solution meant for a practical application and mold it into something that suits our needs. Thankfully, there is a lot of open source software on the net that can help us with this.

For motion sensing, it's possible to use a standard webcam in combination with free motion sensing software. For Windows I suggested Yawcam if you're doing something very simple - http://www.yawcam.com/

Yawcam is a simple but feature-rich program that is normally used as a security tool. But what's great about it is you can specify the program to execute an .exe file or play a sound. This could potentially be used to start up program that YOU created as someone passes by. How you write that program (or which program you use) is up to you.

If you're interested in a solution that gives you a little more creative freedom, you may want to try out Zone Trigger - http://www.zonetrigger.com/interactive-digital-signage/

The interactivity features in Zone Trigger were created with interactive advertising in mind. This is an expensive program at $250 (clearly meant for commercial use) but you're allowed to use the program free for 30 days. From the Zone Trigger site:

Simply connect a camera and put motion hot spots on the video image. These hot spots are bound to scripts that will be called when motion is detected. Each spot is independent and can call a different script. Advanced features allow even more complex navigation to create interactive applications.

Wooooow.

As with Yawcam, Zone Trigger can use a standard USB webcam as its input. A good quality webcam can be found at Amazon, Newegg, or pretty much anywhere that sells computer electronics. You shouldn't need to spend more than $30 on a webcam. Here's a Logitech cam that can record in 720p and take 5mp photos for under $30:

http://www.amazon.com/Logitech-Webcam-C310-Video-Photos/dp/B003LVZO8S/ref=dp_cp_ob_pc_title_3

And if you haven't already, JOIN AMAZON STUDENT! With your SOU email you'll have free two-day shipping and $4 overnight shipping on nearly any Amazon product for a year. It's perfect for this sort of thing.

http://www.amazon.com/gp/student/signup/info


Motion sensing is not the only form of interactivity you can provide an audience. You may also want to consider the numerous amounts of voice-command software out there as well as more physical devices like a keypad. Even a Dance Dance Revolution floor pad can be used to interact with your own program. Don't like the ugly DDR pad design? Just cover it up with your own work.

http://www.amazon.com/Multi-Platform-PS-PS2-Xbox-PC-Mac/dp/9752892698/ref=sr_1_1?s=videogames&ie=UTF8&qid=1296246108&sr=1-1

You can then use a keymapping program such as Total Game Control to map the dance pad inputs into mouse or keyboard strokes. You can even map an input to an event or complex string of keyboard inputs.

http://www.digitaltransforms.com/


Hopefully this post is insightful for some. I for one will be trying out Zone Trigger for my project. See everyone on Monday!

Friday, January 21, 2011

Project Timeline

One of the biggest road blocks I find myself coming across in working with an established organization like SOU is helping others see that my idea is good enough to spend school funds on. At the moment that is by far my largest concern. I will of course go ahead with my project regardless of the school's decision to fund it, but without the school's help I'll have to settle for a one-time show sort of deal. With that in mind, here is my timeline for the term:

1/26 - Come up with an initial proposal to those who could potentially help with funding. Address common concerns as well as those which people may not consider. How much money will this project require? How do we address energy-related concerns? What is the most cost-effective projector that suits our needs? Most importantly, how will this benefit EMDA and the university as a whole?

1/31 - Hopefully have a proposal submitted to the necessary people by this day. The proposal should be of professional quality complete with digital renderings of what the final product will look like. Meanwhile, work on some of the letter designs and familiarize with Flash.

2/2 - Most letter designs should be done by this day.

2/7 - Continue working. Regularly check up on proposal status. Beg for money on the street if necessary.

2/9 - Work

2/14 - The digital work should be completed by this date. I should also know by now whether or not a permanent installation is reasonable or not. If it is, consider ways in which we can make it interactive. Happy valentines day! As always, I'll be wearing green.

2/16 - Begin installation work and testing proof of concept. Thankfully I have a small projector at home that can help with this.

2/23 - Everything should be finished by this point. Final presentation any day after this.

As for my evaluation, I will be ready for one on or after 2/7

Sunday, January 9, 2011

CAS 399/ART 450 - Project Proposal

Howdy y'all. I just arrived in Phoenix, AZ (world's largest suburban shopping center) from Dallas, TX where I was visiting family. Tomorrow I'll most likely be going to the National Championship game but in the meantime I've been thinking a bit about my project for this course. Actually, I've been thinking about it for quite some time.

I currently work as professor Arellano's assistant in the EMDA center. Part of my job there is to think about ways in which we can improve the center and the EMDA program in general. Although the center itself is in an amazing location with a fantastic view of the campus, I feel the look could be improved in a way that really shows the physical side of digital media. The EMDA center has some fantastic tall bay windows which I would like to work with in order to create something that hasn't really been done on the campus before: Interactive window projections.

During one of our class sessions, professor Arellano used window projections as one of his project examples. I have also been thinking about how cool a projected image would look in the center's windows and would like to take it a step further. The bay windows at the EMDA center come out of the building at a 45 degree or so angle. Each side contains six window columns. At the center we decided that "|E|M|D|A|@|SOU (the school logo)| would be the most appropriate thing to project. To do this we will use four small projectors - one for every three window columns.

Rather than simply project a static image, I would like to do something much more unique. Each of the "EMDA" letters will have multiple unique designs done in a way similar to the "type" project in DMF 201. I can create these images myself initially, but in the future it would be more fun for people if we used work from DMF students. These letters will change every 15 to 30 seconds randomly to a new design.

If we have the resources, I would love to add one final touch. Since the bay windows are viewable from the path that leads to the SU, I would like to have some kind of buttons or pads alongside the path. Each button would correspond to a different EMDA letter and when pressed, the letter would change to a different design instantly (and perhaps flash to a different color very briefly for more of a visual impact.)

This project is going to involve a lot of variables. I will need to determine which projectors we need, where they need to placed, and any other things one might need to know about window projections. I will then need to create a lot of different letter designs, and figure out how to create a looping yet interactive video in Adobe Flash. Even if we do not have the funds or ability to make this thing interactive, I will still try to create something interactive. If the buttons or pads can't be used outside, we could certainly do it in the center.

Anyway, that's my proposal. I think it could be a really awesome addition to the EMDA center and would be one of the most unique visuals on campus after it starts to get dark. Hope everyone had a good weekend and I'll see everyone next week. Go Ducks!