Recent posts by Dealmaster13 on Kongregate

Flag Post

Topic: Game Programming / Google Code Jam 2014

It was easily doable in 2 hours; I should have noted this in the OP.

 
Flag Post

Topic: Game Programming / Google Code Jam 2014

Hey guys. Just a brief heads up that Google Code Jam has started, and the qualifying round will end in a bit over 12 hours.

https://code.google.com/codejam/

 
Flag Post

Topic: Game Programming / FlashDevelop's flawed Features

Originally posted by feartehstickman:

If only Visual Studio could be used as an AS3 IDE… it’s autocomplete is amazing.

Yeah, copy that. It’s a heavyweight brute, but with it comes a plethora of features and knowledge of your project which make it such a fun ‘tool’ to use. FlashDevelop is great, but you pay a steep price by it being lightweight.

I was doing a bit of Googling for IDEs a couple weeks back and came across something called CodeDrive which is based on VS 2010. It sounds like an exciting prospect, but the post-trial price tag is steering me away. If anyone wants to give it a go, then I’d be interested to hear what you think of it, especially if you haven’t tried VS before.

 
Flag Post

Topic: Game Programming / Gross Earnings Drop

Looking at my revenue, I’ve got this at the top of my page:

It matches the 30% you mentioned

 
Flag Post

Topic: Game Programming / Accurate Circle Collision

Originally posted by RTL_Shadow:

Here’s what I’ve got now:

	private function calculateCollision(entity1:BallEntity, entity2:BallEntity):Point
		{
			var dir:Number = Math.atan2(entity1.y - entity2.y, entity1.x - entity2.x);
			var newVel:Point = new Point();
			newVel.x = (entity2.vel.x * (entity2.radius - entity1.radius) + (2 * entity1.radius * entity1.vel.x)) / (entity1.radius + entity2.radius);
			newVel.y = (entity2.vel.y * (entity2.radius - entity1.radius) + (2 * entity1.radius * entity1.vel.y)) / (entity1.radius + entity2.radius);
			return newVel;
		}

Now if either of the balls are at 0 vel it just sits there, is there a way to get around this?

That can be the case if the radii are equal and entity1 has 0 velocity

I’m not too sure what you’re doing since you only calculate one new velocity in this function

If you’ve come up with this equation yourself, then definitely have a look online for other equations for ball collisions and pick out the differences

 
Flag Post

Topic: Game Programming / Accurate Circle Collision

Yeah, best to put in the entity2s and then report back with the code and results

 
Flag Post

Topic: Game Programming / Developer Help!

Originally posted by feartehstickman:

I’ve got to admit, due to its sheer randomness, that gif is quite funny.

Yeah, I agree

 
Flag Post

Topic: Game Programming / Need help with tower defense shoot logic

Woops, sorry, I just glanced at the code and naively assumed that since you were recalculating the (x, y) change of the bullet seemingly on every frame that this implied that you were also recalculating the angle to target.

ehaugw’s code is as follows: http://pastebin.com/h850bRG3
Now assuming the formula (with my current understanding of it) is correct, this will only deal with cases where the path of the enemy is linear for the duration of the projectile travel. Given the project concerns a TD, I thought that it would be a good idea to accommodate irregular paths.
Sorry if you spent 24 hours on coming up with this. I didn’t mean to offend you.

 
Flag Post

Topic: Game Programming / Need help with tower defense shoot logic

ehaugw, assuming your formula is correct, your solution works so long as what you’re after is essentially a homing projectile. Interestingly, whether or not a homing projectile is an aesthetic issue, depending on the speed difference between the projectile and targets, the result can lead to the arguably unwanted outcome of the projectile not reaching its target as fast as if travelling as the crow flies, if at all.

It looks like you’re following an approach similar to that which I mentioned, Linck5; just take care when dealing with inefficiencies as well as the relevant gameplay features such as projectiles which slow an enemy down. It’s a similar sort of thing to what you’d find in a top-flight RTS where the AI of a unit is aware of its surroundings and fellow units’ actions, and proceeds accordingly. For example, in one of the games I used to play, a unit would be aware of whether or not a target would be destroyed given the amount of projectile damage in the air that is aimed at it (assuming the RNG for projectile hit success is determined by the time the projectile has left the weapon), and thus hold fire or fire accordingly; this was more of a design preference than anything, of course.

 
Flag Post

Topic: Game Programming / Need help with tower defense shoot logic

I don’t necessarily vouch for this (due to its inelegance), but I believe it’s a nice thought:
You can store a list of future positions for each enemy at regular time intervals (‘timeline’), which takes into account the effects of being hit by other weaponry. For example, given jason’s slowing bullet example, the enemy’s ‘timeline’ would look as if it’s moving slowly along the path for a while then speeds up after a certain amount of time, and if an enemy is hit by a KO-inducing bullet then your enemy’s ‘timeline’ can terminate at that point (although attacking before enemy termination is obviously still reasonable).

Ultimately you’ll want to take the route 953 alluded to as a best case solution, taking note of what qwerber has said, and if it proves to be too difficult due to path construction then choose an alternative method.

 
Flag Post

Topic: Game Programming / A function similar to computeSpectrum()

Just taking a guess here, but FFT could stand for Fast Fourier Transform if you weren’t aware

 
Flag Post

Topic: Game Programming / Reading flash files with Python

I’m using python 2.7 with the following code and everything functions as expected:


with open("file.as") as file:
	print file.read()

Thanks for taking me back to python!… horrible language in my opinion :X, but if it gets the job done, then…

 
Flag Post

Topic: Game Programming / Context Free Grammar

I’m probably not thinking straight because I still don’t understand the problem.

I don’t see how random expansion is even possible since the user is supplying the input, and you can check what the first token is (red in your initial example, so your left-most CE should only consist of a colour C)

 
Flag Post

Topic: Game Programming / Context Free Grammar

What is your parser doing? I mean if the string is finite and you can tell where it begins and ends, then you’d know which production rule for CE to use.
I’m not sure what you mean when you talk about the tree expanding randomly with other colours.

 
Flag Post

Topic: Game Programming / Context Free Grammar

Yeah, despite all these posts, I’ve got to say I don’t quite understand the problem here, unless if the solution is trivial, e.g.

V  ::= CE X
CE ::= C | CE , C
C  ::= "red" | "blue" | ...
X  ::= "skycolour" | ...
 
Flag Post

Topic: Game Programming / Google Code Jam 2013

Yeah, but for some reason I couldn’t deal with that equation in Java without error

 
Flag Post

Topic: Game Programming / AS3 tutorials

If you’re talking about Main, it’s a mistake on their part

You can have a look at the finished files if you want

 
Flag Post

Topic: Game Programming / About curly braces

Funnily enough, I use the first when programming in AS3, and the second when programming in Java, just to illustrate how insignificant the difference is

I prefer the first aesthetically, but many IDEs, e.g. Eclipse, are based around the second format, so sometimes it’s just best to stick with how the IDE wants to play ball to prevent the need to alter settings and/or constantly edit pre-formatted code

 
Flag Post

Topic: Game Programming / RAM usage

Just note that I’m pretty sure those memory statistics also take into account any Flash running in the background, such as Youtube videos, adverts, etc.

 
Flag Post

Topic: Game Programming / Google Code Jam 2013

I tried using BigInteger/BigDecimal post-event, but I needed to square root, and that caused problems for me

My solution would have otherwise been a four or so lines worth of mathematical equations – no loops involved whatsoever

 
Flag Post

Topic: Game Programming / Google Code Jam 2013

They have three sub-rounds to ensure that at least one is likely to be at a reasonable time

Argh! Unbelievable!

Got frustrated with the pretty trivial bullseye problem, because I couldn’t simplify a bog-standard algebraic sum on paper in an (‘easy’) attempt to go straight for an efficient solution… :(!
Ended up solving the manage your energy problem after 2:28:41 and a hell of a lot of ridiculous debugging… yeah… just over 1 minute spare, and thus came a few hundred ranks short

By far the most disappointing code jam session I’ve taken part in over the past four or so years.
Then again, I was just a few seconds away from walking out with 0 points haha

Well, good thing the next rounds don’t actually start at 2:00am, like this one did; better luck next time

EDIT: Congrats on the fastest first problem solution by the way, jonathan

 
Flag Post

Topic: Game Programming / Adjacent Grids [AS3]

Didn’t bother looking into the semantics of your code, but might you have meant to use continue instead of break?

 
Flag Post

Topic: Game Programming / Google Code Jam 2013

Thanks a lot for the link

 
Flag Post

Topic: Game Programming / Google Code Jam 2013

For fair and square, I figured you should just iterate through the square numbers (which I did), and so getting through 107 numbers (note also storing these – pre-computation) is obviously a breeze, but I still don’t have a clue as to how to solve the extra large, having already very briefly glanced at a few solutions out there; somehow you’ve got to pick out a mathematical property of possibly palindromes with squares that greatly reduces the sample space

 
Flag Post

Topic: Game Programming / A* (Star) Pathfinding (AS3) - Example

Maybe try really messing up the grid, placing blocks and taking them away and see if you get any weird paths