Recent posts by inthrees on Kongregate

Flag Post

Topic: Kongregate / Chat Applet last-chat timer suggestion

With the rise in popularity (quite a while ago) of idle games, I think this might be a good idea: A little line of text that is perpetually after the last comment in the chat pane that either shows when the last comment was made, or how long it’s been since it was made. (either a time stamp or a ticking timer, I mean – “03:58pm” or “1h 31m ago”)

Some games are good to leave open, and then you come back and the last few lines of chat are interesting but you don’t know if they are hours or minutes old.

Flag Post

Topic: Kongregate / Scrollable game area is incredibly annoying.

To /r/swarsim then! We’ll see what he has to say, if he has the time and inclination.

Flag Post

Topic: Kongregate / Scrollable game area is incredibly annoying.

I’m specifically referring to Swarm Simulator, how the documents in the iframe might be larger than the iframe, necessitating a scrollbar for the iframe. Which every other time I use my mouse wheel to scroll the internal game page, ends up going too far and scrolling the entire page, causing half of the iframe (GAME) to scroll off-screen.

And this happens repeatedly, and is annoying enough that I came here to complain about it. Can the iframe be extended, length-wise, maybe another 50% or so, so this doesn’t happen? Or so it doesn’t happen nearly so often?

Flag Post

Topic: General Gaming / [GemCraft chapter 0] all 229 waves

So I went to and saw on the blog that he’s going for a steam greenlight. I went to steam and voted thumbs up on that, and left a comment about the series in general and my epic quest to beat the 228 in chapter zero, which reminded me of this thread, and PEOPLE ARE STILL DOING THIS? Hahaha, hiya folks!

Flag Post

Topic: General Gaming / [GemCraft Labyrinth] Angering frustration

This is really irritating me and making me not want to play.

Anyone get a multiplier bonus of 0.01 at the end of a game? Yes, seriously, 0.01.

Has anyone figured out what the angering algorithm is, or some general rules? It’s not ‘more = better’ because apparently there is a limit that ruins it.

Flag Post

Topic: Game Programming / Flash/Actionscript 3 Mentor

Plus your questions here, properly answered, will help other people usually. Even the answerers, sometimes. (Or, your questions wherever you are comfortable posting them – doesn’t have to be here. There are lots of flash forums.)

Flag Post

Topic: Game Programming / Help with a button

Look into tweening. I suggest tweenlite and tweenmax (google those) – they’re very easy to import/plugin and use.

Flag Post

Topic: Game Programming / API In My Game

Apparently an hour is average but sometimes a few hours, from what I’ve read here. No need to panic yet.

Flag Post

Topic: Game Programming / [Solved] [AS3] Object Serialization

Originally posted by skyboy:
Originally posted by inthrees:

I have to wonder if your code is dependent on certain processor optimizations being available, because your revised link, by.bloody is faster the first run and on refreshes.

it might be an unintentional optimization for small cache sizes. i’ll work out removing the string length pre-calculation, that should give a nudge of 40% to my code.

but that’s not a really big gain, as the majority of the work is being done by native flash code. my code executes in less than ~25ms, optimizing that out will drop it to 13 ms. and that’s on my machine. the gain is even smaller on your machines.

My understanding is that the processor in this machine has a 128kb l1 cache – 64 for instructions and 64 for data. That’s pretty small compared to contemporary processors, what are you running?


  Windows XP x86  Release PlugIn

JSON Length: 505,324

by.blooddy.crypto.serialization.JSON: 111 ms
by.blooddy.crypto.serialization.JSON: 123 ms
by.blooddy.crypto.serialization.JSON: 121 ms
by.blooddy.crypto.serialization.JSON: 120 ms
by.blooddy.crypto.serialization.JSON: 131 ms

skyboy.text.JSON: 50 ms
skyboy.text.JSON: 43 ms
skyboy.text.JSON: 37 ms
skyboy.text.JSON: 40 ms
skyboy.text.JSON: 43 ms

That’s much more in your favor now, though.

Flag Post

Topic: Game Programming / [Solved] [AS3] Object Serialization

I have to wonder if your code is dependent on certain processor optimizations being available, because your revised link, by.bloody is faster the first run and on refreshes.

Flag Post

Topic: Game Programming / [Solved] [AS3] Object Serialization

I wish I could hook my monster up. I’m sure it’s not the fastest machine in the forum by a long shot, but at least it wouldn’t embarrass me. =p

Flag Post

Topic: Game Programming / [Solved] [AS3] Object Serialization

  Windows XP x86  Release PlugIn

JSON Length: 505,323

skyboy.text.JSON: 154 ms
skyboy.text.JSON: 165 ms
skyboy.text.JSON: 127 ms
skyboy.text.JSON: 173 ms
skyboy.text.JSON: 144 ms
by.blooddy.crypto.serialization.JSON: 186 ms
by.blooddy.crypto.serialization.JSON: 143 ms
by.blooddy.crypto.serialization.JSON: 140 ms
by.blooddy.crypto.serialization.JSON: 146 ms
by.blooddy.crypto.serialization.JSON: 142 ms

This is an old computer – AthlonXP 1700+

Flag Post

Topic: Game Programming / [Solved] [AS3] Object Serialization

Slavish devotion to a ‘no double posts rule’ is not really desirable.

Flag Post

Topic: Game Programming / About importing in AS3

Slow down there, ZeroCool! =p

Flag Post

Topic: Game Programming / About importing in AS3

Originally posted by GameBuilder15:

Well, I believe animation is supposed to have a timeline. For example, that’s how people make the ads at the top and bottom of this page, amirite?

And I believe I am done. You should code in AS2, you should write all your code and load it into a shotgun and shoot it at the fla so snippets get stuck all over. If you love it that much and won’t hear otherwise, you deserve it.

Flag Post

Topic: Game Programming / About importing in AS3

Originally posted by GameBuilder15:
Originally posted by RTL_Shadow:
Originally posted by GameBuilder15:
Originally posted by nukermage:

even betterer tell them flash’s timeline is highly uneffiecient and make sprite sheets and animate them with flash develop
using UG’s animation class

No, Flash’s timeline is pro.

Uhh no. Flash’s time line sucks. Badly. Just because you use it doesnt mean you have to defend it :P

Flash animation on the timeline is how you’re supposed to animate I believe. Maybe I should ask someone like Berzerk…

Let’s just rip this apart. Flash’s timeline is, and from what I have read talking about the olden days, always has been a neat way to segment different animations that aren’t necessarily supposed to run consecutively.

Then it got crazy with the ability to add actions via actions layers.

Then it got real with the ability to have your scripting completely separate from your animation.

There is no ‘supposed to’ here, there is “it used to be a huge kludgy way to do it until they fixed it”.

Putting this in, say, a web design perspective, how would you want to design a new website – with individual code snippets on each image, or one central set of files that call for those images when they are needed?

The old hard broken way is not better, and definitely not how you’re ‘supposed’ to do it.

Flag Post

Topic: Game Programming / Specific Dynamic Variables?


I always used :int for x,y values in my as3 projects until the day I saw a trace result that had a decimal value for x or y. I should use number instead, shouldn’t I?

Flag Post

Topic: Game Programming / Arrow Keys Not Working (AS3) [SOLVED]

Almost there.

Easy way to solve this – you can pass references to an object when you create it.

var bullet:Bullet = new Bullet(character.x,character.y);
//hopefully you're actually creating bullets by pushing them onto an array, like so:

Then in your bullet class:

public class Bullet extends MovieClip {
private var charX:Number;
private var charY:Number;

public function Bullet(xLoc:Number, yLoc:Number):void {
charX = xLoc;
charY = yLoc;
addEventListener(Event.ADDED_TO_STAGE, addedToStage);

Then your fireshot() function can set this.x to charX, which you initialized in the class and set in the constructor, via a value you passed when you created the bullet.

You could also pass a reference to the character object to bullets as well, but you likely won’t need to do that.

Instead, think about passing a reference to the array that holds the bullet targets. It’s not strict best-practice and it breaks encapsulation, but for my money encapsulation is made to be broken sometimes. It’s just handy as hell for bullets to have easy access to the array holding targets, and even the array holding other bullets.

bullet = new Bullet(bulletArray, targetArray, character);

Any bullet created by doing something like that can directly see all other bullets, all targets, and the character.

edit – your click problem.

Your bullet is never being added to the stage because you have a paradox situation. In order for the bullet to be added to the stage, it has to first be added to stage to detect a click. You don’t want bullets adding themselves, you want something else listening for clicks and adding bullets.

Flag Post

Topic: Game Programming / Ads share and money generation

I think first-time publishers here or anywhere in the flash genre really need to stay grounded.

A project you release can be something you’re proud of, and rightly so, but you really need to be honest and ask yourself “Is this something I would play for more than five minutes? Is it something I would remember the next day and play again? Is it something I would email a link for to a buddy?”

I’m not trying to be mean here googly – yours doesn’t really meet any of those criteria for me as a gamer. As someone who is neophyte-familiar with Actionscript, I think it’s cool you put it all together and integrated the Kong API, and that part is impressive. It also means you’re in a good position, knowledge-wise, to turn a better game idea into something with more revenue potential.

Don’t be disheartened because your idea for a GiTD contest didn’t make hundreds of dollars of ad revenue. Be glad you busted one out and now spend more than the handful of days that one took you!

Flag Post

Topic: Game Programming / Hilarious statement of the week

Originally posted by Plague_Studios:

I get it but I don’t see why everyone thinks it’s so funny… I hate programming humor.

Is that funny to you?

Flag Post

Topic: Game Programming / [AS3] (warning: stack dump), "VerifyError: Error #1068: int and * cannot be reconciled."

Next week: Skyboy finds Sarah Connor, kills her, secures the future for Skynet, is inspired to write several new additions to his library.

Flag Post

Topic: Game Programming / Specific Dynamic Variables?

Unless I misunderstood your question, you just demonstrated a pretty fundamental misunderstanding of OOP classes.

You created a class for your enemy.
Any enemies in your game are now objects instantiated from that class.
But they are separate from each other.

If you give your enemy class a health variable, and you then play the game and pause it with 50 enemies on the screen, you’re looking at 50 unique objects with 50 unique health attributes.

Does that help?

Flag Post

Topic: Game Programming / Visual Lag

rounding errors, ugh.

init a new number with value 0.
create a loop that adds .025 to that var 40 times.
Trace the number.

Then, like me, go over the code for 15 minutes before succumbing to the shocked realization that, yeah, that’s really messed up.

“Hey let’s hire that Intel engineer that designed the pentium’s original fpu.”

(Unless I missed something really obvious, folks?)

Flag Post

Topic: Game Programming / About importing in AS3

Originally posted by GameBuilder15:

Ok, I just completed Part 3. It’s going well. I’m writing all the code out myself, no more copy pasting nonsense from me. The only problem is I don’t understand it all. :/

Don’t say stuff like that. It just makes you look like a complainer. Instead, say “What I don’t understand is x.” Then people here can try to cover what it is specifically you’re not understanding.

Timeline vs not Timeline: I’ve never coded on the timeline but you’re basically talking about coding in actions layers on individual frames, right? Doing it that way makes your code dependent on the frames, splits it up into all sorts of different areas, and generally just sounded like a big pain in the ass to me. Doing it all in AS files is really one of two big changes you’re trying now. If all of your stuff is in as files, then the timeline is now dependent on your scripts. You can still take advantage of frames, you don’t lose that, but you do gain more control, I think. Plus, all of your code is well divided amongst several files, each representing a class, and it’s easy to track down errors. (and even easier because the compiler will tell you where problems are, nine times out of ten.)

Classes: There are a lot of ways to explain classes but you really won’t get it deep down until you’ve made a few things with them.

One way to explain it is… you’re basically defining key THINGS or CONCEPTS, giving those things or concepts their own stats (variables) and abilities (methods).

Another way to explain it is that you’re actually writing several small programs to make a big program, it’s just that the small programs need to be told which of their abilities to use or when to exist. They can manage their own things usually, but they need to be created by something else in order to do it.

edit – one more thing that helped me understand it:

Think of creating a new class as creating a new data type to sit on a shelf alongside int, number, string, array, etc.

public var myObject:MyClass = new MyClass();

This means you created a class called MyClass and you’re instantiating a new stamp of it in the variable myObject. That variable is an object with all the attributes and methods of MyClass. You created a new type for a variable and then created a variable of that type.

The variable IS NOT the type, and you don’t reference it by trying to use the type’s name.

You’d never try to change the value of an integer variable by directly referencing ‘int’, ‘int’ is a reserved word, and so is your class name now. (it’s not, really, but you treat it as such.)

Once you get classes, even partially get classes, you’ll really like it.

Now what specifically are you not understanding about coding AS3?

Flag Post

Topic: Game Programming / "Platforming / Fighting"

Yeah, AS2 vs AS3 is an old argument here, predating me by about the same amount of time that AS3’s introduction predates my joining.

So it boils down to – do you tell an immigrant to learn contemporary, modern English, or do you tell an immigrant to learn Ye Olde English from the 1400s? I mean, they’re practically the same thing, and two speakers (programmers) who are fluent in the other will understand each other and most likely be able to help each other navigate the city.

But the answer is, tell him to learn modern english and if he later takes a course at the community college on Elizabethan Playwrights and Poety, then he can worry about the older version. If he ever needs to worry about.

That’s just my take on it.