Suit Em Up, various stuff and some other stuff including particles
|
Once again I haven’t worked on one artifact enough this week to justify writing a whole blogpost about it, so because I have to write something I’ll write a bit about what I’ve done this week. I’ve been touching up some small things and added a few new smaller features. First off, I had some troubles with adding a non-repeating sound effect that plays when you are hovering over a button. First I did the stupid thing and was trying to add it in the update-method for the states that the buttons are placed in. This just resulted in a repeating clicking-sound, and by then I’d figured out what to do so I couldn’t even bother trying to find out what was wrong. Everything went much smoother when I added a previous-state in the Button class and then I just checked if m_previous was not equal to “Hovering” and the in that if-statement I checked if m_current was equal to “Hovering”. Much simpler and much less code, and now I’m wondering why I didn’t do that before, it was so obvious. Then I just added four different, but very similar sounding clicks that I just random which one the program should play, because it gets so monotone to use the exact same click all the time. Then I added some visual feedback all the buttons in the customization-screen, and I did this by just adding overlay-sprites that are only drawn when the buttons are returning “Hovering” and the type is correct for that sprite. Then Viktor and I started to work together on a particle-effect that would go something like this “Boooom, Wooooosh”, this might not make that much sense, but imagine an explosion from one single point and after the particles have expanded a bit they would start to curve and slow down, and then they would fly in full force to the target. After a while we got it working, but honestly I can’t tell that much about this, because I helped a bit in the beginning but then it became just too much math for me, and that is where Viktor shines. Now the only problem we have with the effect is that is should explode at a different point and then the particles are supposed to fly in to the player and not the other ways around. Well that is pretty much it for this week other than some small fixes that aren’t worth mentioning.
(They are rainbow-colored at the moment, woo!)
Filed under: Uncategorized Tagged: 5SD023, 5SD033, Campus, design, game, gotland, Laban, Melander, programming, Universitet, University, Uppsala |
