Recent posts by Amibtious on Kongregate

Flag Post

Topic: Game Programming / Why is this a null reference?

When you’re accessing an Array/Vector, in this case choicesOnScreen, you give an integer* to get the item from the array you want, arrays list items by integer, starting at 0….0, 1, 2, 3 etc. You’re trying to use a String instead of an integer. I don’t know why. Also I’m not sure you’re declaring .name correctly. needs to be an int or castable to one if you want to use it to extract a specific part of a vector/array.

*you call i a number, which is correct in plain english, but “number” has a distinct meaning in code. Even though an integer is ofc a number, it’s probably best to give the exact class to avoid confusion…

Flag Post

Topic: Game Programming / JavaScript Good OR Not Good

" a few months "

Hasn’t it already had a couple of years?

It may well be the future, but that timescale is surely unrealistic…

Flag Post

Topic: Game Programming / My Game Frame Lags

You don’t need them to be movieclips, if they’re just bitmaps, just use bitmaps. That’d help, though really shouldn’t make enough difference to cause actual lag.
Beyond that, can’t really say without knowing your code.

Possibly it’s the calculation of how you update them that’s causing the lag, rather than the displaying…I don’t know. There shouldn’t be any lag for a setup like this.

Flag Post

Topic: Game Programming / New to Kongregate

You get 25% by default.

+10%P if you implement their API (for highscores and stuff) and enough people use it.
+15%P if the game is either sponsored by Kongregate, or exclusive to Kongregate (ie, posted only here and your own website).

Ads vary. Kong tries to get the best ones, because their share is how they make money, but it varies. Stuff I uploaded a few years ago got ~8US$ per 1000 views, and kong keeps at least 50%.

The revenue screen appears to be down currently, or at least mine won’t load….but you get to it by clicking on your profile, clicking the little cog icon, and selecting “revenue summary”. From that screen, when it works, you can get to a more detailed list….though when you only have one game uploaded the basic screen is probably fine.

Also bear in mind that it’ll always be a couple of days (or sometimes longer over usaican holidays and stuff) out of date, so don’t expect to see anything at all until ~48 hours after you upload.

Flag Post

Topic: Game Programming / Tile Array Size Change Problems

EDIT: oh hell I got ninjad by half hour. Haven’t read Aesicas’, but should be fine. Whereas mine may not be. Also much clearer. Whereas mine may not be. :)

A (relatively) simple way to add/remove multiple columns accurately should be (unformatted 5am pseudocode incoming)

howmanyyouwanttochangeby=[whatever int here, pos or neg as appropriate]
1d2dvector.splice(i,0,new GridBox(whatever creation code here));

Flag Post

Topic: Game Programming / AS3: Syntax error

if (level1data[j – 1] !== 2 || level1data[j – 1] !== 0) {

Flag Post

Topic: Game Programming / AS3: Syntax error

I think you want
if (level1data[j – 1] !== 2 || level1data[j – 1] !== 0)
but I’ve only skimmed, so don’t count on it.

Flag Post

Topic: Game Programming / [Solved] Rotation with bitmapData.draw blows

I currently have this line in my code
tmatrix.rotate((thPlayer.rotation / 180) * Math.PI);

To rotate around center, make it 3 lines
tmatrix.translate( -(thPlayer.width / 2), -(thPlayer.height / 2));
tmatrix.rotate((thPlayer.rotation / 180) * Math.PI);
tmatrix.translate(thPlayer.width / 2, thPlayer.height / 2);

scenedata.draw(playerboatdata, tmatrix, null, null, null, true);

Flag Post

Topic: Game Programming / Survival Horror: Interactive Fiction

“a gaming system designed for boys”

What, really?

You shouldn’t complain about feedback after asking for feedback, I tend to agree with them…I really didn’t get until reading 3rd post of thread that that was the title of the game and not a description, and none of your counter examples apply apart from Jello (which, see also, Biro, Velcro, the way google is going, etc, is not a good thing.).

I’m definitely not your target audience, I quit almost immediately after clicking past a few things without bothering to read them, I’d just not play this kind of game unless it was very well written (some kinda JDATE CYOA could be good), but the one thing I did notice is ALL CAPS, which isn’t a good idea…it’s just not as legible.

Flag Post

Topic: Game Programming / MovieClip with dozens of children with pop-up info, best approach?

“helpful i meant ms is by millisecond of loading delay of the code on the actionscript.”

Yes, that’s obvious, but it’s still an “arbritary figure you just made up”, it’s not helpful and 10* it does NOT make “a minutes”.

Flag Post

Topic: War of Omens / Rites discussion

Ceremonial Dance is OP, Bloodlust is nigh game breaking.

Flag Post

Topic: Game Programming / The future of flash

Originally posted by EndlessSporadic:

I will fight to death (not really) that you will not have a stable, well paying career based solely off of Adobe Air or Flash. It is another story if you also learn C#, C/C++, or Java.

Saying this is synonymous with saying you can’t have a stable well paying career making mobile &/or browser games. Which, ignoring already taken into account definitions of stability, is nonsense.

Flag Post

Topic: Game Programming / No blank screen, debugging mode or trace statements seen

Could be. I’m remembering from a few years ago. Hang on, I’ll check mine.

Okay, mine reads

So yeah. Change the background colour to purple, if the blank window is purple, you’ve got it working.

Flag Post

Topic: Game Programming / No blank screen, debugging mode or trace statements seen

“No application is associated with the specified file for this operation”

Is the problem.
You probably missed something setting up your flash player.
Check FDs Program Settings, Flashviewer, external player path, points to C:\blah\blah\FlashPlayer.exe If not, it should…..FlashPlayer.exe should be in your flex runtimes folder….in ~5 subfolders, I forget the exact path…you’ll find it.

Flag Post

Topic: Game Programming / Squeezing as much audio into a game

Originally posted by EndlessSporadic:

Flash is really cool for UI stuff (<3 scaleform), but I really wish it would die as a means of making games. God, Flash brings out the worst in me. Sorry =(

Dya know of a better platform for browser games?

Flag Post

Topic: Game Programming / Pointers On Cutting Code

A, Definitely not…..though I wouldn’t worry in most cases. A few function calls won’t really make any difference…just, don’t do ~100,000 per frame.
B, Isn’t this the same as faster? No.
C, Hell yes, and I recommend it for this reason.
D, Yes, definitely good practice.

Flag Post

Topic: Game Programming / Squeezing as much audio into a game

For cutscenes, or the like, you can use embedded youtube vids. There’s a mining game that does this well, can’t quite recall the name atm.

Flag Post

Topic: Game Programming / What is an 'Object' and 'Class'?

Originally posted by Gamerboy98:

So, should I sort of imagine it like this: A Class is a factory, functions and such in the class are workers, objects are products produced by the factory, instantiation is the process of making the product and instances are the individual products.

Or like this: The computer is a factory that can produce everything and the classes are orders received by the factory, while everything else is same.


A class is not “a” anything, it’s the type. If Rabbit (as a species) is a class, individual rabbits are objects/instances of that class. Functions would be…..I dunno, “breed”, “eat lettuce” “dislike camomile tea”, Instantiation would be birth. Or possibly conception….depending perhaps on your opinion of abortion.

If you want to view your computer as a factory creating instances/objects, Classes are blueprints.

Flag Post

Topic: Game Programming / What is an 'Object' and 'Class'?

Because of what Draco mentions, many people use word “instance” for what everyone is assuming you mean by object. Dictionary definition of instance may be helpful for explaining the difference.

A class is a group of code, with variables & in most cases functions. An instance of a class is….an instance of that class… a version, copy, example, etc. Class = Tiger, instance = a specific tiger.

In one of my old games

I have a class “Robot”.
Robot contains many variables (mostly integers)…“team” (which army does it belong to, and therefore which colours should it be drawn with), “hitpoints”, “level”, “x” “y” (coordinates) “row” “col” (a different type of coordinates), “mode” (is it fighting or moving or a different kind of moving) and “counter” (goes up each frame, when it hits certain number, does something (depending on mode)). And a lot of other stuff, but you get the idea.

In the course of the game, many many instances of the Robot class are created. And also many instances of Sprite class (one for each robot, among other things….not actually a good way to do it, but it’s how I did it back then), and of course, each Robot instance contains many instances of “int” (integer) class. Integer & Sprite come with AS3 (here is a list of ‘default’ classes, Robot is a class I wrote for that game.

Flag Post

Topic: Game Programming / AS3 Applying

Flash builder is better for serious programmers than flash pro, this isn’t the same as “better than flash develop”, or agreeing that “adobe will always be more accurate because its their thing.”.

Flag Post

Topic: Game Design / Artist Seeking Programmer - Unique RPG / Tower defense games

“To colab with a developer/or two to finish some game designs and share profits, via a few outlets, online, product line, and investment capital.”

What do you mean by the phrase “investment capital” in the context of an “outlet” to “share profits”?

Flag Post

Topic: Game Programming / Using format for Textfield jumbles characters, no clue why

noDevText.defaultTextFormat = largeText;
Not the problem (almost certainly), just noticed…

Also, not exactly ‘jumbling’, just leaving out most of letters. They’re in the right order….which may or may not be a helpful observation. Probably not.

Also also, don’t autosize & size cancel each other….or rather, the later overwrites the former?

Flag Post

Topic: Collaborations / Free Music Resource for All

Originally posted by starfiregold:

There is some really good music in there. Very kind of you to share this. Thank you.

This bears repeating.

Flag Post

Topic: Game Design / Constructive crit please

Pretty difficult to give feedback at such an early stage, suspect most of lackingness is just unfinishedness. The controls for crafting definitely need improving, crafting/equipping seems to conflict.
I’d suggest you could get more out of those art rocks/bushes by generating multiple rotated versions of each at game launch.

I saw no sign of any fps drop when opening character, or at all, but checking FPS is easier if you actually have a counter, I use this

package {
	/** @author Amibtious	 */
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFormat;
	public class FramerateTracker extends Sprite	{
		private var fps_txt:TextField;
		private var fpsformat:TextFormat = new TextFormat();
		private var tim:Number;
		private var f:int;
		public function FramerateTracker()	{
			fpsformat.bold = true;
			fpsformat.size = 16;
			fps_txt = new TextField();
			fps_txt.x = 700;
			fps_txt.width = 100;
			fps_txt.height = 20;
			fps_txt.mouseEnabled = false;
			fps_txt.textColor = 0xFF0000;
			addEventListener(Event.ENTER_FRAME, countFps);  
			fps_txt.defaultTextFormat = fpsformat;
		private function countFps(e:Event):void	{
			f += 1;
			if (f == 30) {
				f = 0;
				fps_txt.text = "fps: " + 30000 / (new Date().time - tim);
				tim = new Date().time;
Flag Post

Topic: Game Programming / [Solved I think] How to _copy_ semi-transparent pixels?

IIRC you actually only need to use matrix to offset cliprects pasting position. So the potential complexities of matrixes are left as potential, it’s just matrix.translate(x, y);