Recent posts by IndieFlashArcade on Kongregate

Subscribe to Recent posts by IndieFlashArcade on Kongregate

Jul 16, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / Make yer own spaceship!

YEE-HAW http://www.indieflasharcade.com/tutorials/Simpl…

 
Jul 16, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / how to set an area to click?

yay SimpleButton!

 
Jul 11, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Kongregate / Ultimate Kongregate Photo Topic

This is me in a cafe in Berkeley, CA

 
Jul 11, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / graphics class in AS3

Not wasteful. The computer does all the work for u :P

Besides, I’d wager that by including all those circles in one fill, you’re putting more stress on the vector engine than by separating them out.

On your second question, you can always draw the background before drawing the circles. Or, separate them into different Sprites (better than MovieClips unless you need a timeline), and do like:

parentSprite.addChild(backgroundSprite);
parentSprite.addChild(circleContainer);

Now you just render your circles in the circleContainer. Badda-bing.

 
Jul 7, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Kongregate / Home Page Upgrade -- Looking Good

Hey I just surfed in and noticed that Kong made a new upgrade to the featured games portion of the home page. Me likey! It’s always good to have more variety and besides, I like moving things.

What do other people think?

P.S. lol this is my first post in ages! So, if this topic is old hat.. that’s why.

 
Jan 31, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / Collision Detection Help

LOL, after reading fucrate’s post, I’m so tempted to bust out a simple moon lander game… sooo tempted.

 
Jan 27, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / AS 2 Classes

Well, I did say “periodically”.... :)

 
Jan 27, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / AS 2 Classes

Pretty much.

At this point, you need to “abstract” the functionality of your basic mech class so you can create an object.

Say for instance each one has a velocity, speed, direction, size, etc. You can create variables to hold all of those values internally, which means that each mech object will have its own velocity, speed, direction, size, and so on. So, no more arrays, no more mess. Creating custom objects really is about organization, and making things easier for the programmer to design and conceptualize what each object needs to do. It also keeps your code from getting really messy, since everything is tidied up into separate classes. That way, the functionality that is related can be grouped together, and vice-versa, the functionality that is not related to a class, can be kept outside, or in another class.

Ok I’ll write a simple mech class here and show you how easy it is (this will take me like two or three minutes):

class mech extends MovieClip {

  static var nConversion:Number;
  private var nSpeed:Number;
  private var nSize:Number;
  private var nRadians:Number;
  private var vx:Number;
  private var vy:Number;

  public function mech() {
    nConversion = Math.PI / 180;
  }

  public function moveForward() {
    doVelocity();
    //using the 'this' keyword...
    this._x += vx;
    this._y += vy;
  }

  public function moveBackward() {
    doVelocity();
    //...is the same as not using it
    _x -= vx;
    _y -= vy;
  }

  private function doVelocity() {
    nRadians = this._rotation * nConversion;
    vx = Math.cos(nRadians) * nSpeed;
    vy = Math.sin(nRadians) * nSpeed;
  }

}

Then, back in your main code, you will probably use an Array to keep track of all the mechs on stage, but you will now only need to keep track of the objects themselves, and not manage huge arrays of other data. Assuming you export a MovieClip (the graphical element) from your library with the identifier “alphaMech”, and export it as the mech class, you can write:

var allMechs:Array = new Array();

//create mechs
for(var i:Number = 0; i < numberOfMechs; i++) {
  var newMech:mech = attachMovie("alphaMech", "newMech", this.getNextHighestDepth(),
                                                  {nSpeed:10, nSize:20});
  allMechs.push(newMech);
}

selectedMech = 0;

//key left
this.onEnterFrame = function() {
  if(Key.isDown(Key.LEFT)) {
    allMechs[selectedMech]._rotation -= 5;
  } else if(Key.isDown(Key.RIGHT)) {
    allMechs[selectedMech]._rotation += 5;
  }
  if(Key.isDown(Key.UP)) {
    allMechs[selectedMech].moveForward();
  } else if(Key.isDown(Key.DOWN)) {
    allMechs[selectedMech].moveBackward();
  }
}

Something like that. You can take that code and play around with it, and find something that works for you.

Incidentally, I have a tutorials section on my Web site, but I am too lazy to update it most of the time (http://www.indieflasharcade.com). Check it out, and I think I may add this as an example of how to write a simple class ;)

-Indie

 
Jan 27, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / On Ads and Latency

As a game developer, I work hard to try and make my games run at as high a framerate as possible, which invariably means optimizing my code in every way possible, trying to squeeze out that extra frame or two per second that will make all the difference in the user experience.

That’s why I find it quite frustrating when a game (so lovingly optimized) is running on the same page as some poorly-coded, graphically intense banner ad which uses tons of video and graphics processing and essentially just sits there, completely useless. This happened to me today while trying to play Fancy Pants world 2. This ad (the one with a wizard shooting fire or something like that), completely sucked up all the bandwidth—FP was forced by the browser to share processing with this pile of crap ad, which was probably coded by some intern somewhere, and it could barely even run.

As a developer I find this sickening and say to these so-called Flash designers who create monstrosities like that one: Nobody is impressed by your ostentatious use of Flash video and fancy gradients, so just give it a rest and make an ad that doesn’t crash the content that it’s supposed to be sponsoring.

Yeesh.

 
Jan 27, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / AS 2 Classes

It won’t help unless you use it properly, but that’s not too difficult to imagine a scenario where you might need them.

Ok, so say your ball needs to have a few variables (properties), like velocity:

private var vx:Number;
private var vy:Number;

Maybe the ball is supposed to move across the stage, so you write a function that will move the ball:

public function moveBall() {
  this._x += vx;
  this._y += vy;
}

So now, imagine that you want to have 10 balls on the stage at once. Instead of writing some complex logic to keep track of all the balls and their velocities, and a function to move them all, you only need to use one command on each ball: moveBall(); That way, you can “encapsulate” all the funcionality of the ball into a single class, and create as many balls as you need.

Also you can use inheritance to create different types of ball, each building on the basic ball class, simply by extending the class. That way if you need three different types of ball that all have the same basic functionality, you don’t have to re-write the code for each one—just extend the class and add on the additional functionality to the new class.

 
Jan 27, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / AS 2 Classes

Yeah that code would work if you had a ball class defined in ball.as. The as file could look something like:

class ball extends MovieClip {

  private var myVar:String;

  public function ball() {
    //constructor
  }

}
 
Jan 12, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Games / New Look

You make some good points, underseige. You’re right I wasn’t aware that you are a game programmer; I played Sketch Pac and it was pretty good.

As for my site being “mainly” Flash, I think it’s actually mainly HTML. Also, being a Flash developer doesn’t preclude me from being a Web designer also, and I have developed other sites before without even using Flash. The pages on Indie Flash Arcade are all HTML, and all the game and tutorial pages are also in html. I used Flash to develop the functionality of my game section, which is still not very useful admittedly, but will soon be integrated with other site features vis JavaScript. I’m adding some new features to it as we speak ;) But, only the menu and certain other things like the games browser are done in flash, the rest is HTML.

Anyway you said:

My site was completely made by me, so I don’t know what you are implying by saying you’ve seen dozens of sites with the same layout. Hopefully you are not saying you think it is an off the shelf script.

And I think I should clarify, I don’t think it’s an off-the-shelf script or anything like that. I can tell that it’s an original site and it looks pretty good, I’m really not trying to criticize it too much because it’s not bad at all. I do feel like it’s pretty similar in it’s general design to a lot of sites, with sections for different genres, main page, etc. Taking a closer look, I see you’ve got a list of planned features that seems interesting, so hey more power to you man.

 
Jan 11, 2008
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Games / New Look

Hi undersiege,

I just happened across this thread and, after reading the thread and checking out your homepage, want to throw in my two cents.

It should be said that I also have a small, relatively unknown games site, http://www.indieflasharcade.com. Now, I’m not advertising on my site and hence not making any money, it’s mostly there for fun and to show off some of my work, and I’m not claiming to be a portal either—I spend most of my time developing Flash content, rather than working on my Web site (although incidentally, another major update is coming in a week or so).

As an independent Web site owner, there is no way that I can compete with the juggernauts like Newgrounds or Kongregate, who employ dozens of people, and if you’re independent like me you’re probably going to realize that it’s a TON of work to try and keep up. I find it interesting that you didn’t mention Bubblebox, because there is another small site, which I believe is run by two or so people, which does rather well and seems to share a certain aesthetic with your own. Bubblebox develops their own games like I do, and that is a big traffic draw (I got 12,000 hits a day when POD was in full swing), but without that, you will need something else to bring people in.

Seriously though, I’ve seen a TON of sites out there with almost the exact layout that you’re using, the exact features, the same general aesthetic. I don’t think you can just show up, build a site, and expect to immediately be in the same league as your Kongregates or your Newgrounds, or sites like ArmorGames, CrazyMonkey, and etc., etc., etc.

Now this isn’t to say that you can’t do it; I say “go for it!”, but it’s a bit premature to say that you’re already competing with NG and Kong :)

 
Nov 24, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Kongregate / Some Questions

To put as simply as possible, the best almost any flash developer will ever get for his/her game is about $1000.

Not quite true. I know as one example, AdamSchroeder made upward of $4,000 off of Asteroids Revenge III, so it’s possible to get that much or more from a Flash game.

Sounds like Wan2Play is just trying to find another excuse to hate on Kongregate, when it’s really one of the few sites out there that even tries to share their ad revenue with developers. I’ll be happy to share what I’ve made so far in ad revenue… it’s about $10-15 dollars so far. Hey not too bad, considering it’s extra on top of sponsorhips and contest winnings.

Kong is a great site, run by great people, and the more people support it, the more money we all can make.

 
Nov 22, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / Triginometry/Shooting help

x+=(sin(angle)speed) y+=(cos(angle)speed) Off the top of my head I can’t guarantee that is totally correct.

Well I hate to break it to ya, but cosine is for X, and sine is for Y. That’s about the most basic trig you’ll ever see.

 
Nov 20, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / java

Not too many Java games on this site… maybe not the best place for Java questions.

 
Nov 17, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Serious Discussion / TragicSpill

For more information, visit The news article about this topic.

 
Nov 17, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Serious Discussion / TragicSpill

This is terrible.. I hope the drunken captains of that ship get some jail time.

 
Nov 17, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / help coding!!!!

The use of extraneous exclamation points is unnecessary. Your question is quite ambiguous.

 
Nov 6, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / interview

1.when did you start making games/animations with flash? About 2 years ago, in 2004/2005.

2.how old were you? 23.

3.how much time do you usually spend making a game/animation? Anywhere from 4 hours to 6 months or more.

4.were (sic)do you get your ideas for games animations? Pop culture, internet, other artists, classic art, music, hallucinations.

5.what version of flash do you use Flash 8. um.. yeah.

6.what got you started in games/animations? I made my first game when I was 9 years old, it was a halloween text adventure. It was out of sheer boredom.

7.what do you think is your best game/animation? Judge for yourself.

8.do you have a website? if so what is it? indieflasharcade.com

9.what websites to you put your games on? My games have appeared on many web sites, but some of the best are: JayIsGames.com, GameBalance.com, IndieFlashArcade.com, Kongregate.com, Bubblebox.com, Jiggmin.com, UgoPlayer.com, Newgrounds.com, Gamegum.com, and some other sites.. there are so many.

10.have any of your games been sponsored? My most elaborate game to date, POD, was sponsored by Kongregate.com.

11.what was your first game/animation made with flash? thank you for taking the time to take this interview First game: Q-Zoid. First animation: A little-known cartoon adventure featuring a character I invented.

 
Nov 6, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / Mouse follower code

This is a cool example of how to make a MovieClip follow the mouse, and “spring” to the mouse position.

Create a MovieClip on the stage and give it an instance name of ‘ball’

// two-dimensional springing example // spring to mouse!
var spring:Number = 0.1;
var friction:Number = 0.85;
ball._x = 0;
ball._y = 0;
var vx:Number = 0;
var vy:Number = 0;
onEnterFrame = function() {
    var ax:Number = (_xmouse - ball._x) * spring;
    var ay:Number = (_ymouse - ball._y) * spring;
    vx += ax;
    vy += ay;
    vx *= friction;
    vy *= friction;
    ball._x += vx;
    ball._y += vy;
};

 
Nov 6, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / Bullet problem.

Awesome. I’m just going to stop posting for awhile…

 
Nov 5, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / Bullet problem.

Okay, okay.

Point well taken, Coder. I am merely pointing out obvious flaws in the advice being given. I mean no personal offense.

I apologize to Sage and I hope that he will continue to contribute to our little programming forum here :)

 
Nov 5, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / Bullet problem.

Wow, you certainly did resort to petty insults, though. I likewise hope that you never speak to me again, but FYI I’m a part of this community, and have been for a lot longer than you. I’m not trying to prove anything here, except proper technique.

You don’t have to be impressed with my skills or my wage, I do just fine without anyone’s approval. I only mentioned what I do for a living so you’d know I’m not full of crap. Not sure you’re worth reasoning with, though…

 
Nov 5, 2007
avatar for IndieFlashArcade IndieFlashAr... 435 posts

Topic: Programming / Bullet problem.

First of all, either contribute something to this guy’s question or stop spamming his thread.

I’m not spamming. Quite to the contrary, I’m giving him advice he can actually use… not incorrect code snippets which will likely just cause confusion.

The (“bullet”…..) part was “fill in the rest of the function yourself”. Could you not figure that out?

No, but apparently you’re not smart enough to know why that code is completely bogus. Do you even know that attachMovie is a method of the MovieClip class? Do you even know what a method is? Can you tell me what the attachMovie method returns? Do you realize that saying
 bullets[i].attachMovie
is assuming the array is already populated with MovieClips? Why do you want to double the amount of clips on the stage? Gimme a freakin’ break. You’re not even writing sensible code.

I’m not sure Indie knows what he’s talking about

I don’t get paid $50 an hour as a professional Flash programmer for nothing, so just chew on that, bub. Regardless of what you think about POD, it’s a LOT better than anything that you’ve done in Flash (wait… have you done anything in Flash??) My guess is that you couldn’t code yourself out of a wet paper bag, but hey, prove me wrong.