Sunday, October 20, 2013

Class 7 Assignment 2: Greenfoot JOC #12 through #15

Below I will show you through the process of making my game through a bunch of screenshots.

 Getting started, this is where we left off!
 Starting video #12, editing my code to add sound.
 Continuing to add sounds to the turtle.
 Next video starting to learn about classes.
 This class lesson really helped me with video #14.
 More classes, its showing me through and I'm following along in my code.
 Shows the end of the class lesson.
 Video #14, now things are getting tricky.
 This video teaches us about variables. Here we start adding a points system.
 Still struggling with the points system.
 Now we are adding a way to win that goes with the points system. It is called Game Over.
 Still programming in victory.
 Testing time (playing games for class is fun!!!)!
 Learning more about the gameover variable.
 Learning more (he is doing everything again slowly and in more detail)...
  Learning more (he is doing everything again slowly and in more detail)...
  Finished with #14! This game is getting HAWT!
 Video #15 looks like a doozy! 20 minutes!?!??! This is gonna be hard.
I messed up with this screenshot and I am editing my code out of the screenshot area...
 Now you see me adding in the bugs, this is getting intense.
Programming the bugs movement.
 Altering my scoring system from previous video to account for the bugs being moving targets (harder to hit).
 Here I've gone back. My code got messed up and I got really confused. It took me about three hours to finish video five because I ran into some bugs (and not the good kind). Even worse in trying to fix them I messed up my code trying to fix things and couldn't get it right again so I had to go through line by line and count my {'s and }'s, then when that didn't work I rewatched video #14 and rewrote everything I added. It was hard work. I only uploaded this screenshot of my agony because I got so grumpy I stopped taking them :*(.
 Back to work, finally got stuff figured out and working on making the new bug respawn a second time.
 Woah this is crazy, now the new bug respawns randomly. This is me coding that.
Victory lap/final test screenshot!



So contrary to what the professor said I actually found two bugs over my long comb to fix things. The first bug I found was that since there was no victory scenario if program in the lettuce section you couldn't win unless you ate a bug. This was annoying so I fixed it. The second took a bunch of tests before I realized what was causing the problem but because bugs give you 5 points and it was set to win at exactly 15 if you went over (e.g. 16, 17, 18, 19) you wouldn't win even though you should have. I mucked around and found changing the == to a >= fixed this problem.

Thanks for reading about my game, I hope you'll play it at...
http://www.greenfoot.org/scenarios/9676

No comments:

Post a Comment