Tuesday, April 1, 2014

Day 2 - Alpha is Public!


Just barely playable in it's entirety is my 360 Dodgeball game! I want to add some additional features, tweak the menu, and touch up the graphics. Some weird roadblocks, but I was able to find an acceptable solution. I'm willing to take a dirty fix over a clean one right now as this is a learning exercise.

What Went Wrong?

I've got to remember that Behaviors (quick n easy chunks of code with common uses) take presdence over written line. In order for the player to score points they need to successfully dodge incoming balls.

I remember from back in the day that unless you tell the ball otherwise, it will keep moving, even after it is off the screen, the computer tracks this movement. and at a rate of around 1 ball a second, your computer could be tracking quite a few if you are any good.

To counter this, you need to destroy the balls once they are outside of the layout. When I initially put this together I added this behavior so I would not have to worry about it later on. I forgot this, and put together an event that stated once the ball was off layout it would destroy the ball, and add a point to the player.

Initially I thought it was a problem of the math/logic not being right, as the score was not going up for dodged balls. When I looked at the debugger, I noticed the balls were being destroyed (as planned). I disabled this destruction in the event to make sure it was just the math/refference to points, and not the entire event that was broken. Once I saw the balls were still being destroyed it hit me. The balls were being destroyed before my custom event could destroy, and add the point.

I also ran in to the challenge of jumpy player fingers. I have the game set to show a game over message, along with player score, and "Press any key to continue".  I noticed while testing that I would frequently press keys after being taken to the Game Over screen.

I fixed this by adding a wait command to "Press any key..." and make sure the game will not respond to key presses if the "Press any key..." message was not viable.

What Did I Learn?

With my past hazy understanding, I did not learn much today. I was able to hit road-blocks, and make my way around those blocks. I've accomplished everything I wanted to.

Thanks for reading this and following me on this adventure. No one knows it now, but some day this will be interesting stuff.

No comments:

Post a Comment