Michael James Williams
6 comments
From part 10 of my avoider game tutorial.
{ 6 comments… read them below or add one }
So as you can see, decent balancing of the game’s difficulty is extremely important and an area to which I have paid absolutely no attention
Man! You can’t move your player diagonally!
Yeah, that’s from Part 7.
It’s not hard to alter though (I did leave it as a challenge ). The simplest way of doing so is by changing this:
if ( downKeyIsBeingPressed ) { avatar.moveABit( 0, 1 ); } else if ( upKeyIsBeingPressed ) { avatar.moveABit( 0, -1 ); } else if ( leftKeyIsBeingPressed ) { avatar.moveABit( -1, 0 ); } else if ( rightKeyIsBeingPressed ) { avatar.moveABit( 1, 0 ); }
to this:
if ( downKeyIsBeingPressed ) { avatar.moveABit( 0, 1 ); } else if ( upKeyIsBeingPressed ) { avatar.moveABit( 0, -1 ); } if ( leftKeyIsBeingPressed ) { avatar.moveABit( -1, 0 ); } else if ( rightKeyIsBeingPressed ) { avatar.moveABit( 1, 0 ); }
(Check the ifs/else-ifs carefully if you can’t see a change.) There’s more discussion in the comments of Part 7 itself.
You hero can hide from the incoming smileys, if he keeps pressing right. I have over 10k points and I’m not doing anything.
Yeah, I’ve found that pretty useful for testing though. It’s not hard to fix — check Part 7 for a hint.
Just test your game up to this version… And fak, i got uber dejavu… I cant stand going through this time machine crap…
Leave a Comment
Name *
E-mail *
Website
Writing code? Write <pre> at the start and </pre> at the end to keep it looking neat.
Notify me of followup comments via e-mail
Anti-Spam Protection by WP-SpamFree
Sign up for my free newsletter!
Powered by MailChimp
You'll get the latest posts and other updates by email -- but no spam, of course.
(Newsletter? Twitter? Explain, please)
{ 6 comments… read them below or add one }
So as you can see, decent balancing of the game’s difficulty is extremely important and an area to which I have paid absolutely no attention
Man! You can’t move your player diagonally!
Yeah, that’s from Part 7.
It’s not hard to alter though (I did leave it as a challenge
). The simplest way of doing so is by changing this:
if ( downKeyIsBeingPressed ) { avatar.moveABit( 0, 1 ); } else if ( upKeyIsBeingPressed ) { avatar.moveABit( 0, -1 ); } else if ( leftKeyIsBeingPressed ) { avatar.moveABit( -1, 0 ); } else if ( rightKeyIsBeingPressed ) { avatar.moveABit( 1, 0 ); }to this:
if ( downKeyIsBeingPressed ) { avatar.moveABit( 0, 1 ); } else if ( upKeyIsBeingPressed ) { avatar.moveABit( 0, -1 ); } if ( leftKeyIsBeingPressed ) { avatar.moveABit( -1, 0 ); } else if ( rightKeyIsBeingPressed ) { avatar.moveABit( 1, 0 ); }(Check the ifs/else-ifs carefully if you can’t see a change.) There’s more discussion in the comments of Part 7 itself.
You hero can hide from the incoming smileys, if he keeps pressing right. I have over 10k points and I’m not doing anything.
Yeah, I’ve found that pretty useful for testing though. It’s not hard to fix — check Part 7 for a hint.
Just test your game up to this version… And fak, i got uber dejavu… I cant stand going through this time machine crap…