Recent posts by feartehstickman on Kongregate

Subscribe to Recent posts by feartehstickman on Kongregate

avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / About saving current data from a game

Shared Content is usually if you have a level creator and want players to be able to make and share levels with each other.

The SharedObject is what you want to save players’ progress to their computers.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Top down scrolling movement

In the most basic sense, it works like this:

var container:Sprite = new Sprite();
var player:Sprite = new Sprite();
var enemy:Sprite = new Sprite();
container.addChild(player);
container.addChild(enemy);
...
function enterFrame(event:Event){
	if(up){
		player.y-=5;
		container.y+=5;
	}
	....
}

That’s probably the easiest way to set up, but blitting obviously makes things faster.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Collaborations / Artist looking for project

How proficient are you at animated fire/water/lighting/ice/earth effects/projectiles/explosions?

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / [AS3] Finding adjacents and selecting borders.

What are you actually comparing in the first 4 conditionals? It seems like just their positions, but why?

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Where is the API?

If in doubt, PM/email an admin.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / [AS3] Finding adjacents and selecting borders.

If I were you, I’d stick all the MovieClips in a 2D array which is representative of their place in the grid. It’ll allow for faster access, and should prevent any weird errors.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Where is the API?

Originally posted by imp2:

I guess I was over reacting, it’s not too bad. But how do ads work? Can I have inter-level ads like in the Mochi API. is this possible on Kongregate? I’m assuming a preloader ad will show up without having to put anything in the game project, is this true? does my game load while the ad shows? Should I put a timer on the game so it doesn’t skip my intro when the game loads before the ad finishes?

From my own experience (but I may be wrong):
The ad is a video that plays until it finishes/the player clicks “Skip this ad”. After that point, the game begins to load, so there is no need to account for the ad or anything.
As for ads, Kong doesn’t really like you putting ads in your games, with the possible exception of something like your own blog, or credits maybe, because it already shares the revenue from its ads with you.
 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / AS3 tutorials

Ok, I checked through ActiveTuts and found a few decent ones:
Very interesting, uses a microphone for controlling, but I can’t judge his coding style because they’re videos
Pretty simple but seemingly decent enough tut on a frisbee game
Quite a decent looking tut for a minesweeper game and you can finally do it properly with right click support

Here’s where I found them all

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / GiTD [#32] Entries and Discussion

Oooh, a prize. There hasn’t been one of them for a while. Only a few days to go…

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / AS3 tutorials

They’re all AS2 tutorials originally which he’s ported to AS3, it seems. That’s why I never got to the end of any of them.

Oh well. You can look around gamedev.tutsplus.com or active.tutsplus.com for some interesting stuff, but not too many show you how to make a game from start to finish.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / AS3 tutorials

This website has some step-by-step tutorials. I’ve checked out a couple in the past, and they’re not the best, but they’re not too bad either.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Respecting OOP a bit better this time around...

As far as I can tell, the solutions get slower the more correct they are.

1. Pass a reference to the game container in the constructor and call the function directly (fast but dodgy)
2. Use a callback function (slightly slower but not dodgy)
3. Custom event (somewhat slow).

Hopefully someone can come up with the goods though. Signals look interesting.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / GiTD [#32] Entries and Discussion

Originally posted by Aceeri:

Damnit UG you picked the start date on the release of a book in mu favorite series!

Read it on day 1.
Use it for inspiration.
9 days of game-making.
Profit.
 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Text in Flash

textField:Textfield = new Textfield();
addChild(textfield)
textfield.text = "This is some text";
textField.width = 100;
 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Al Zimmermann's contest.

That sounds like a very good idea if I ever need complex calculations in games so that people don’t think the game has crashed and leave.

Anyway, here you go. It really is very simple.

public static function bigFact(i:int):String{
	var carry:int,len:int;
	var j:int,k:int;
	var numbers:Array = [1];
	for (j=2;j<i;j++){
		len = numbers.length;
		carry = 0;
		for(k=0;k<len;k++){
			var temp:int = numbers[k]*j + carry;
			if(temp>9)carry = int(temp*0.1);
			else carry = 0;
			numbers[k]= temp - carry*10;
		}
		while(carry!==0){
			numbers[len]=carry - int(carry/10)*10;
			carry/=10;
			len++;
		}
	}
	var number:String = "";
	for(j = numbers.length-1;j>=0;j--){
		number += numbers[j];
		if(j)if(j%3==0)number += ",";
	}
	return number;
}

The digits are held in the array backwards, which allows for easier flexibility and ordering. Every increment of j in the primary loop just multiplies all digits in the array by j, then puts all the carried digits at the end. Passing the final string without commas, or passing the array itself would for all types of further calculations.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Al Zimmermann's contest.

Yeah, I could have used a language specifically designed to do it, but setting up everything in order to do it seemed like it would’ve been a bit of a pain.

It’s really quite simple to do, just use an array where each element is a digit in the number. It could probably be optimised quite easily by using a fixed length Vector or a Byte Array? but I was just looking for a quick solution to get it to work. I’ll post it next time I get on Kong.
It reaches its limit at around 10000! (~13 seconds) before it hits the timeout limit of 15, which can probably be circumvented somehow.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Uploading first game

From FAQ:

When will you guys send me a check?
Once your total ad revenue reaches the payment threshold (25.00 USD for Paypal, 100.00 USD for checks, or 1000.00 USD for wire transfers), your account will enter a 30-day verification period at the end of the month. After this period has ended and your account has been cleared of any fraudulent activity, a payment will be sent based on the information you provided. If a monthly pay period ends and your account has less than the threshold, your balance will roll over to the next month. This rollover process will continue until your account reaches the threshold.

Wait, is cheque actually spelled check in America?

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Al Zimmermann's contest.

For my own benefit, I figured out how to calculate large numbers. So, without further ado, 1000! =

402,387,260,077,093,773,543,702,433,923,003,985,719,374,864,210,714,632,543,799,910,429,938,512,398,629,020,592,044,208,486,969,404,800,479,988,610,197,196,058,631,666,872,994,808,558,901,323,829,669,944,590,997,424,504,087,073,759,918,823,627,727,188,732,519,779,505,950,995,276,120,874,975,462,497,043,601,418,278,094,646,496,291,056,393,887,437,886,487,337,119,181,045,825,783,647,849,977,012,476,632,889,835,955,735,432,513,185,323,958,463,075,557,409,114,262,417,474,349,347,553,428,646,576,611,667,797,396,668,820,291,207,379,143,853,719,588,249,808,126,867,838,374,559,731,746,136,085,379,534,524,221,586,593,201,928,090,878,297,308,431,392,844,403,281,231,558,611,036,976,801,357,304,216,168,747,609,675,871,348,312,025,478,589,320,767,169,132,448,426,236,131,412,508,780,208,000,261,683,151,027,341,827,977,704,784,635,868,170,164,365,024,153,691,398,281,264,810,213,092,761,244,896,359,928,705,114,964,975,419,909,342,221,566,832,572,080,821,333,186,116,811,553,615,836,546,984,046,708,975,602,900,950,537,616,475,847,728,421,889,679,646,244,945,160,765,353,408,198,901,385,442,487,984,959,953,319,101,723,355,556,602,139,450,399,736,280,750,137,837,615,307,127,761,926,849,034,352,625,200,015,888,535,147,331,611,702,103,968,175,921,510,907,788,019,393,178,114,194,545,257,223,865,541,461,062,892,187,960,223,838,971,476,088,506,276,862,967,146,674,697,562,911,234,082,439,208,160,153,780,889,893,964,518,263,243,671,616,762,179,168,909,779,911,903,754,031,274,622,289,988,005,195,444,414,282,012,187,361,745,992,642,956,581,746,628,302,955,570,299,024,324,153,181,617,210,465,832,036,786,906,117,260,158,783,520,751,516,284,225,540,265,170,483,304,226,143,974,286,933,061,690,897,968,482,590,125,458,327,168,226,458,066,526,769,958,652,682,272,807,075,781,391,858,178,889,652,208,164,348,344,825,993,266,043,367,660,176,999,612,831,860,788,386,150,279,465,955,131,156,552,036,093,988,180,612,138,558,600,301,435,694,527,224,206,344,631,797,460,594,682,573,103,790,084,024,432,438,465,657,245,014,402,821,885,252,470,935,190,620,929,023,136,493,273,497,565,513,958,720,559,654,228,749,774,011,413,346,962,715,422,845,862,377,387,538,230,483,865,688,976,461,927,383,814,900,140,767,310,446,640,259,899,490,222,221,765,904,339,901,886,018,566,526,485,061,799,702,356,193,897,017,860,040,811,889,729,918,311,021,171,229,845,901,641,921,068,884,387,121,855,646,124,960,798,722,908,519,296,819,372,388,642,614,839,657,382,291,123,125,024,186,649,353,143,970,137,428,531,926,649,875,337,218,940,694,281,434,118,520,158,014,123,344,828,015,051,399,694,290,153,483,077,644,569,099,073,152,433,278,288,269,864,602,789,864,321,139,083,506,217,095,002,597,389,863,554,277,196,742,822,248,757,586,765,752,344,220,207,573,630,569,498,825,087,968,928,162,753,848,863,396,909,959,826,280,956,121,450,994,871,701,244,516,461,260,379,029,309,120,889,086,942,028,510,640,182,154,399,457,156,805,941,872,748,998,094,254,742,173,582,401,063,677,404,595,741,785,160,829,230,135,358,081,840,096,996,372,524,230,560,855,903,700,624,271,243,416,909,004,153,690,105,933,983,835,777,939,410,970,027,753,472,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000,000

pre in order to avoid massive text wall. Once I ironed out some of the kinks, the calculations all happen very fast (it only took flash 0.13 seconds to calculate that and sew it all into a string).

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / GiTD [#32] Entries and Discussion

Originally posted by UnknownGuardian:

Deadline: (start date on May 2nd is different from deadline!!!!!)

What kind of madness is this?

I might be a bit busy, but I’ll try to make something. Hopefully there’s a better turn out this time.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

Originally posted by Aesica:
Originally posted by RTL_Shadow:

Optimizing trig is probably not super effective way to speed up the game, since if you are doing it right, you only need to do 1 trig calculation per bullet (at it’s spawn).

Still, awesome to get that fps with that many objects.

That depends on whether the bullets are just going to fly straight (straight of course being whatever their starting direction set to) or take on more advanced behaviors, such as homing. If homing bullets become a thing in that game, I highly suggest limiting the trig to maybe 5 or so times per second instead of every single frame. Probably pretty obvious, I know, but in case it wasn’t, I wanted to throw it out there.

Were you blitting in Eisydian Saga or just using optimised display objects?
 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Al Zimmermann's contest.

I gave up and was waiting for the next contest, which it turns out is actually the same as this one was :/
1000!
A rough guess at what the top solution is at the moment: 383 (based on the guy who says his raw score is 1000).
More pressingly, how in the world do I calculate 1000!?
Wikipedia says, 4.0238726008×10^2,567.
I read a bit further, and it says to make an Array with a length of 2568(?) and do the multiplication manually, hence avoiding overflow.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Rotating an Object with Multiple Frames

Say you have a MovieClip with the flaming arrow, set its properties so it exports for Actionscript, give it a class name (like Arrow).
Then, make a new Class with the same name (Arrow) in Flash.
Then, when you want to move it, (in the Arrow class):

x = 200;//whatever you want
y = 100;//whatever you want
rotation = 180;//whatever you want

I suspect you may have been moving the image on the frame, as opposed to the whole MovieClip itself (meaning when you changed frames, the arrow would change positions). If that is not the case, then I’m not sure what your issue is.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / What is wrong with this AS3 code?

The hittesting is a little dodgy. Doing the same thing with a Rectangle object would probably be more advisable.

 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Show us a screenshot of what you're working on!

Originally posted by chachon2:
Originally posted by adamkingdom:

Looks nice chachon2, are there more levels? Would love to try out a demo..

Thank you, it will be three levels, but I don`t finish the first level yet. I need testers, because that I`ll put something playable the next week.

Good to see you got over your bugs, and the game certainly looks like it is shaping up to be good.
 
avatar for feartehstickman feartehstickman 521 posts
Flag Post

Topic: Game Programming / Payment

Can someone tell me which amount needs to reach $25?
Is it the gross earnings(total ad revenue, of which I receive ~50%)?
Is it the net earnings (~50% of the gross earnings)?
Is it the net earnings minus tax (70% of the net earnings, because I do not live in the US)?

Because, when I reached $25 gross, it came up with “payment pending” – through date: Jan. 31
Does the amount pending have to reach $25 (ie. my gross is $50) before the payment will proceed, and it is just an anomaly that the payment is pending before it should be?