Sunday, June 12, 2011

Week 10 Advanced Game Prototyping

The week before demo, the final week. Everything comes to a head, and looking at the goals that were set months ago.... well, to say we didnt have a condition to complete the level was one thing we lacked for a completed demo.

I was able to get a decent hud, and menu system ready for use so the player can select which ship he wanted and the weapon set specific to the ship. Thanks to missing images or ones I was still waiting on.... I was not able to complete visuals for the player while within game, I think the placeholders were still in it. Anyways, 2 days later, which I spent a day and half of it with the images I finally got to program the visuals on all the weapons reloading, loaded, charging, and overheating. Even experimented on the weapon reloading or decharging while the player wasn`t using the fire button, but since it wasn`t part of the weapon code, all it was just an experiment. But the images are accurate to how my other teammate coding his weapons. Though it wasn`t easy, spent 2-3 hours to get the code for the weapons to work. But since unity said my 2d texture was not assigned while it was within the inspector. Well I had 30+ images to place pixel by pixel, and most were differently placed based on ship selection, weapon set, and the hud settings. Decided the time spent to learn how to fix the 2d texture, then fully learn how to use the screen placement detectors properly I decided to position the images myself.  And now I get to look forward to this possibly not being in the demo.

Week 8/9 Advanced Game Prototyping

This is an interesting week, no class next week with the next one the last before demo time.

I need to implement game sounds, mainly just the menu sound, but I added the ingame sound so I could test the mute button in the different scenes within the unity build.There was an issue with the sounds, the game would mute the sounds, but while in game the mute would only mute or unmute the sound after I left the pause menu. I know it was the timescale being 0 during this period, so any change wouldn`t register till after timescale was set back to 1.0. After spending 3 or so hours testing out several codes and methods to work the sound to change while within pause menu. Gave up at a certain point and stayed with the sound muting or unmuting after the pause menu was closed. I actually got a feeling that since many games take one to another scene apart from the game scene, making it easier to control sounds and menu settings within game. But since I didn`t have time or knowledge how one could program the game to go from one scene to another, while staying at the exact point and pausing it and then returning the player to that point with any changes.

I also had to work on the ships explosions some more. For this and the following week, I finished up the codings. So that the ship explodes, with a light the has a halo/flare effect expanding from the center point outward, then break apart into individual pieces with their own particle effects. Now the way to test this was to make it all happen when player hp hits 0. But for this purpose of testing and lack of another team members coding, I didn`t have something to reset the hp from 0 to something else. Of course I did try, and the code partially did something then stopped cause the condition to make the code run became false basically. So pretty much everything ran on a loop, took me awhile to fix this. I had to use a SendMessage to run it properly along with a variable that would became true after 1 explosion while still running the remainder of the codes. What was causing issues with the movement, was that even while in maya the piece was centered, in unity the center pivot was well, somewhere away from the piece. Using the full version of my movement code didn`t work, had to cut out parts of it and modify the remainder, add timing to when they disappear and the explosion to help hide any piece that did manage to rotate around a point not in it. I even also took the light and medium damaged textures, made extra ships and applied lesser damaged particles specific to the state the ship is in.

With the interface, I added functionality for the hud settings so the player can somewhat customize the hud placements, and added the alternate fire setting button to be added onto later.