Showing posts with label Score Change. Show all posts
Showing posts with label Score Change. Show all posts

Tuesday, February 23, 2016

Ryan Crim, Week 7 Journal PPJ, Blog post 7, GMAP 378

Content with Hours (Examples included):

My main task for this week was to update the scoring in the game to make it more visual to players without requiring a lot of time to look at it. To do this, as a team we decided to split up the score in two different scores (one score for the humans and another score for the aliens), so that we could implement a tug-of-war style score bar. The way that it works is that depending on the difference in scores between the two teams, the bar fills with more of the winning team’s color as shown in Figure 1. In addition to implementing the score bar prefab to add to each game, I also updated the Score and ScoreChange scripts to properly work with the new scoring system as well as went through the scripts for each individual game and reworked them to handle the new system and to add points for humans/aliens accordingly. After this extensive reworking of the games, I went through and tested each one to make sure that all of the updates work as expected. Furthermore, I updated the High Score scene to properly display each team’s final score and to show the top three high scores for both the aliens and the humans as shown in Figure 2. I also noticed that the scores were not being saved anywhere as well, so I updated the high score script to load from and save to XML files for each team’s high scores. (5.50 hrs)


Figure 1. In-game score bar showing change after a win for the humans
 
Figure 2. High score screen showing scores for both teams

After working on the scoring, I had a bit of time to flesh out a quick idea that came up to implement a DDR-style micro-game. The main gist of the game is that the screen is split into two with the aliens on the left and the humans on the right as shown in Figure 3. “Notes” are spawned in the center of the screen and move toward each team’s input area. If the player inputs the correct direction (see screenshot for controls) when the note is over top of the corresponding input area, the team is awarded +2 points and the note sparks a bit (seen by the green note on the alien’s side). If the wrong input is entered, the input is entered too early/late or the note reaches the edge of the screen, the note fades away and no points are awarded (seen by the rightmost red note on the human’s side). The notes continue to spawn until there is no time left. In terms of the work required for this, it involved writing each of the scripts, building up the scene with all of the necessary art assets and retrieving the current background music (http://www.playonloop.com/2010-music-loops/95/). In order to make the work a bit easier, I salvaged bits and pieces of the code from each of my other games, those being Abducktion, Draw at Noon and G-Switch. Some of the repurposed code included the analog input logic from Abducktion and the object rotation from Draw at Noon/G-Switch. (5.00 hrs)
 
Figure 3. Screenshot from Dance Off micro-game

Lastly, I made a couple of modifications to Draw at Noon. The first of which was adding in the textured alien model that was being worked on the past few weeks. The issue at this point, though, is that the current model does not have any rigging or animation as I believe it is still be worked on. Therefore, as you can see in Figure 4, the t-posed alien looks out of place, however, it does look better than the existing 2D placeholder. In addition, I made a couple of slight changes to how the bullet works, including updating its speed, starting it exactly in the barrel and changing the color of depending on who shot it (pink for humans, green for aliens). (0.50 hr)
 
Figure 4. Screenshot of Draw at Noon with textured alien model

Content Positive:
- Reworked the scoring to be split between the two teams to create more competition
- Added visual score bar prefab to each game to make it easier to tell who is winning
- Updated High Scores to show saved scores for both teams
- Added Dance Off micro-game
- Added textured alien model to Draw at Noon
- Modified bullet behavior to improve it slightly

Content Negative:
- Still waiting to see if the rigged/animated alien model happens

Total Hours for the week: 11.00 hrs

Tuesday, February 16, 2016

Ryan Crim, Week 6 Journal PPJ, Blog post 6, GMAP 378

Content with Hours (Examples included):

This week I spent most of my time creating and updating universal aspects of the game, while also making some updates to my own micro/mini-games.

To start the week, I worked on creating an easy way to show score additions/subtractions to the players. Therefore, I created a ScoreChange prefab that consists of a UI text component with a script that animates and deletes it when done, as well as plays an audio clip depending on whether points were added or subtracted. I also updated the existing Score script to contain the overloaded AddScore() methods below that update the score and loads the ScoreChange prefab into the scene at the provided position (or by default, Vector.zero which is the middle of the screen). Lastly, I updated each of the scripts for Abducktion, Draw at Noon and G-Switch to call these methods to put the ScoreChange prefab to work, an example of which you can see in Figure 1. (1.25 hrs)


// Updates the total score and displays the change to the screen

public static void AddScore(int amount)

{

AddScore(amount, Vector2.zero);

}



// Updates the total score and displays the change to the screen at provided position

public static void AddScore(int amount, Vector2 position)

{

// Update score

totalScore += amount;



// Create and set up the score change text for this amount

GameObject sc = (GameObject)Instantiate(Resources.Load("Universal/ScoreChange"), position, Quaternion.identity);

sc.name = "ScoreChange";

sc.transform.SetParent(GameObject.Find("Canvas").transform, false);

sc.GetComponent<ScoreChange>().initText(amount);

}


 
Figure 1. Fading Score Change text displaying after humans win Abducktion

Next, I continued trying to bring a bit more organization to the project by creating a Dashboard UI prefab with a child to hold the humans’ controls image. Unlike before where each game needed to update the dashboard if there was a modification made to it, now the modification can be made in one place and automatically updates in each game. This already proved helpful when Angela pushed the next dashboard with the alien instruction panel (shown in Figure 1 above) as I was able to update the prefab without having to change it in each game. Furthermore, I did go through each game and added the provided human and alien control images that Angela has created so far for the new dashboard. In my opinion, the alien instruction panel is too large and intrusive at this time, but I believe this is something that we will discuss in the upcoming week.  (1.00 hr) 


In terms of changes for my individual games, I started with some updates and additions to Abducktion. The first change I made was to bring more visibility to the duck when X-Ray mode is activated as it had been noted in playtesting that the duck was extremely tough to see in contrast to the tractor beam light and the sand textured ground. Therefore, I created a simple X-Ray sprite of the duck, as shown in Figure 2, that contrasts much more than the normal duck sprite. In addition, I added the new abducting spaceman visual timer prefab to Abducktion (as shown above in Figure 1 on the right-hand side) and made some modifications to the Abducktion scripts in order to get them to properly behave with it. Lastly, I perused the website that this team has used for music loops and added in the free shorter edit of this loop (http://www.playonloop.com/2012-music-loops/air-ducts/) in order to provide more atmosphere to the game. (1.25 hrs)

Figure 2. Sprite of duck for X-Ray mode in Abducktion

Moving onto Draw at Noon, the first thing I did was make small modifications to the arrow signs that the aliens need to press by changing the pressed color from pink to green, shown in Figure 3, to align more with theme of the game with humans represented by pink and aliens represented by green. Furthermore, in the screenshot, you can see that I also added the abducting spaceman visual timer prefab to the game and made modifications to the Draw at Noon scripts to behave with it. Lastly, similar to Abducktion, I added a free short edit music loop (http://www.playonloop.com/2013-music-loops/bridge-over-darkness/) to the game. (0.75 hr)

Figure 3. Updated Draw at Noon scene

For my last game so far, G-Switch, I started by creating some art to help expand on the atmosphere of the game. This included creating a very simple portal model complete with a spinning portal as well as simple art for the spinner to make it look a bit cleaner as seen in Figure 4. The portal required a simple script to rotate the portal, however, the spinner logic needed to be slightly modified to handle the sixteen specific angles that the zone can be in as opposed to the old logic that allowed the zone to spawn on any degree. Similarly to my other two games, I also added the abducting spaceman visual timer, updated the G-Switch scripts to behave with it, and added a free short edit music loop (http://www.playonloop.com/2014-music-loops/twin-turbo/) to it. (2.00 hrs)



Figure 4. Updated G-Switch scene


Content Positive:

- Created ScoreChange and Dashboard with alien instruction panel prefabs
- Updated art in Abducktion, Draw at Noon and G-Switch
- Added visual timer prefab to each of my games
- Added background music to each of my games
 

Content Negative:
- Alien instruction panel may be too large

Total Hours for the week: 6.25 hrs