Recent posts by facelesscoward on Kongregate

Flag Post


SM3000 appears to be admitting to hacking here:

EDIT: Yeah, SM3000 is using damage hacks.

Flag Post


shesawy has infinite grenades

Flag Post

Topic: Game Programming / a Question

That’s the problem. If you place code on a MovieClip or Button, it has to be in an onClipEvent handler. Having little pieces of script scattered all over the place can result in poor organization, though. I suggest trying to put most of your code in a layer on the main timeline, if not in separate .as files.

Flag Post

Topic: Game Programming / Some help, I need...

gotoAndStop(_currentframe + 2);

Flag Post

Topic: Game Programming / Hit test help...

The built-in hitTest method uses bounding boxes.

Flag Post

Topic: Game Programming / [help] accessing instance name

I understand that all you want to do is be able to tell what type of MovieClip a particular known MovieClip is? There is no built-in way to pull the linkage identifier from a MovieClip. If you know the type of MovieClip you have when you create it like Kalinium suggests, I think the simplest thing to do would be to simply add a custom property to each MovieClip on the stage. For example,

attachMovie("car", "someMovieClip", this.getNextHighestDepth());
someMovieClip._type = "car";



when you want to retrieve the identifier.

However, if you aren’t creating the MovieClips dynamically, and/or you don’t feel like manually assigning a type to each one, the only approach I can think of would be to use object-oriented programming in some form. Personally, I would recommend creating external classes for each item in the library. For example,

In (with the car exported for ActionScript and having a Class name Car in the linkage properties of car):
class Car {
	public var _type:String = "car";

Then, when you trace someMovieClip._type in your fla, it will be “car” (or whatever you want it to be). A really basic example (zip).

Really, best practices would probably encourage using a getter method so the _type property isn’t changeable, but the solution listed above is simple and should work. If you want everything contained within one file, you’re going to need to use AS1 OOP techniques, but I don’t really know anything about that.

Flag Post

Topic: Game Programming / Thinking about learning flash

not free. thanks for trying. any ideas on a tut to learn Action Script?

Actually, the Flex 3 SDK (not the Flex Builder) is open source and free. The included compiler is command-line, though, so you don’t have the benefit of having an IDE (the drawing tools and the library and whatnot) that Flash provides. You can download it here if you’re interested, though I would personally recommend Flash if possible because it is much, much easier to dive into.

Flag Post

Topic: Game Programming / kongregate highscore API

Kongregate automatically does the high score lists that you see all over the site and in the chat areas of games. You only need high score retrieval if you want to make high score lists visible from in the game itself.

Flag Post

Topic: Game Programming / kongregate highscore API

You don’t need that code unless you’re trying to retrieve the scores for your game from the server. The only things you need to include in your game are _root.kongregateServices.connect(); (preferably on the first frame, I believe), _root.kongregateScores.submit(scoreVariableNameHere); wherever you submit your scores, and optionally _root.kongregateScores.setMode(“ModeNameHere”); if your game has different scoring modes.

Flag Post

Topic: Game Programming / kongregate highscore API

Yeah, you should just replace 1,000 with the variable you’re using to track the player’s score. If your game has different high score modes such as Easy, Normal, and Hard, you use _root.kongregateScores.setMode(“Mode Name Here”); before submitting the score.

Flag Post

Topic: Game Programming / Signed right shift operator

Okay, so I’m reading Colin Moock’s Essential ActionScript 3.0. In Chapter 26 on Bitmap Programming, when he’s talking about manipulating color values, he uses bitwise operators and directs the unfamiliar reader to his website for an introduction to bitwise operators.

From his website:
bq. All bits are shifted right by the number of positions specified by n. Any bits shifted off the righthand side of the number are discarded. New bits are added on the left side to fill the void created by the shift operation. If operand is positive, the newly added bits are zeros. If operand is negative, the newly added bits are ones (because negative numbers are represented in twos-complement).

This makes sense to me because we talked about twos-complements when we were talking about binary representations in my programming class at school, but then he provides the following example code for extracting the different parts of a color value…

var colorValue:uint = 0xFFFFCC99;
var nAlpha:uint = (colorValue >> 24) & 0xFF;
var red:uint = (colorValue >> 16) & 0xFF;
var green:uint = (colorValue >> 8) & 0xFF;
var blue:uint = colorValue & 0xFF;

trace(nAlpha, red, green, blue);

…which works. But I see the alpha part, and I think, ‘Hey, if he’s shifting the 32-bit positive binary representation of a color 24-bits to the right, shouldn’t zeroes be added to the beginning with the only thing remaining being the eight bits that represent the alpha value?’ So I cut off the “& 0xFF” from the second line and test it. It gives me the following output:

4294967295 255 204 153

I think, that’s odd. So I modify the trace to convert nAlpha to a binary representation with nAlpha.toString(2) (which outputs it in base-2), and it gives me:

11111111111111111111111111111111 255 204 153

A little more testing shows that it’s adding 1s, not 0s to the beginning of the value when it shifts it to the right, even though the color value is positive (isn’t it?). So I guess what I’m trying to ask in a very long-winded way is, does a signed right shift not work as Moock described on his site or am I missing something?

EDIT: Oh! Does it have something to do with the fact that he’s using unsigned integers, meaning that there are no twos-complement negative values because there are no negative values, with a signed right shift, which still treats the value as if it were a signed integer?

Flag Post

Topic: Serious Discussion / War on Scientology

JesseMH8: But you could make the argument that L. Ron was a prophet, and in that sense, the only difference between old religions, which were invented by people who have been dead for a long time, and Scientology, which was invented by someone who has been dead for a short time, is the amount of time that they have existed.

In large part, it isn’t the fact that Scientology has outlandish beliefs that turns people off so much as it is the behavior of the Church of Scientology. There are allegations that it has blackmailed people, attempted to steal and destroy evidence of its wrong-doings, prevented criticism from behind the veil of copyright law, and even killed a few folks.

milskidasith: I think you’re ranting against antitheism. Atheism simply requires that you lack belief in a god or gods, not that you express certainty that they don’t exist. Regardless, I would argue that, while declaring the nonexistence of god is not purely logical, it is more logical than you give it credit for. I hate to pull out the Flying Spaghetti Monster analogy, but it’s very apt in this sort of situation. If you asked me, in seriousness, if there exists a Flying Spaghetti Monster, I would say no. Of course, I have no way of knowing with certainty that the Flying Spaghetti Monster does not exist and certainly no way of proving its nonexistence, but the fact that no one has provided me with any evidence of its existence is enough for me to safely assert that it does not exist.

Flag Post

Topic: Serious Discussion / Video Games as Art?

I tend to think as art “something that a being created for no practical use other then atheistic.” So, while a landscape might be beautiful I wouldn’t considered it art, wheres as a painting of the same landscape I would.

Art is godless.

Hehe, but seriously, I don’t think that the goal of art should be constrained to achieving some aesthetic ideal. I hesitate to get involved in this sort of discussion, though, because I don’t think the answer really matters. Art is entirely subjective, and while it feels wrong to just let someone like Ebert sit around and de-legitimize our medium, I don’t think there is any way to make a real argument against such a person without putting art in a box ourselves. If we really want people to accept games as art, then we should make games that mean something to us, and maybe they’ll mean something to other people who experience them, too.

Flag Post

Topic: Game Programming / Switching frames vs. attachMovieClip

@Phoenix00017: Is it a public function?

Flag Post

Topic: Serious Discussion /

Torture is illegal. Warrantless wiretaps and searches are illegal. Heck, look up Bush signing statements and you’ll see that he claims the right to violate hundreds of laws that he signed.

Flag Post

Topic: Kongregate / Suggestions

An RSS feed for each developer’s games so we could subscribe and see when a developer we like puts out a new game would be pretty cool.

Flag Post

Topic: Serious Discussion / Astrology, is it true?

I like the ones that give advice. Sometimes you need a piece of irrelevant advice.

Flag Post

Topic: Serious Discussion / UFO's

I know they exist because there have been flying objects that remain unidentified. Now, whether they were being controlled by extraterrestrial life, I don’t know.

Flag Post

Topic: Serious Discussion / Ron Paul

I think Ron Paul overestimates people’s altruism and awareness of the market. An informed and good-natured consumer base can regulate all industry with little government regulation, but the fact is that we don’t live in an ideal world and too many people just don’t care for the extreme laissez-faire ideals to be practical.

That said, I still think Ron Paul is the best candidate that the GOP has to offer, and it is refreshing to see someone who actually seems to believe what they say and say what they believe for once.

Flag Post

Topic: Game Programming / Pong Help

Add an updateAfterEvent() call to the end of the timer function. The problem is probably that (though, admittedly, I didn’t actually read your code beyond this, so it could be something else) the game calls the function at those times but still only refreshes the stage according to the framerate. updateAfterEvent() causes the game to refresh the screen outside of its normal framerate.

Flag Post

Topic: Serious Discussion / Survey: Social Groups for President

3 Jew

1 Black

4 Hispanic

5 Asian

8 Homosexual

6 Native American

10 Muslim

7 Disabled

9 Atheist*

2 Woman

Have you voted in a United States Government election before? NO

Do you plan to vote in the upcoming election? YES

Flag Post

Topic: Serious Discussion / God, the Bible, and religion - a Kong search for truth

By perfection, I mean well, something that I can’t actually define because I am imperfect, and I although its possible I have an entirely correct idea of perfection, more likely that I don’t. Im recognizing that there IS an absolute meaning to perfection, and that god is it, but im saying that I wouldn’t be able to define it. So by saying that other people have different ideas of perfection, opinions can be right or wrong, but an opinion can’t come from nothing. And I never said that my ideas of perfection need to be correct, because god’s existence isn’t dependent on our thoughts, I’d say he created them, so our thoughts of perfection are dependent on him. Like in your garden example, I’m saying that the garden’s existence doesn’t depend on our thought of it, but the existence of our thought depends on their being such thing as a garden. And even if your thought of a garden was wrong, it wouldn’t matter, because as I said, something can’t come from nothing, so even your wrong thoughts came from assessing something that exists.

Let’s assume you’re right. It’s impossible to conceive of something outside of our experience. I think I can explain perfection on the basis of experience, starting with numbers. We look at a star in the sky and we recognize that as one individual star in the sky. Then, by extension, we can imagine that there are four stars in the sky, or nine, or sixteen until it’s impossible to comprehend how many stars we are imagining. Regardless, we know that no matter how high we go, we perceive that we can always add more stars to the sky. Thus, we perceive infinity from the idea of numbers. Although we never actually see infinity, the idea exists because we can expand the idea of multitudes to that level. Then, we can apply the same concept to perfection, though, as alexmiller pointed out, good and bad are subjective, so what perfection exactly is depends on the person. Regardless, if an individual is capable of interpreting some level of “good,” that individual can expand that idea to grasp this notion of infinite good, or perfection. It’s like limit problems in calculus. The limit as good approaches infinity is perfection.

Another thing I’d like to add to the discussion is do you really think that the way things are now, the complexity of our world and our universe, could possibly come together the way it has without a supernatural entity (or multiple entities) somewhat or fully affecting the outcome? From a statistical/mathematical stance, I think it’s absurd. Everyday we learn more and more as a race about how complex things are, discover new things, etc. I just find it hard to believe that there is NOTHING out there, that there is no supreme being(s).

I think it’s absurd, from a statistical/mathematical stance, that a God complex enough to create a complex universe came into existence (or even more far-fatched, has always existed). Now, I can’t explain the origin of everything to you, but I find it much easier to believe that something extraordinarily simple happened and that complexity grew from it over billions and billions of years than to believe that some supernatural being simply created everything at once.

Flag Post

Topic: General Gaming / world of warcraft awsome or not

Grinding is a pejorative term used in computer gaming to describe the process of engaging in repetitive and/or non-entertaining gameplay in order to gain access to other features within the game.1 The most common usage is in the context of MMORPGs and JRPGs, most often Final Fantasy and Dragon Quest, in which it is often necessary for a character to repeatedly kill AI-controlled monsters, using basically the same strategy over and over again, in order to advance their character level to be able to access newer content.

Source: Wikipedia

Flag Post

Topic: General Gaming / world of warcraft awsome or not

I don’t like any MMORPGs. I find the grind and the time spent to be very unrewarding.

Flag Post

Topic: Serious Discussion / Homosexual Marriage

Strange isn’t it? You’d expect the opposite looking at it from a competition/resources standpoint .

(Ya, but lezbianss r soo hawt. lawl)




Also, if you can have sex without getting married, why can’t you have kids without getting married? I see marriage as more of an expression of commitment than anything. After all, not all heterosexuals who get married have children.