Alright this is where it gets somewhat awkward, having used actionscript before i knew that every key has it's own "value" for example A is (65) B (67) etc...
When playing the game (if you have) you'll see that the buttons to move up and down are infact Q and A which are a HORRIBLE way to move and play the game.
So i decided to change them to the UP and DOWN arrows. Looked through the code and managed to find this on the movie clip of the paddle.
onClipEvent(load){
spd=20;
}
onClipEvent(enterFrame){
if(Key.isDown(81)and _y>50){
_y-=spd;
}
if(Key.isDown(65)and _y<350){
_y+=spd;
}
}
The bold parts are the most important parts, the 81 and 65 are the values of Q and A. So i changed the values to what i found out from Adobe to be 38 and 40.
The new code looks like this ;
onClipEvent(load){
spd=18;
}
onClipEvent(enterFrame){
if(Key.isDown(38)and _y>50){
_y-=spd;
}
if(Key.isDown(40)and _y<350){
_y+=spd;
}
}
I changed the speed aswell, as the ball seemed almost too quick.
Wednesday, 5 May 2010
Monster pong!!
Before i even started i had to find a basic source code (Script) for a game of pong. Luckily it was easy enough to find one, albiet it somewhat ugly the basic game is down and open for change.
LINK!
LINK!
Wednesday, 24 March 2010
Finished game?..
Not quite, but it's incredibly close.
CLICK!
Just realised that the score has bugged, i'll be honest it's a huge kick in the balls and because i'm not adept with coding i can't even begin to fix it. I could backtrack and rebuild it from the start but i've done to much now to rip it all apart.
Quite annoyed.
CLICK!
Just realised that the score has bugged, i'll be honest it's a huge kick in the balls and because i'm not adept with coding i can't even begin to fix it. I could backtrack and rebuild it from the start but i've done to much now to rip it all apart.
Quite annoyed.
Knew i forgot something.
Tuesday, 23 March 2010
Mark #3
Monday, 22 March 2010
Redesign#3
Sprites
As you can see here because of the detail i put into the sprites when shrunk down it all seems to blend together and isn't as detailed.
So as stated, back to the drawing board.
Subscribe to:
Posts (Atom)