Recent posts by KimmelGames on Kongregate

Flag Post

Topic: Game Programming / Flash Platformer Newbie Question (AS2)

Wonderful :D
Works like a charm!

 
Flag Post

Topic: Game Programming / Flash Platformer Newbie Question (AS2)

Is there any software that can aid in the creation of those arrays? i.e.: I highlight different squares with different colors and it gives me a nice little array.

I doubt it…

 
Flag Post

Topic: Game Programming / Flash Platformer Newbie Question (AS2)

Originally posted by saybox:

Your question and clarification make it a lot less clear what you actualyl want :D

For rectangular, block shaped walls, find Emanuele Feranato’s blog and look for his AS2 platformer tutorial. You’ll need to modify it slightly if you don’t want to use tiles, but it works fine without too much extra work.

Ah yes, the old school array and iteration method. It doesn’t sit well with lazy peeps like me, but it appears to be my only option.

 
Flag Post

Topic: Game Programming / Flash Platformer Newbie Question (AS2)

Originally posted by qwerber:

Collision is always never done with hitTest, but math.

Care to explain?

I’d rather not bother with bounding boxes or distance formulas, although I do understand how to use them.

 
Flag Post

Topic: Game Programming / Flash Platformer Newbie Question (AS2)

Hello. I am looking to create a flash platformer, but I am having trouble determining what to do regarding walls.

Question A:
A stupid question, yes, but the shootorial has not prepared me (surprise surprise…) for dealing with walls. I don’t see how I could create a universal wall class when they will be different shapes and sizes. Would I be able to make one big class made up of several smaller graphics spaced apart without the hitTest() function tripping (ask me to clarify if that doesn’t make sense)?

And question B:
When I make my walls, how can I tell from what side my character hits it from? You know, How to tell if a character ran into the top of a wall (push back it’s _y value), or the side (push back it’s _x). Also, with the proposed solution to Question A, how could I allow the character to, say, keep moving left/right if it ran into a wall from the bottom?

Okay, I’m assuming the proposed solution to Question A needs clarification anyway. Suppose I added a rectangle over here, another over there, and one somewhere over in that direction, then highlighted them all and turned them into a class, and then added AS to (heh, “AS to”) that class with some hitTest() functions. Then, if the ship went inside the class but well between the rectangles themselves, would hitTest() trigger as positive (bad) or stay negative (good).

Feel free to give nagging for clarification or laugh at my lack of coding knowledge.

 
Flag Post

Topic: Game Programming / Camera Panning AS2 Newbie Question

Works like a charm!

GameBuilder15: Care to explain why?

 
Flag Post

Topic: Game Programming / Camera Panning AS2 Newbie Question

So, this “Vcam” thing… :P

I assume that I just move it by changing the _x and _y, and Stretch and such with width and height? Could it all be so, simple? Where does one find documentation on the use of it?

 
Flag Post

Topic: Game Programming / Camera Panning AS2 Newbie Question

Hmmm, worth a shot… :D

 
Flag Post

Topic: Game Programming / Auto-correct destroys my code!

Calm, guys.
evan: Does your IDE use multiple languages? Check to make sure it’s the right one.

As a temporary fix, does putting the open-curly-brackets on the same line as the thing that comes before them? That may help the syntax checker.

 
Flag Post

Topic: Game Programming / Camera Panning AS2 Newbie Question

Status: Resolved

Hello all. I am looking for a way to have the camera in my flash platformer game follow a character. Is there any simple ways to achieve this like (I doubt this…)
root.camera._x = this.x;
Or will I have to break down and move everything BUT the character in the opposite of the direction the character is moving.

This game is only 2D, of course, and is being made in CS5 with AS2.

I get the feeling that there will be a comparatively easy way to do this in AS3, just because the universe mocks me so.

Also, if I go with my backup option to panning (moving everything else) would I be able to make a single flash file creating a new class named, idk, “Thing”, and then add the functions and such necessary to make it move in the opposite direction of the player, then extend class “Thing” to make everything else (obstacles, pickups, etc.)?

I.e:

Thing.as:
class Thing extends MovieClip
{
//assorted code, when the player “moves” down so many pixels, this._y – (all those pixels), and so on and so forth.
}

Wall.as:
class Wall extends Thing
{
//Various wall things
}

Does that make any sense?
Cookies will be passed out for helpful answers.
PM me if you want a cookie or a comment or an answer and I am not there to deliver it.

 
Flag Post

Topic: Game Programming / mouse events actionscript 2

Thank you SO MUCH skyboy! That is a LIFESAVER. All the stuff on Google only covered event listeners. XD
Thank you!

 
Flag Post

Topic: Game Programming / Let's talk about trigonometry! (AS2 newbie question)

Originally posted by jonathanasdf:

you can always just copy and paste ° from your message. Not that it has any purpose in this discussion anyways.

Have you taken trig before? If not, I definitely recommend you learning it first somewhere. There’s tons of stuff available online, but you can always ask your parents or find some block of time after school where your math teacher is available and ask him/her to give you a crash course on trig. First of all what is the opposite and what is the adjacent depends on which angle you are referring to. If you are referring to the bottom right angle, then the opposite is the vertical line and the adjacent is the horizontal line.

Now if you recall from the trig classes you took, sin(angle) = opposite/hypotenuse and cos(angle) = adjacent/hypotenuse. Rearranging them you have

opposite = sin(angle) * hypotenuse, adjacent = cos(angle) * hypotenuse

Now all you have to remember is to convert the degrees to radians.

Thank you! Now, while I have not taken trig (only Algebra 2 ): ) yet, I do have rudimentary knowledge of trig. SOHCAHTOA and all that. HOWEVER: Somehow that last bit (about opposite = sin(angle) * hypotenuse, etc) never occurred to me. Thank you very much.

And now that you mention it, I suppose you could copy and paste, that too never occurred to me XD.
I just figured if someone wanted to give example problems or such, they could use it. :) And then I’d feel helpful instead of feeling like someone leeching off of the trig knowledge of others.

Problem solved, case closed.

 
Flag Post

Topic: Game Programming / Let's talk about trigonometry! (AS2 newbie question)

Question has been answered already by the time you opened this forum topic. Thanks for looking with the noble intention of teaching or sharing, anyway.

I recently started working with AS2, and today I ran into an interesting problem, more trig related than anything else. So, here’s the scoop:

I have a right triangle in my program:
|\
| . \
| . . .\
|]____(\
I know the hypotenuse (spelling?) and the bottom right corners angle. And I know that the bottom left is a right angle. I want to find the distances of the opposite and adjacent. Now I know that 90° (I know, I’ll have to convert all of this into radians DX) anyway, 90° minus the degrees of the bottom right angle = the top left angle’s degrees.

But how do I get the adjacent and opposite with those?

For discussion purposes, Alt + 248 will make a degree symbol for your replies: “°”. But you need to use the numeric keypad to the right of most non-laptop keyboards. I have no idea why.