Sunday, April 24, 2011

Week 3 Advanced Game Prototyping

This week, I had to continue working on my particles code, and start working on the games interface. I finally worked out on making the particles spawn once as intended and looking better. The next new bug I opened was when the victim asteriod died, instead of its own particle going off, the particle on another went off. So far I believe one or both of these 2 reasons are why it is happening. The first, and what I beleive it is, is that I am using a randomly generated interger when told to generate one and whatever it is will spawn one of 3 particles. And I am using a gameobject find to find the named particle attached to the asteriod, but since the particles on one asteriod is the same name as another Unity just picks 1 random one. But as I was writing this, when I turn on the asteriod spawn portion again, the victim asteriod will still spawn them and the particle is called upon at the same time, so the theory that the specific asteriod and not some other one is doing what it should be, dying and giving birth theory is working as intended. But the 2nd reason, is the the destroy game object happens right afterwards is that unity most likely didnt keep up and picked some random to do particlemitter.emit on some other same name particle. Or I`m wrong and the way it is coded is wrong. It took me almost 3 hours to work all this out.

The interface on the otherhand, I didn`t expect a big challenege of a keyboard only manual interface on a PC game for the player. I know I spent half a day looking at 1 interface button, trying to get it to do what I wanted to do. After 14+ hours, with input gui`s I learned it is really important to first keep what buttons are used in point A and what buttons later used in say point F must go from A-Z, or F will cut into A and unity will think yourat point F when your at point A. Though I did use an interger for the arrow keys and booleans for which point I was at, that I learned also I had to at some point stop reseting the interger and instead make it equal a higher value then the previous point to make the buttons work. Cause the main issues I had where was I could use the arrow to navigate my interface, but the buttons would not go off when return was pressed. At the point I`m at now, the player will have 7 weapons and he has to chose 3 to use before starting the level. 1-3 and 5-7 weapon selection buttons worked, and I could start the game if I selected 3 of those, but weapon selector # just wont work. Other then that, with what was discussed in class, and how I coded this I could in theory still use a radial for the interface buttons, but kinda hard till I make the animation or something that looks like a spinning wheel of buttons cause my coding does support the theory I believe.

No comments:

Post a Comment