Recent posts by Mitiz on Kongregate

Flag Post

Topic: Game Programming / [AS2] 'Any Number' Value

Put all the bullets into an array. Then use a foreach loop. (For each bullet in bullet array)

 
Flag Post

Topic: Game Programming / Big Map Scrolling (Top Down View)

Post ideas you have on how this might work. People then can say whether you are right or wrong, and hopefully push you in the right direction.

 
Flag Post

Topic: Game Programming / Good Programming

Most of these good programming practices are very beneficial when finding errors in your code / maintaining it in the future.

- Indenting (as you mentioned; very handy to see where an if statement begins and ends easily, with being able to identify what is inside it).
- Correct naming conventions (Helpful to name variables after what they are meant to do).
- Modularity of code (Handy in two ways, easier to find errors[less code to look over, can test each section individually] and reuse of code[for future projects you could just come back to it and reuse it]

Any others anyone else can think of, I’m sure they can post. (Y)

 
Flag Post

Topic: Kongregate / New Kongregate Release (NEW CHAT!) - CR 2009.04.22

It appears there is a bug. If you view the scores for a game which has badges, then after the scores have loaded up, if you click chat then click back to acheivements, all of the player levels are still sitting there.

 
Flag Post

Topic: Game Programming / Countdown timer failure!!!!=[

In the Second line of code you have one typing error.

It should be

var today:Date = new Date();
 
Flag Post

Topic: Game Programming / stop;() not working?

Rightclick on the frame and choose “actions”. Then insert stop(); onto the first line.

 
Flag Post

Topic: Game Programming / My 'many questions to success' thread ;P

if (hitTest(objectDraggedByMouse)) {
//LOSEEEEEEEEEEE
}

I think objectDeaggedByMouse has to be changed according to the instance name in your game.

 
Flag Post

Topic: Game Programming / Animated movement in a game?

Do you have any code you have tried? If you could post that im sure someone will be able to help.

 
Flag Post

Topic: Game Programming / Character movment and animation

You will need a boolean in there to ensure that “gotoAndStop(”standUp") is only called once.

So add your boolean in and set it to false. Name it DownKey. Then try this.

function onEnterFrame() {
if (Key.isDown(Key.UP)) {
_y = _y-velocity;

if ( DownKey == false ) {
gotoAndStop(“up”);
DownKey = true;
}

} else {

if (Key.isDown(Key.UP) == false) {
gotoAndStop(“standUp”);
DownKey == false;
}

I think that should work. Then you just have to do that for the other 3 keys.

 
Flag Post

Topic: Kongregate Multiplayer Games / [Remnants of Skystone] Beta Testers Needed for Remnants of Skystone

If you still need this many people. I can help.

 
Flag Post

Topic: Game Programming / My 'many questions to success' thread ;P

This would be a simple version of an object moving towards the mouse.

onClipEvent (enterFrame) {

	speed = 5;
	ydis = _root._ymouse-this._y;
	xdis = _root._xmouse-this._x;
	angle = Math.atan2(ydis, xdis);
	this._x += Math.cos(angle)*speed;
	this._y += Math.sin(angle)*speed;

}
 
Flag Post

Topic: Game Programming / Rotate to Mouse

Try this.

onClipEvent (enterFrame) {
	__y = _root._ymouse - this._y;
	__x = _root._xmouse - this._x;
	angle = Math.atan2(__y, __x)*180/Math.PI;
	this._rotation = angle;
}
 
Flag Post

Topic: Game Programming / Key Down Problems

Not that I’m aware of, becuase the problem is from the keyboard, not the game. You may just have to work around it.

 
Flag Post

Topic: Game Programming / Key Down Problems

Its not the code, It is merely the keyboard. Most keyboards will not register this for some reason.

 
Flag Post

Topic: Game Programming / Animation Problem

Which movie clip had to play once? The movie clip that holds the two others? Or the movie clip which is inside the movieclip.