Thursday, May 10, 2007
Bunch of Pictures!
Lots of images have been made during the home stretch. Kinda happens with crunch time and everything. So I had made a list of all of the objects that I had needed to make. Slowly but surely I had finished all of the objects. Here’s a couple of the examples of the images.

Ok, so it does look like she has no body, but she’s the guidance counselor and she’s just put behind a desk, so to make it easier for me, she has no legs included. Also, at the very end, there had been a problem with trying to get the main character to be a boy or a girl, and then have the customizing actions with it, so sadly you won't see the girl in this. She'll have to be added in the next installment.

This is the school hallway. It’s career day here and you have to go and visit the counselor today. When you go and see her, you’ll have to choose an elective. For this entry I’ll show you the track for Music Appreciation.

So when you pick your class, you’re sent to the classroom. You hang out here and talk with your teacher a bit. Depending on how well you do in the class, you can get your dream job.

If you are successful, you’ll become a Recording artist. As of right now, there’s no more after you get your dream job, but hopefully in the future we can add more branches and create a larger story. Possibly make more animation happen within the scenes.

Ok, so it does look like she has no body, but she’s the guidance counselor and she’s just put behind a desk, so to make it easier for me, she has no legs included. Also, at the very end, there had been a problem with trying to get the main character to be a boy or a girl, and then have the customizing actions with it, so sadly you won't see the girl in this. She'll have to be added in the next installment.

This is the school hallway. It’s career day here and you have to go and visit the counselor today. When you go and see her, you’ll have to choose an elective. For this entry I’ll show you the track for Music Appreciation.

So when you pick your class, you’re sent to the classroom. You hang out here and talk with your teacher a bit. Depending on how well you do in the class, you can get your dream job.

If you are successful, you’ll become a Recording artist. As of right now, there’s no more after you get your dream job, but hopefully in the future we can add more branches and create a larger story. Possibly make more animation happen within the scenes.
Final Summary Post
The other blogs posted pretty much summed up the process that we went through to work on the project. Nick set up the basic code that ran the game as a whole, Kirsten developed the graphics, and I was responsible for meshing the pictures and code together. Over the past few weeks, the only things added to the game were content related, except for Nick's saving and printing features.
One primary difference in the final game that did not exist earlier is the existence of states on various movie clips in the game. I developed a better understanding of how to use them, and it has added a nice customization to the game. Now, you can change how the main character looks, and choose items in the game that stay with you throughout. The story in the final game has expanded, and sound effects have been added in various locations.
At this point, the game ends when you have reached your "dream career", but what is nice about the game is that it has such an easy potential to grow further. Being that the game exists in one frame, and has scenes called up and made on the fly, there is no limit to how far the adventure can go. If we had even more time with the project, then it could grow to new scenes, and the current scenes could have more branching.
One primary difference in the final game that did not exist earlier is the existence of states on various movie clips in the game. I developed a better understanding of how to use them, and it has added a nice customization to the game. Now, you can change how the main character looks, and choose items in the game that stay with you throughout. The story in the final game has expanded, and sound effects have been added in various locations.
At this point, the game ends when you have reached your "dream career", but what is nice about the game is that it has such an easy potential to grow further. Being that the game exists in one frame, and has scenes called up and made on the fly, there is no limit to how far the adventure can go. If we had even more time with the project, then it could grow to new scenes, and the current scenes could have more branching.
Wednesday, May 9, 2007
Final update
Here is the source code for our project, broken down into three files:
The code from the fla itself
contains the bulk of the implementation. Mostly commented: Main.asThe package Story, which contains:
The Action class
responsible for pattern matching, callbacks, scene linking and transition text storage. Fully commented: Action.asThe Scene class
responsible for getting actions from inputs, relating to multiple actions, callbacks and scene text storage. Fully commented: Scene.asThursday, May 3, 2007
Printing System
Printing was my final task for the project and I finally finished it. Printing in flash is somewhat annoying, because flash has no page-based architecture. In other words, the task of defining any structure for prints is left entirely to the programmer. In my case the process works something like this:
1) Prompt user for printing
2) Rearrange horizontal movieclips into grid using this algorithm:
Where printW and printH represents the size of each frame to be printed.
3) When the current column extends past the available page size, add a page break into an array
4) Loop through the page break array, adding pages to the print queue based on the current value and the next value
5) Restore the movieclips to horizontal positioning
6) Send print job to printer
The commented source code will be posted as part of the complete source.
1) Prompt user for printing
2) Rearrange horizontal movieclips into grid using this algorithm:
col = frameNumber%columns;
row = floor(frameNumber/columns);
mc._x = col*printW;
mc._y = row*printH;Where printW and printH represents the size of each frame to be printed.
3) When the current column extends past the available page size, add a page break into an array
4) Loop through the page break array, adding pages to the print queue based on the current value and the next value
5) Restore the movieclips to horizontal positioning
6) Send print job to printer
The commented source code will be posted as part of the complete source.
Monday, April 23, 2007
Sound frustration
Our frustration with sound is finally over (hopefully). Craig and I worked in class today and were able to come to a solution with the sound problems.
The issue was that as the game ran, the sounds would loop over top of each other creating a terrible noise. Worse yet, when the user moved off of the frame with sounds, they would keep playing. Telling the movieclips to stop didn't help.
The solution was to change the sound sync mode to "stream" which forces the sound to sync with each keyframe. It's designed for sounds loaded at runtime, but it works for what we need it to.
The solution for stoping the animation is to loop through all of the movieclips contained in the current frame, stop them, then update the next frame. This should also improve performance for long story paths.
The only downside is that now we need to extend our animation loops to incorporate the required sound timing, but this is a small price to pay considering we finally got the thing to work.
The issue was that as the game ran, the sounds would loop over top of each other creating a terrible noise. Worse yet, when the user moved off of the frame with sounds, they would keep playing. Telling the movieclips to stop didn't help.
The solution was to change the sound sync mode to "stream" which forces the sound to sync with each keyframe. It's designed for sounds loaded at runtime, but it works for what we need it to.
The solution for stoping the animation is to loop through all of the movieclips contained in the current frame, stop them, then update the next frame. This should also improve performance for long story paths.
The only downside is that now we need to extend our animation loops to incorporate the required sound timing, but this is a small price to pay considering we finally got the thing to work.
Thursday, April 19, 2007
Saving
This week I got saving working, the processes is a bit convoluted, but it works:
1. The Story.Scene class was amended to add a private array of scene references. This array is static in the class, in other words it is a constant as the program runs.
2. As each scene is instantiated, it is added into the array of scenes, and each instance is added an id that corresponds to the array index.
3. When saving (SharedObject class), the id of the current scene is saved as a number. The state object can be saved normally, as it is a native data type.
4. When opening the program, if the SharedObject exists, it is used to begin the story, if not, the default beginning state is used.
All that's left for me to do is work on printing at this point. So my timeline is looking good.
1. The Story.Scene class was amended to add a private array of scene references. This array is static in the class, in other words it is a constant as the program runs.
2. As each scene is instantiated, it is added into the array of scenes, and each instance is added an id that corresponds to the array index.
3. When saving (SharedObject class), the id of the current scene is saved as a number. The state object can be saved normally, as it is a native data type.
4. When opening the program, if the SharedObject exists, it is used to begin the story, if not, the default beginning state is used.
All that's left for me to do is work on printing at this point. So my timeline is looking good.
Monday, March 26, 2007
Text with BETTER GRAPHICS
Today we finally put in some higher quality graphics into the text game, and made sure that the tweens between the states of the objects such as the door also worked. This proved to be an exciting moment, because now all that is needed is to create the flash levels as we want to see them, and rename them so that flash will call up the new rooms. The progression of the completed scenes related to the story also moved further along this week.
Monday, March 19, 2007
Finalizing interface
Over break I've been working on getting the interface to accurately mimic our concept sketch. The big task is integrating the text into the story flow, and setting up masking on the images so they don't overflow into other frames. Should have something to show on that soon.
New scenes
I was working on some of the story linkage of the game during Spring Break, and added a new scene for the school, guidance counselors office, and the hospital. I havent linked in the pictures of these rooms into the game yet, but Kirsten should have most of the graphics done and it will be pretty simple to link them together.
Monday, March 5, 2007
Midpoint Version
With an updated interface and some placeholder graphics we have begun to develop the story and are showing off some of the animation potential for our story platform.
Available on my website here
Available on my website here
From Sketch to Rough Flash
I was able to make a version of the bedroom that we might use for the flash game. I'll definitely be adding to it, but here's something for now.

I also created an idea of how the setup will look for the game. After talking with Nick about what we need for the screen, I put together a quick setup for how everything should be put together. There will be foward and back buttons, to allow the user to go and look at different parts of the story if they want to. The scene box will have the graphics, and there will be the dynamic and static text boxes as well. All of these should work seemlessly together.
I also created an idea of how the setup will look for the game. After talking with Nick about what we need for the screen, I put together a quick setup for how everything should be put together. There will be foward and back buttons, to allow the user to go and look at different parts of the story if they want to. The scene box will have the graphics, and there will be the dynamic and static text boxes as well. All of these should work seemlessly together.
I am running behind on getting the graphics together. Everything is still in the developing stages, and barely any of it is in flash. Over spring break, I'm hoping to get at least 90% of the graphics done. Everything else has come together for the project, so now I really need to step up and get this done.
Monday, February 26, 2007
Making Actions Work
This week I began importing the story choices i developed last week into the Flash actionscript, so when certain key words were typed, the proper outputs were called. Once the graphics are named appropriately, they will also be called and change their state based on the user input. I hope to have the triggers set up entirely for game for next week, so then our primary concern will be to get the graphics into the game.
Story Actions
I meant to put this up last week, but must have gotten side tracked and didnt get around to it. Last week i worked on specifics of level interaction and choices that would be typed into the actionscript of the game and get certain outputs. I didnt complete every room, but covered enough of a chunk to demonstrate how it would work.
The indents indicate the actions the user can select, and ones with an * are actions that do not need to be performed to advance the story. Each room number has a basic description of the appearance of that room.
ROOM 1 (bedroom) –room with bed, dresser, window, desk w/various objects, tv perhaps, stereo, that kinda thing. Gender specific clothes lying around.
You find yourself in bed. What would you like to do?
Get up
Stay asleep
(Stay asleep)
You continue to sleep forever…
(Get up)
You should probably get dressed for the day. Do you want to carefully pick your clothes out, or just put on anything?
Pick clothes
Put on anything
(Pick clothes) –assign “neat” characteristic to character
(Put on anything)-assign “lazy” characteristic to character
You see three objects in the room, a baseball bat, an orange, and a remote controller. Careful, you can only choose one to take with you.
(These objects will be used later, but be used in different ways.)
Maybe you should brush your teeth…
*Brush teeth
(Brush teeth) – positive interaction with member of opposite sex later in game
(Don’t Brush) – negative reaction with member of opposite sex
Leave Room
ROOM 2 (hallway) –generic hallway with portraits on the wall resembling your character. Stairs leading down can be seen halfway across the screen. Parent in the hallway there to greet you on this wonderful morning.
You see your (parent) in the hall in front of you. You also see your staircase leading downstairs. A long line of your predecessors stretch down the corridor.
*Talk to (parent)- comments on your dress, you get scolded later if you don’t do this because you ignored them.
Talk- “So that’s what you want to wear today? After all, it is Career Day! Well, okay then, I won’t make you change. Don’t forget to grab your keys off of the counter, and try to eat some breakfast today, would ya? It’s gonna have to fuel your whole day!”
(Go Downstairs) – you proceed downstairs
ROOM 3 (kitchen) - Typical tiled floor, large white refrigerator, table with seating for at least 2, phone on wall, counter with car keys on it
*Grab keys
*Open fridge (not sure what this will affect yet)
Take eggs
Take melon
Take fudgicle
Go Upstairs
Go Outside
(Grab keys)- when you leave the house, the door locks behind you. If you had taken the keys, then you could take your car and drive to school. If not, you are forced to ride your bike there.
(Go Upstairs)- go back to the previous room
(Go Outside) - proceed to next “room”, your backyard
The indents indicate the actions the user can select, and ones with an * are actions that do not need to be performed to advance the story. Each room number has a basic description of the appearance of that room.
ROOM 1 (bedroom) –room with bed, dresser, window, desk w/various objects, tv perhaps, stereo, that kinda thing. Gender specific clothes lying around.
You find yourself in bed. What would you like to do?
Get up
Stay asleep
(Stay asleep)
You continue to sleep forever…
(Get up)
You should probably get dressed for the day. Do you want to carefully pick your clothes out, or just put on anything?
Pick clothes
Put on anything
(Pick clothes) –assign “neat” characteristic to character
(Put on anything)-assign “lazy” characteristic to character
You see three objects in the room, a baseball bat, an orange, and a remote controller. Careful, you can only choose one to take with you.
(These objects will be used later, but be used in different ways.)
Maybe you should brush your teeth…
*Brush teeth
(Brush teeth) – positive interaction with member of opposite sex later in game
(Don’t Brush) – negative reaction with member of opposite sex
Leave Room
ROOM 2 (hallway) –generic hallway with portraits on the wall resembling your character. Stairs leading down can be seen halfway across the screen. Parent in the hallway there to greet you on this wonderful morning.
You see your (parent) in the hall in front of you. You also see your staircase leading downstairs. A long line of your predecessors stretch down the corridor.
*Talk to (parent)- comments on your dress, you get scolded later if you don’t do this because you ignored them.
Talk- “So that’s what you want to wear today? After all, it is Career Day! Well, okay then, I won’t make you change. Don’t forget to grab your keys off of the counter, and try to eat some breakfast today, would ya? It’s gonna have to fuel your whole day!”
(Go Downstairs) – you proceed downstairs
ROOM 3 (kitchen) - Typical tiled floor, large white refrigerator, table with seating for at least 2, phone on wall, counter with car keys on it
*Grab keys
*Open fridge (not sure what this will affect yet)
Take eggs
Take melon
Take fudgicle
Go Upstairs
Go Outside
(Grab keys)- when you leave the house, the door locks behind you. If you had taken the keys, then you could take your car and drive to school. If not, you are forced to ride your bike there.
(Go Upstairs)- go back to the previous room
(Go Outside) - proceed to next “room”, your backyard
Sketches
Putting things into flash is proving to be harder than i had originally thought it would be. I'm going to be spending a lot of time working on drawing out backgrounds and props, as well as the characters. I don't have anything to show you in flash yet, but i do have some sketches done which will be moved over to flash shortly.

This will be the main characters that you can choose to be in the beginning of the story. Hopefully we can make it slightly customizable by letting you choose hair color and eye color. But these will be the people you'll see through the story.

And this is an idea of what the kitchen will look like. Most of the rooms will be designed long enough, that if we decide to do an animation aspect to this, then there will be no need to make them larger.
As i get a set of objects done, i'll keep uploading some pictures of them up here.

This will be the main characters that you can choose to be in the beginning of the story. Hopefully we can make it slightly customizable by letting you choose hair color and eye color. But these will be the people you'll see through the story.

And this is an idea of what the kitchen will look like. Most of the rooms will be designed long enough, that if we decide to do an animation aspect to this, then there will be no need to make them larger.
As i get a set of objects done, i'll keep uploading some pictures of them up here.
Interface
Work progresses on my end, trying to change the interface from a proof of concept into an actual application that a user could use. Soon the story and graphics will start to come in, so I'll be working to make everything play together nicely, and that should mark the beginning of our work towards the "fully function feature complete" mid-point version.
Monday, February 12, 2007
Story Concept
We had been brainstorming some ideas as to what choices the characters might make throughout the game, and where the story would lead. I thought out some ideas as to how the story could progress, and what choices the user would make along the way, and tried to organize it in the following story concept.
Text Flash Adventure Story Concepts:
Title display, on which a Start Game button will be present. Upon clicking, user gets an option to select “male” or “female” for their desired gender. Title page then fades into a bedroom of appropriate choice based on decision, (blue for male, and pink for female).
Male Branch Female Branch
Clothing choice, determines character trait Clothing choice, like male track
i.e. (throw on anything= lazy)
(dress to impress= hard working)
Character makes their way out of the room, house, and then onto the school bus. Interactions with important recurring characters like parents and the like might occur. In fact, the parent figure could ask how you would like to get dressed that day, and respond to your choice, offering you their opinion on the selection. Perhaps items will be around to influence future decisions if taken. Character arrives at high school, and needs to pick an elective for their schedule. This may mean interaction with a guidance counselor. The type of class they choose, with influence from their determined character trait, will generate the appropriate occupation of the character.
Class electives (specific course names will be made to sound ridiculous and amusing):
Math
Biology
Public Speaking
Computer Science
Etc.
Example:
Lazy + Math = Substitute Calculus Teacher
Hard Working + Math= NASA Analyst
After seeing the character graduate, they will need to get a job. It might be a funny twist if your employer is always the same graphic, but a hat or outfit will change based on what occupation you are in. Perhaps they can still pick an occupation from a list, but will only succeed if they pick the appropriate job track based on the characters choices. If this was the case, then we would only have to create as many environments as there are jobs. It would be possible to enter any of these jobs regardless of choices, but the interaction in said levels would be different. Because of all of the possible choices, we would have to be careful to not to come up with too many alternatives so that we’d have to make so many variations. Also, if the collection of items was implemented, the idea of customized, alternative gameplay gets even more complicated.
Job Environments:
Office
Construction Site
Laboratory
Classroom
Basement (perhaps website building if lazy and computer science)
NASA
Etc.
Perhaps the game will continue until you pick the correct job track. If you pick one your character fails at, you simply get fired and redirected to the job selection. In the correct track, the game might end when you get promoted or something. Naturally, along the way, twists and random humorous activities would occur. At the end, your character may meet up with all of the recurring characters you encountered in the game (parent, counselor, and employer), and the ending will play out differently based on your choices.
Text Flash Adventure Story Concepts:
Title display, on which a Start Game button will be present. Upon clicking, user gets an option to select “male” or “female” for their desired gender. Title page then fades into a bedroom of appropriate choice based on decision, (blue for male, and pink for female).
Male Branch Female Branch
Clothing choice, determines character trait Clothing choice, like male track
i.e. (throw on anything= lazy)
(dress to impress= hard working)
Character makes their way out of the room, house, and then onto the school bus. Interactions with important recurring characters like parents and the like might occur. In fact, the parent figure could ask how you would like to get dressed that day, and respond to your choice, offering you their opinion on the selection. Perhaps items will be around to influence future decisions if taken. Character arrives at high school, and needs to pick an elective for their schedule. This may mean interaction with a guidance counselor. The type of class they choose, with influence from their determined character trait, will generate the appropriate occupation of the character.
Class electives (specific course names will be made to sound ridiculous and amusing):
Math
Biology
Public Speaking
Computer Science
Etc.
Example:
Lazy + Math = Substitute Calculus Teacher
Hard Working + Math= NASA Analyst
After seeing the character graduate, they will need to get a job. It might be a funny twist if your employer is always the same graphic, but a hat or outfit will change based on what occupation you are in. Perhaps they can still pick an occupation from a list, but will only succeed if they pick the appropriate job track based on the characters choices. If this was the case, then we would only have to create as many environments as there are jobs. It would be possible to enter any of these jobs regardless of choices, but the interaction in said levels would be different. Because of all of the possible choices, we would have to be careful to not to come up with too many alternatives so that we’d have to make so many variations. Also, if the collection of items was implemented, the idea of customized, alternative gameplay gets even more complicated.
Job Environments:
Office
Construction Site
Laboratory
Classroom
Basement (perhaps website building if lazy and computer science)
NASA
Etc.
Perhaps the game will continue until you pick the correct job track. If you pick one your character fails at, you simply get fired and redirected to the job selection. In the correct track, the game might end when you get promoted or something. Naturally, along the way, twists and random humorous activities would occur. At the end, your character may meet up with all of the recurring characters you encountered in the game (parent, counselor, and employer), and the ending will play out differently based on your choices.
Graphics DImension
This week I worked on a system that will help us incorporate graphics into stories. Each Scene object is now associated with the name of a library object that represents the scene. In the main program there is a data object that stores story state information. When a scene is used, the game engine attaches the movieclip to the stage, and it loops through the state object looking for data with the same name as the movieclips inside of the scene movieclip. It then calls gotoAndStop to move the graphic to the right state. In this way states could either be frame numbers, or named keyframes.
Example:
When a scene is attached, the game will look for a door movieclip and set it to either frame "open" or "closed". There is also a system to pick if the frame itself should be updated or duplicated.
Example:
function openDoor(){
state.door = "open"
}
function closeDoor(){
state.door = "closed"
}
When a scene is attached, the game will look for a door movieclip and set it to either frame "open" or "closed". There is also a system to pick if the frame itself should be updated or duplicated.
Monday, February 5, 2007
Text Adventure Game Engine
Building on my past experience with text adventure games I created the game's engine over the weekend. To sophisticate the abilities of the game and ensure the highest quality user experience the user input is searched over for sequenced keywords and synonyms. What does this mean? Well consider this example:
Internally there is one possible 'action' at this 'scene', but scenes can have any number of actions. The wake action has the following keyword pattern: get/wake + up where get and wake are synonyms for each other.
The user could now enter either get up or wake up.
There is a demonstration version of the engine on my tcnj website here.
You're in bed. Perhaps you should get up.
Internally there is one possible 'action' at this 'scene', but scenes can have any number of actions. The wake action has the following keyword pattern: get/wake + up where get and wake are synonyms for each other.
The user could now enter either get up or wake up.
There is a demonstration version of the engine on my tcnj website here.
Project Proposal
Inspiration/What’s already out there: Space Adventure, Roger Wilco, Monkey Island
Medium: Flash, flash, flash
Goal: want to create an innovative text adventure that allows for user interactivity. Other text style adventures exist, but are usually totally linear and boring. Also, we want the choices of the user to be recognized by Flash, and have corresponding pictures be placed into a comic strip to document the choices made.
General choices- gender, hair color, eye color. Variables can be changed throughout the story. Story moves linear at first until hitting a branch with alternatives, and the alternatives alter user appearance to reflect the decision.
Story branches in upcoming scenes, and choices you make determine which scenes come up later in the story. At the end of the story, all branching tree options will progress to a final scene, which will be very similar in each story regardless of choices. However, the choices you made will result in different interactions and outcomes at the end of the story, thus allowing alternate endings
Target Audience: Teen audience, anyone who would go online looking for an addicting game. Teen particularly so we can take potential comedic violence liberties.
Strategy:
Group skill breakdown:
Nick- main programmer, has most knowledge with making this project work in flash.
Kirsten- artistic strength in creating characters and objects in flash that will be used throughout the story
Craig- though can do basic programming and object creation, strength lies more in story creation
Rough Schedule: Design the system that will allow the text process to work with the story line. Then create storyline as well as characters. Finish with props and testing out the system to ensure the comic strip will come out correct for every scenario.
Medium: Flash, flash, flash
Goal: want to create an innovative text adventure that allows for user interactivity. Other text style adventures exist, but are usually totally linear and boring. Also, we want the choices of the user to be recognized by Flash, and have corresponding pictures be placed into a comic strip to document the choices made.
General choices- gender, hair color, eye color. Variables can be changed throughout the story. Story moves linear at first until hitting a branch with alternatives, and the alternatives alter user appearance to reflect the decision.
Story branches in upcoming scenes, and choices you make determine which scenes come up later in the story. At the end of the story, all branching tree options will progress to a final scene, which will be very similar in each story regardless of choices. However, the choices you made will result in different interactions and outcomes at the end of the story, thus allowing alternate endings
Target Audience: Teen audience, anyone who would go online looking for an addicting game. Teen particularly so we can take potential comedic violence liberties.
Strategy:
Group skill breakdown:
Nick- main programmer, has most knowledge with making this project work in flash.
Kirsten- artistic strength in creating characters and objects in flash that will be used throughout the story
Craig- though can do basic programming and object creation, strength lies more in story creation
Rough Schedule: Design the system that will allow the text process to work with the story line. Then create storyline as well as characters. Finish with props and testing out the system to ensure the comic strip will come out correct for every scenario.
Subscribe to:
Posts (Atom)