Recent posts by johnofjack on Kongregate

Subscribe to Recent posts by johnofjack on Kongregate

avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Game Programming / In AS2, making wasd movements

if(Key.isDown(Key.RIGHT) || Key.isDown(68))
				{
					_x += velocity;
				}
			if (Key.isDown(Key.LEFT) || Key.isDown(65))
				{
					_x -= velocity;
				}
			if(Key.isDown(Key.UP) || Key.isDown(87))
				{
					_y -= velocity;
				}
			if(Key.isDown(Key.DOWN)  || Key.isDown(83))
				{
					_y += velocity;
				}

Unless, of course, you don’t want people using the arrows…

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / End?

Two weeks of voting first.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Game Programming / Searching Forums

google site:kongregate.com/forums “whatever you’re looking for”

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Quick! Rules help!

I made that same mistake.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Last minute promotions!

Mine’s here, but only because I accidentally started the submission process under the regular uploads and then realized there’s no box to check to say it’s part of the contest.

I ended up cutting some of the features I wanted for it…. First one I’ve made, and still I understimated just how much time it takes.

http://www.kongregate.com/games/johnofjack/global-swarming2

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Opinions on my Game

You mean in the onEnterFrame function, surely?

Not a bad game … did you mean for players to be able to buy DoubleShot after they’d bought TripleShot? Because if you do buy them in that order, you can’t change your mind about it.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Game Programming / Multiple movieclips with the same instance name

If you need each instance name to refer to the same symbol/graphic/button, you can put them on different layers or in different objects but use the same instance name. I’ve done that with several different symbols which have the same layers inside indicating different conditions (in this case, whether an upgrade has been bought). Flash let me give them all the same name and refer to them as e.g. upgrade1.bought, upgrade2.bought, etc.

Is this what you’re trying to do? Is it any help?

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Who is yet to submit their game?

I’m still working on mine—yet to draw the last miniboss and boss, and program their actions, or to draw some more minor enemies and implement them too. And the upgrade system isn’t finished/bug squashed. And it needs a title screen and win screen… I’ll probably be up late tonight and spend most of tomorrow working on it too.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Game Programming / Patterns

You need to have an array and push the clicks and presses into it…. no idea about storing the timing though; maybe one of the many better programmers here will know.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / clearing the screen

Ah, thanks so much. It works now!

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / dead day

And then what? Day of the Dead? __

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Game Programming / Hit detection on irregular shapes. Argh!

I’ve been having the same problem; I wish I had an elegant solution to offer but I’ve just been kludging through it trying to make things hit where it looks okay. Better shape detection in Flash would be great.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / clearing the screen

Sorry if this has been posted before, but I didn’t find it.

For the last week I’ve been trying to figure out how to clear the screen of all objects when you die. The tutorial tells you how to clear it of enemies, and that part works, but I also have bullets, rewards, and powerups flying by onscreen and I don’t want those to stay once the game is restarted.

I tried loading them into an array like the enemies, and using a “for i in” loop to removeMovieClip() but either that doesn’t work or I’ve done it wrong.

The yen array is in the Ship class because I want the Ship’s explosion to remove all the flying yen so they can’t be collected at the start of a new game.

var rootYen;

in onLoad() :

rootYen = []; // array for onscreen yen to be able to destroy them later

Then in the enemy’s class, once the enemy is destroyed:
_root.rootYen.push(FiveYen);

And back in Ship.as, in the explode function:
for(var i in rootYen)
{
rootYen[i].removeMovieClip();
}

I’ve also tried
for(var i in rootYen)
{
this.removeMovieClip();
}

Any ideas what I’ve done wrong?

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: General Gaming / Zilch Awards

I got over 8,000 points in one turn, which must be extremely rare: it started out with two 1500-pt rolls and I don’t remember where it went from there.

I doubt I’ll get many of the “consecutive zilch-free” awards though.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: General Gaming / Zilch Awards

The ones for consecutive zilch-free wins would be really hard. Most of my games have at least one zilch, not because I’m greedy but because I can’t bank for 2 or 3 turns in a row and have to keep rolling to try to reach 300 pts.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / editing pngs in Flash?

Ah. Thanks for the answers.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Who is still working on his game?

Still working on mine: halfway through the second-to-last shootorial, reworking art, yet to add new behaviors and upgrades.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Cannot get my health bar to work

Awesome. I’m glad you solved it.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Cannot get my health bar to work

Whoops, sorry. No, that was probably a problem with StuffIt; I downloaded a newer rar extractor and that handled it fine. Now the problem is that MX won’t open your .fla file, so I can’t take a look at the timeline….

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Cannot get my health bar to work

[deleted bits about the file not extracting at all]

I got it to extract, but I think my Flash version is too old … I have MX and it reports an unexpected format when I try to open your .fla.

The updateHealth function looks fine though.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Cannot get my health bar to work

According to the Shootorial, you need a movie clip named “healthMeter”. Inside it you need a movie clip named “bar”.

To do this, make your healthMeter movie clip on the stage then double click on it. Then draw the bar that goes inside it, and convert that bar (but not the surrounding box) into a movieclip. Give the movieclip the name “bar”, click the box “export for Actionscript” and give it the identifier “bar”, don’t give it a class, and then do give it the instance name “bar”.

This should work with the code from the Shootorial—at least it did for me, so I’d be surprised if it didn’t.

If it doesn’t, though, then it would be helpful to post a description of what happens, especially if it gives any errors.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / editing pngs in Flash?

How do you edit a .png after you’ve imported it? I’ve tried double clicking on it and I’ve tried converting it to a symbol and then choosing either “edit” or “edit in place.” Using the eraser on it does nothing; and I have the same problem with the pencil and the brush.

What am I doing wrong?

Alternatively, is there any way to import the png and draw over it, but having each brush stroke mesh with the other brush strokes of the same color? Every time I draw something that I have to fill in a bit, every stroke of the same color is registered separately so that when I try to adjust the contours later, I might grab one of a dozen or so. But it’s all the same color and what I’d like to do is adjust the contours of the border between that color and the next.

Does this description make any sense?

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / adding boundaries

Yeah, just skip my first post and go to explodingferret’s. Much easier way to do it.

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Health Bar Working Weirdly

Is this what’s happening?

 
avatar for johnofjack johnofjack 34 posts
Flag Post

Topic: Kongregate Labs / Healthbar scales down from both ends

Thanks for this. That helped me too.