avatar for bookwormrwt

bookwormrwt's profile

About me

I am a game developer. I like pizza, smiles, smiling pizzas, and smiles eating pizza. I love Fall Out Boy. Leave me a shout if you have ideas for other games you would like to see.

/////////ActionScript for Snake////////////

var unit = 15;
var uwh = 20;
var canMove = false;
var dir = 2;
var score = 0;
aPieceList = new Array();
mouseListener = new Object();
mouseListener.onMouseDown = function()
{
if (!canMove)
{
canMove = true;
startGame();
}
};
Mouse.addListener(mouseListener);
k = new Object();
k.onKeyDown = function()
{
var k = Key.getCode();
if (k == Key.UP && dir != 2 && canMove)
{
dir = 0;
canMove = false;
}
else if (k == Key.LEFT && dir != 3 && canMove)
{
dir = 1;
canMove = false;
}
else if (k == Key.DOWN && dir != 0 && canMove)
{
dir = 2;
canMove = false;
}
else if (k == Key.RIGHT && dir != 1 && canMove)
{
dir = 3;
canMove = false;
}
};
Key.addListener(k);
function addPiece()
{
var p = this.attachMovie(“piece”, “piece” + aPieceList.length, aPieceList.length);
p.x = aPieceList[aPieceList.length – 1].x;
p.y = aPieceList[aPieceList.length – 1].y;
aPieceList.push(p);
}
function moveFood()
{
var moveIt = true;
while (moveIt)
{
food.x = Math.floor(Math.random() * uwh) * unit;
food.y = Math.floor(Math.random() * uwh) * unit;
moveIt = false;
for (var i = 0; i < aPieceList.length; i++)
{
if (aPieceList[i].x == food.x && aPieceList[i].y == food.y)
{
moveIt = true;
}
}
}
}
function gameOver()
{
delete this.onEnterFrame;
tScore.text = "You Lose. Score: " + score;
canMove = false;
}
function startGame()
{
for (var i = aPieceList.length – 1; i >= 0; i—)
{
aPieceList[i].removeMovieClip();
aPieceList.pop();
}
score = 0;
var p = this.attachMovie(“piece”, “piece” + aPieceList.length, aPieceList.length);
aPieceList.push(p);
p.x = 10 * unit;
p.y = 10 * unit;
var food = this.attachMovie(“food”, “food”, 1);
var c = 0;
moveFood();
var startingLength = 3;
for (var i = 1; i < startingLength; i++)
{
addPiece();
}
this.onEnterFrame = function()
{
canMove = true;
tScore.text = score;
for (var i = aPieceList.length – 1; i > 0; i
-)
{
aPieceList[i].x = aPieceList[i – 1].x;
aPieceList[i].y = aPieceList[i – 1].y;
}
if (dir == 0)
{
aPieceList0.y -= unit;
}
else if (dir == 1)
{
aPieceList0.x -= unit;
}
else if (dir == 2)
{
aPieceList0.
y += unit;
}
else if (dir == 3)
{
aPieceList0.
x += unit;
}
if (aPieceList0.
y / unit == 20)
{
aPieceList0.
y = 0;
}
else if (aPieceList0.
y / unit == -1)
{
aPieceList0.
y = 19 * unit;
}
else if (aPieceList0.
x / unit == -1)
{
aPieceList0.
x = 19 * unit;
}
else if (aPieceList0.
x / unit == 20)
{
aPieceList0.
x = 0;
}
if (aPieceList0.
x == food.
x && aPieceList0.
y == food.
y)
{
score = 10 * aPieceList.length / 2;
moveFood();
addPiece();
}
for (var i = 1; i < aPieceList.length; i
+)
{
if (aPieceList0.
x == aPieceList[i].
x && aPieceList0.
y == aPieceList[i].
y)
{
gameOver();
}
}
};
}

///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I now make fps games. If you would like to download my first one, go t my site http://sites.google.com/site/bookwormrwt/home

  • Age: 17
  • Sex: Male
Latest Achievements (view all badges)
Ch-ch-ch-ch-Change (completed)
Badge earned
Badge Of The Day
Ch-ch-ch-ch-Change Badge (easy - 5 points)

Beat the first 10 levels in Coins

Acquired Dec. 18, 2011

bookwormrwt's Art

bookwormrwt's game contributions

1254947489
level: THE WORM CONTRAPTION in Fantastic Contraption Prius Edition
My first level. Hope u like ;D
1251741966
level: My First Level (e... in Run
My first level v 2.0
1251741402
level: My first Level in Run
My first level

bookwormrwt's awards

bookwormrwt's shouts

avatar for 3mike231
3mike231

Dec 17, 2009 3:20pm

ill collab for you? (draw)

avatar for Jindo
Jindo

Oct 26, 2009 9:38am

Unfortunately I’m far too busy to collab on a game <:C

avatar for Jindo
Jindo

Oct 26, 2009 9:04am

Now let’s go and find that Chocolate Helicopter they told me about D:

avatar for Jindo
Jindo

Oct 25, 2009 2:13pm

My profile tells me you saved me from the zombies, nice one!

avatar for richard11166
richard11166

Sep 27, 2009 4:49pm

hey ok on the game idea when i get paid ill take u up on that game idea.

view all »