Saturday, November 30, 2013

Tasks completed recently

In the recent weeks I've worked on the game a lot. Below is a list of things I've done, and a list of things that still need to be completed.

Completed:

Designed the city scene which doubles as a skyline in the other scenes. I applied a texture bake technique I learned in a tutorial to bake Ambient Occlusion and Shadows into the scene. This heavily reduces fps lag since there's no need for real time shadows and make the scene look a lot more realistic. You're transported to this scene when you near the exit of the park.

Modeled and rigged a human child model and posed it on the playground and in the room scene. She was created from a program called MakeHuman but I heavily modified her mesh afterwards.

Lit and textured the room scene created by Martin. I also mirrored the room to allow the player to look into the mirror. 

Added moving skyboxes and skylines to every scene.

Completely overhauled the logic for taking a photo. I needed to make it so the camera would raise with a right click then fade away so it wouldn't be there when the viewfinder overlay appeared. Then when taking a photo I needed to remove the viewfinder overlay so that the screenshot didn't capture the viewfinder circle. I also have it so that when you snap a picture a black plane slide in and out quickly representing the camera shutter. Finally when you take the picture a grayscale filter is applied so it looks like you're taking black and white photography. 

Added a camera blur/focus mechanic.

Implemented the inventory system which fades in and pauses the scene when you hit tab. This displays all of the photos you've taken on planes which you can shift left and right. After implementing it I found that it only worked in multitexture mode and not GLSL. I'm currently trying to sort the bugs out.

Need to finish:

Fix photo inventory system.

Add more photo spots.

Lighting in the park

Homework 14: State

The state diagram explains what attributes an object has and what state it can change to at any current time. Below are two state diagrams from my game.

Visibility State Diagram

The first is a model of a girl on a merry-go-round. When you first encounter the merry-go-round it's vacant but when you take a photo an image of a girl playing on the ride appears for a few moments before vanishing. In this case the girl's first state is invisible. When you take a picture of her she becomes visible and starts a timer. Once the timer expires she disappears, returning to the first state.














In Camera State Diagram

The second model is more complicated. It shows the choices the player can make when raising the camera to their eye. If they right click, the camera raises and then fades away changing the view to an in camera viewfinder view. Then, if the player does not want to take a picture they can lower the camera returning to the original state. If they do take a picture the camera snap animates and the scene is frozen for a few seconds allowing the player to see their picture. The game also takes a screenshot at this time. After a moment the player is returned to the in-camera viewfinder view where they can take another picture(looping the state) or lower the camera.








Thursday, October 24, 2013

Homework 11

Chapter 15

What is the relationship between the main character and the goal? Why does the character care about it?
The photos that progress the story along are directly related to the main character's memories, but that's not discovered until the end of the game. The important photos can clue the player in on this. 

What are the obstacles between the character and the goal?
Players need to discover the story throught he photos and need to find ways past puzzles that block their way.   

Do the obstacles gradually increase in difficulty? If yes, how?
Yes they do. The photo opportunities will become more hidden and the puzzle elements will be more complex. One puzzle idea is a kind of chaining of photographs together where 1 photo opens a path to the next photo.

Great stories often involve the protagonist transforming to overcome the obstacle. Does your protagonist transform?
The main character, like the player, becomes more interested in the world they're photographing. They also may make friends with a ghost dog.     

How is the game world simpler than the real world?
The city is empty and no one stops the player from wandering through houses and buildings.

What kind of transcendent power do you give to the player?
The player has basically a magic camera that can bring in elements from the past to the present.

What is the weirdest element in the game story?  That the player can change the world with their camera.

How do you ensure that the weirdest thing does not confuse or alienate the player? Explaining it through story. That the elements appearing from the past are memories and that maybe they're only appearing in the main character's mind.

Will the players be interested in the game story? Why?
 I think so. At first they might feel a bit detached until they realize that their actions are changing the city and that the main character is more integral to the city's history than they thought.


Chapter 16
In what sense does the player have freedom of action? Does the player "feel" free at these times?
The player is free to wander around the areas looking for photo opportunities. By taking a certain number of pictures the way to the next area will be opened up. This should encourage exploration and make the player feel like they have a lot of freedom even though there's a finite number of planned photos.

What are the constraints imposed on the players? Do they feel constrained?
They can only explore one area at a time(the park, the city, the tunnels). They can also only go in certain buildings. Limiting them to a certain area might make them feel constrained. It will take playtesting to determine whether or not they get bored by taking too long in one area.

Ideally, what would you like your players to do (lens #72)
If possible we'd like them to take a few pictures per area, learn the story through the photos, and move on to the next area. Maybe on a second playthrough would they want to linger in an area to try to find all the pictures. There's no timer in place to make them move on though.

Can you set constraints to "kind of" force the player to do it?
We could set a timer for each area or maybe limit the amount of film the player has but those changes will be tweaks once the game is almost complete. One idea is to have ghosts from the past emerge if the player takes too many photos or lingers too long.

Can you design your interface to "force" the player to do what you (the designer) wish him/her to do?
Giving the player a camera instead of a gun will encourage the player to take pictures and not make them worry about environmental hazards. 

Friday, October 18, 2013

Assignment for the week of October 21st

Thus far, I've been taking care of most of the game mechanics and scripting, along with some animations. I'm not doing much modeling but I plan to model the player's camera eventually.

Last week I started working on the photo storing and reviewing system where the player can snap a picture(really a screen shot of the current in-camera view in blender) and have that saved as a png in their game folder. The png is then dynamically added to a picture frame mesh that has a default 'X' texture. The script essentially searches for all meshes with the X texture and replaces that with the photo's texture. This allows the player to hit a button to bring up their snapped photos. The screen comes up as a scene overlay.

That's all working right now but only for one picture. This coming week I need to edit the script to iterate a variable so that the 1st picture gets applied to the mesh with a '1' in the name, the 2nd to the 2, and the nth to the nth. 

The player can also delete a picture but when they do it leaves an empty mesh frame. I'm thinking about having all the other photos shift left when one is deleted rather than trying to add a new one to that blank spot.  To do this I'd delete the deleted photo's mesh and find all of the meshes with a higher material id and move them left.

If I finish all this I'll continue working on the simple raycast calculations to determine if an object is properly framed. I say simple because I have a complicated way in mind but I'll save that until the game is further along.

Tuesday, October 8, 2013

Homework 9: Balance

Balancing a game can be difficult and time consuming. To ease that difficulty I've contextualized twelve types of balance and how they affect my game.

Balancing the game in terms of fairness will require testing to see if players can understand how to solve the puzzles correctly without getting frustrated. The game is asymmetrical since it's really the player vs the world but it's not punishing.

Challenge vs success relates to increasing the difficulty while not making the game too frustrating or too boring. This is achieved in our game by adding new mechanics to the game as the player progresses. In the first section the player is in a non-hostile environment and they can take their time taking pictures and learning the story. As they progress they're introduced to puzzles that stop their progress. This will hopefully make the game less monotonous and change the pacing from a leisurely stroll to an anxiety filled timed section. We are still thinking about adding enemies in the forms of stray dogs later on as a third new gameplay mechanic. 

Meaningful choices reward the player based on whether they decide to do one thing over another or in addition to it. In our game there's a part where you have to cross a bridge and you're only given around 10 seconds to do so. However this bridge offers the only location to get a particular photograph. If the player chooses to they can stop on the bridge to take the photo, risking running out of time and falling in the water. This is also referred to as triangularity. 

Since our game is mostly story driven and serious there is very little chance added in. One element of chance that we may add is the random path enemies take in the later game. This way the players never know if they'll get attacked each time they play the game.

Head vs hands is the balance between mental vs physical challenge. Mental challenges include puzzle solving while physical challenges include jumping or aiming at targets. Our game has a balance between these by having the player use their intellect and what the game has taught them to figure out what pictures to take and where to take them, and having timed sections that need to be navigated quickly. Hopefully we will be able to pace these challenges so it doesn't become monotonous. 

Balancing competition vs cooperation is mainly reserved for multiplayer games. The only element of competition in our game would be how many of the correct pictures you took compared to a friend's total. This comparison is not tracked in game though.

Short vs long is about balancing gameplay length using different methods. Our game is interesting because the player can, if they want, just wander around and take pictures. Not all of the pre-defined photo opportunities are required to move on to the next area but the players are given bonuses and more insight into the story if they take the time to explore. In this way the player creates their own pace.

Rewards in our game include unlocking new areas, discovering secret photos that tell more of the story, taking normal photos that display an animation and music, learning all the powers that the camera has, and beating the game to discover the full story. Conversely, punishments in the game are very minor. If you "die" by falling from a height or into water you're reset very close to where you were. If you fail a timed puzzle you must restart the puzzle sequence again.

Freedom vs controlled experience determines how much control you give the player. Our game gives the player a lot of freedom. We let them wander around at their own pace taking photos but to get to the next "stage" they need to go through a puzzle section. These sections are useful because we know even if the player misses most of the photo ops they will definitely pass through this part. Thus these "gated" areas can be used to deliver important story elements or just have exciting events happen. 

Our game may appear very simple at first(you just take pictures of things) but complexity arises due to how the different objects react to the photos. Some will trigger puzzles, others will show animations, and even others might cause an enemy to attack.

Our game is set in a familiar area: a city with a park and river. Thus the areas don't need to be realistically detailed because people know what these places look like. We only need to put details here and there so the areas don't look empty and boring. Also the areas that the players are forced to go through can be more detailed since we know they'll be seen.

Tuesday, October 1, 2013

Homework 8

Is the space in your game discrete or continuous?  The game is discrete because you take pictures of objects at set locations. You travel between these objects but the mechanics of the game surround the pre-defined objects. It may also be considered a 3 dimensional nested space.  

How many dimensions does your space have?  The game is 3 dimensional because you can take pictures at different angles and also use height to get around blocked paths.  

What are the boundaries of your space? The boundaries are the gated areas surrounding the objects that can be photographed. The player needs to photograph some of the objects to proceed to the next area. These areas could represent individual levels.

How many verbs do your players (characters) have? What are they? The player can use the the camera to interact with most objects and obstacles by "shooting" them. They can take a picture, use the flash to expose a secret, and see the past through the lens. They can also walk around, jump, and interact with some objects like opening doors or pushing swings. That could either be 3 verbs or 6 depending on how you count them.  

How many objects can each verb act on? What are these objects? Like the gun in the example in the book the camera can act on many objects. The number of objects you can photograph is only limited by how much time we have to finish modeling them. Right now we have 1 area with 4 objects completed. There will probably be at least 3 areas with multiple objects each. Ideally I'd like to have more like 10 areas and around 40 objects but we don't have the time for that.  

How many ways can players achieve their goals The gameplay is generally pretty straightforward. The player finds objects and takes pictures of them. However some objects will not be immediately obvious to the player so the player can achieve secret goals this way.
 
How many subjects do the players control? What are these subjects? One. The only subject in the game is the player using the camera.  

How do side effects change constraints. The only thing that will change the constraints is taking pictures of correct things. This will lead to opportunities to move on in the game.  

What are the operative actions in your game? The player can "shoot" objects and move around interacting with them.  

What are the resultant actions in your game? The player uses the "shoot" feature to make models appear where they weren't, clear paths, bridge gaps to big to jump, and uncover the story.  

What actions would you like your players to do that they cannot presently do? (based on your current knowledge of Blender) I'd like them to be able to look back at their photos they've taken. That seems possible but complicated in Blender.  

What is the ultimate goal of your game? The ultimate goal is to get to the end of the game and uncover the story.  

Are there short and long term goals? What are they? The short term goals are to get through each area and onto the next sometimes by getting past a puzzle or locked door.  

How do you plan to make the game goals known and understood by the player? The player should use exploration of the main game mechanic(the camera) to discover these goals. They shouldn't have to be told explicitly.  

What are the foundational rules of your game? The player is limited to one area until finding a majority of the photographs.  

How are these rules enforced? Taking photos opens up the next area.  

Does your game develop real skills? What are they? The intention is to get the player to think like a photographer and notice a story when looking at objects. You might call this a skill.

 Does your game develop virtual skills? What are they? I don't think the player's character gains any virtual skills. Since this is a supposed to be a more realistic game it would be out of place to have the player's in game stats increase.

Thursday, September 26, 2013

Homework 7: Game Engine

I decided to make the prototype of the movement engine for our game this week. I just couldn't wait anymore.

I added mouse movement with the widely available mouselook.py script. Now in first person mode the player can look around and turn with the mouse, move around with WASD, and jump. I parented the body to the first person camera and a third person camera to the first person camera. That way the player can switch from first person to third person with the 1 and 3 keys.

I animated the player's digital camera using a placeholder model. The digital camera will raise or lower when the right mouse is held or released. I still need to move the view to an in camera view once the camera is raised. The digital camera is parented to the body so it moves with the player. The camera flash is activated by left click which triggers a point light parented to the camera that goes from energy 0 to 10 in a 10th of a second.

The merry-go-round now has a hinge joint in the middle so that it rotates freely on its Z axis. This way I can apply a force and let it slow down over time rather than have it rotate at a fixed speed. Also this means I don't need to rely on it being held in place by another object's unpredictable collision box. Maybe there's a better way to do it but for now this works well. The player can sort of ride it and by ride I mean get flung off violently.

Lastly, I made a simple jumping puzzle to see how well the jump movement works. The cubes are at various heights to see what jump height seems most natural in first person. Jumping on top of the cubes leads you to a yellow floating plane. Jumping on that activates a near sensor which triggers an animation raising the plane into the air.