Friday, May 30, 2008

BLOGGERRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR

That's not going to be an annoying title!

wELCOME TO www.b.loggar.net (it's dot com!)

here is some new code for wall hit test that works relly G00D(ly):

onClipEvent(enterFrame){

var radius:Number;
radius = ((_root.player._width)/2)

var position:Array = new Array();
position[0] = (_root.player._x); //up
position[1] = (_root.player._y - radius);
position[2] = (_root.player._x + (radius*cos(45)));
position[3] = (_root.player._y - (radius*sin(45)));
position[4] = (_root.player._x + radius); //right
position[5] = (_root.player._y);
position[6] = (_root.player._x + (radius*cos(45)));
position[7] = (_root.player._y + (radius*sin(45)));
position[8] = (_root.player._x); //down
position[9] = (_root.player._y + radius);
position[10] = (_root.player._x + (radius*cos(45)));
position[11] = (_root.player._y - (radius*sin(45)));
position[12] = (_root.player._x - radius); //left
position[13] = (_root.player._y);
position[14] = (_root.player._x - (radius*cos(45)));
position[15] = (_root.player._y - (radius*sin(45)));

if(Key.isDown(Key.DOWN)){
if(!(_root.wall.hitTest(position[8], position[9], true))){
_root.player._y += 2;
}
}
if(Key.isDown(Key.UP)){
if(!(_root.wall.hitTest(position[0], position[1], true))){
_root.player._y -= 2;
}
}
if(Key.isDown(Key.LEFT)){
if(!(_root.wall.hitTest(position[12], position[13], true))){
_root.player._x -= 2;
}
}
if(Key.isDown(Key.RIGHT)){
if(!(_root.wall.hitTest(position[4], position[5], true))){
_root.player._x += 2;
}
}
}


So yeah... I haven't implemented the four corner points yet but the other ones work.

Explanation: the player can move right unless the right side of the body hits the wall etc.

shreck is a darth red and black painted person

btw player is a mc that is shape in a circal

Thursday, May 29, 2008

Maybe A good blog

I have been working on AI:

var time:Number = 16.66;
var delay:Number = 16.66;

function walk(){
_root.circle._x += 3;
clearInterval(delay);
}

delay = setInterval(walk, time);


Sets two variables, creates a walk function, and the final line executes the walk function over an interval (setInterval). Delay is how often it executes the interval and time is how often it executes the function (I think).

Friday, May 16, 2008

Game is coming along fine now.

TODO:
1) write better blogs. (ones that have capital letters at the beginning of each "sentence")
2) limit power on the laser (chance for upgrades)
3) make levels and make Ethan draw cool pictures for the levels

Monday, May 12, 2008

A better post than the last one

Third level contains walls. They continue to be a pain since walls near each other conflict and cause the player to be jumpy. The player also sticks to the walls (cannot move diagonally away).

Levels 1 and Too

Two levels are complete. They are actually fairly difficult... Evil things, money, and weird camo tables with watering cans inhabit the desolate green landscape. There really isn't a point to this game yet.