Recent posts by player_03 on Kongregate

Flag Post

Topic: Realm Grinder / [GUIDE] Optimized Gem Grinding

Originally posted by langelangeweile:

0 ~ 100k Gems: Angels also get faction coins faster

Not really. I started with Angels on my second reincarnation, and even with God’s Rest, it was painfully slow. Coin Pillage doesn’t come into play until later, so Elves are far better at this.

Flag Post

Topic: Run Mobile / Can't play it anymore.

If you’ve already beaten the levels, you can’t play them again until you unlock the Student.

Also, you can’t play the levels in the first place until you beat B-13, T-7, and at least half of the box storage area. (There’s another way, but that’s a secret.)

Flag Post

Topic: Realm Grinder / Full Hidden Trophy List

I got Coin Pillage by accident with only Angels + Dwarves. I’m not sure how exactly, and in fact I think I had God’s Hand active at the time. Maybe the God’s Rest upgrade somehow counts towards this?

Flag Post

Topic: Run Mobile / Update Soon?

The next update will hopefully be ready soon, but it’ll focus on the Student, not the Angel. Sorry!

Flag Post

Topic: Run Mobile / Does anyone know how to access the moving boxes levels again?

They were released early by accident. (Oops!) We took them down, but hopefully soon they’ll be available for real.

Flag Post

Topic: Game Programming / Preloader and mp3

You might have put the music somewhere onstage in frame 1. If you delete everything (including the preloader) from the frame, does it end up on frame 5?

Flag Post

Topic: Game Programming / Preloader and mp3

If you go to File → Publish Settings → Flash → Settings, you’ll find an option to change which frame everything is exported in. Set this to frame 2.

Flag Post

Topic: Game Programming / ApplyForce towards object?

Step 1: find the vector from headai to head.

force = head.GetWorldCenter().Subtract(headai.GetWorldCenter());

Step 2: we don’t know how long that vector is, but it almost certainly isn’t the right length. Let’s set its length to 1.


Step 3: we didn’t normalize the vector because we wanted length 1; we normalized it so that we’d know the length. Now that we know its length, we can convert it to whatever length we actually want. For now, let’s set it to 0.5.


Step 4: that seems like a good force vector. Time to apply the force.

headai.ApplyForce(force, headai.GetWorldCenter());
Flag Post

Topic: Game Programming / Error #1009 - player_03 solve the error

For future reference, when you get a null reference error, look at the error message.

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at New_fla::MainTimeline/update()[New_fla.MainTimeline::frame1:284]

See that second line? It’s telling you where the error came from. That’s how I knew the error was on line 252.

Flag Post

Topic: Game Programming / Error #1009 - player_03 solve the error

Originally posted by zmessi:
Originally posted by player_03:

Which one is line 252?

the line is :

Then that’s your problem. Try this:

if (player.hitTestObject(obt)) {
	if (soundChannel != null) {
Originally posted by Orangatang91:

I would just trace each possible null object to see which one it is.

Unnecessary in this case. soundChannel is known to be the problem.

Flag Post

Topic: Game Programming / How to Prevent Global Namespace Pollution in C++

If you’re willing to restrict T to a specific set of values, it’s apparently possible to move your template code into a source file.

Otherwise, all I can think of is making a namespace of your own, and populating it with references to string.h. The header would define a bunch of functions, and then the source file would import string.h and implement all the forwarding functions. This header would still be imported in MyOtherClass, but at least the functions would be in a custom namespace.

Flag Post

Topic: Game Programming / Error #1009 - player_03 solve the error

Which one is line 252?

Flag Post

Topic: Game Programming / News: Firefox Blocking Flash Plugins

(Sorry for the bump, but I just now came back and noticed EndlessSporadic’s last post, and I didn’t want to let it go uncorrected.)

GAF Media certainly is a third party, and their plugin is a third party plugin. Same with OpenFL and their plugin. However, the Custom Platform Support SDK is Adobe’s work, and may well have been Adobe’s idea in the first place.

Flag Post

Topic: Realm Grinder / dwarves/drow

The bare minimum is something like 6Qi, but you’ll need more than that before you can finish the following “quests” in a reasonable amount of time. And since you’ll need more than that anyway, it makes sense to grind for gems first and excavate second.

Personally, I started playing Goblins/Drow at 30Qi, and after 2.5 days of active-ish play, I had 386Qi. Starting at 50Qi would have been nice, but it would have taken at least 2.5 days to get there, which defeats the point.

Flag Post

Topic: Game Programming / Collab game not showing on my profile?

This is normal. Confusing, yes, but everything is working as designed.

Anyone but you will see the games you’ve collaborated on, but not your unpublished games. You can see any unpublished games you have, but not any games you collaborated on.

These are two distinct groups: games with your name publicly attached to them, and games that you can edit. The public sees the former, and you see the latter.

Flag Post

Topic: Kongregate / No reply. Ingoring me why?

Originally posted by SugarMonkey:

Support has replied to every email you’ve ever sent

Originally posted by Arafat45:

But it’s weird that Kongregate is not replying me!

This is veering dangerously close to “Not Always Right” territory.

Flag Post

Topic: Game Programming / News: Firefox Blocking Flash Plugins

Originally posted by revenant__:

Like they can kill flash plugin but make a compiler of as3 to html5.

They’ve thought of that.

Originally by Joshua Granick:

Flash is Not Flash Player

To many users, “Flash” still is a browser plugin, but for designers, developers and creative studios, Flash has always been a rich animation/layout tool, as well as (for us ActionScript developers) a fast development workflow. The method of delivery has changed over time, but our demand for tools has not changed.

With the Flash CC Custom Platform SDK, using Flash for animation, layout and design is going to remain viable. I applaud Adobe for making Flash Professional more useful to everyone, since we cannot use Flash Player for all target environments anymore.

Flag Post

Topic: Game Programming / News: Firefox Blocking Flash Plugins

Firefox gave me a couple notifications recently that Flash was blocked, but in both cases, this went away once I updated the plugin.

Flag Post

Topic: Lionheart Tactics: Heroes / Sniper or IFH ?

Take it from someone who has two legendary Snipers and a legendary Halberdier: the Sniper is useful in more situations. (I know you didn’t ask about Halberdiers, but they’re actually very similar to Icefang Huntresses. They have similar attack, health, and defense. They can hit multiple units in a line. They stun rather than freezing, but the result is similar.)

An Icefang Huntress works best at close range, but that leaves her open to retaliation. And she might be a tank, but no unit is strong enough to survive more than a few attacks in late-game levels. Range is far more important for survival.

I’m not saying the Huntress would be useless (among other things, her GB is amazing), but promote the Sniper first.

Flag Post

Topic: Game Programming / question about dragging.

Originally posted by Draco18s:

Because the mouse can move more than once per frame, you’d want the object to follow along so it doesn’t look like it gets left behind (imagine a very low frame rate, the effect is still noticeable at higher frame rates, but thinking about it from a “1 frame per second” standpoint gives an easy mental model).

Would Flash really redraw the object more than once a frame? MouseEvent doesn’t have an updateAfterEvent() function…

Flag Post

Topic: Realm Grinder / Upgrade Suggestion: Transcendent Autocasting

Edit: GeneralYouri beat me to it.

Originally posted by GeneralYouri:

Infact it meets all of your examples

Not quite. If you recovered enough mana for another Tax Collection before the timers ran out, it wouldn’t cast that Tax Collection.

But other than that it sounds great.

Flag Post

Topic: Kongregate / [New Feature] Introducing Kongpanions!

Originally posted by Squideer:

Bones doesn’t suit it very well though.

It’s a staff in-joke.

Flag Post

Topic: Game Programming / Requirement to submit a Unity Beta Game ?

Originally posted by EndlessSporadic:

There is some way to establish a game as a beta. On the front page there is an entire category dedicated to beta games, so I would assume you can somehow, though I have never done it myself.

You have to contact the admins for that, and as far as I can tell, they only accept high-quality games that offer in-game purchases.

There’s a link hidden somewhere that will let others preview your game, but it’s easiest to go with EndlessSporadic’s suggestion of having friends and family play.

Flag Post

Topic: Game Programming / question about dragging.

Mouse events can fire more than once a frame, so there’s no clear winner. That said, both options would be quite fast, and I wouldn’t expect either one to cause any sort of lag.

Flag Post

Topic: Game Programming / I want to make a game...

There are some game development tools that try to hide the coding behind colorful drag-and-drop puzzle pieces.

However, the hard part of coding – algorithm design – is still there. When designing an algorithm, you start out with nothing but an idea of what you want the computer to do. As a programmer, your job is to translate this plain-English idea into the steps needed to accomplish it. (Then you need to translate these steps into whatever programming language you’re using, but that’s easier once you get used to it.)

By way of example, let’s talk about one of my high school physics classes. I… didn’t always pay as much attention as I should have. When I got bored, I’d take out my calculator (because I didn’t have a smartphone), and I’d write simple programs on it.

In one class, the teacher was discussing acceleration, velocity, and position, so I got to thinking about those things. I decided to write a program simulating a ball moving around.

Acceleration is the change in velocity, and velocity is the change in position, and the screen is 2d, so I made six variables.
• Horizontal (x) acceleration
• Vertical (y) acceleration
• Horizontal (x) velocity
• Vertical (y) velocity
• X (position)
• Y (position)

I set horizontal and vertical acceleration based on the user’s input. Pressing left, for instance, set x acceleration to -1, and pressing down set y acceleration to +1 (because the y axis starts at the top of the screen, not the bottom).

Now that I had acceleration covered, I needed to move the ball. Since acceleration is the change in velocity over time, I added it every frame. (A frame is one unit of time, as you probably knew.)

velocityX = velocityX + accelerationX;
velocityY = velocityY + accelerationY;

Acceleration was never more than 1 or less than -1, but it added up over time. Next came velocity, which is very similar:

x = x + velocityX;
y = y + velocityY;

Then I wanted to make the ball bounce off the edges of the screen, because nothing in the above code stops it from leaving and falling forever. I did this by checking the x and y coordinates. If either coordinate was out of bounds, I forcibly positioned the ball back within bounds, and reversed its velocity:

if(x < 0) {
	x = 0;
	velocityX = -velocityX;

(There was similar code for the other three edges.)

After that, I decided I wanted the ball to slow down a little with each bounce, because otherwise it could get pretty insane:

if(x < 0) {
	x = 0;
	velocityX = -velocityX * 0.9;

I undid this change in the end, because I decided I liked the insane version better. In a real game, I would have kept it.

If you want to make games, you’ll have to get good at that sort of thing, and in fact you’ll have to solve much harder problems. There’s no programming language that saves you from this, nor will things like Stencyl.

The trick is to practice making algorithms until you start to enjoy it. It really doesn’t matter what language you practice in.