Recent posts by player_03 on Kongregate

Flag Post

Topic: Game Programming / Adobe flash pro + as3

I think that people were advising against ActionScript 2. AS3 is fine.

HTML5 is also fine, but Java is probably a bad idea.

If you choose AS3, you can start with this tutorial.

Flag Post

Topic: Game Programming / Creating Games

How to make Flash games

Flag Post

Topic: Game Programming / .bat file from swf

Why not use a language that’s better suited to the task? It wouldn’t be that hard. For instance, Python is designed to be easy to learn, and Haxe is directly based on AS3.

The best Flash has to offer is the File class, and that’s only available in AIR.

Flag Post

Topic: Game Programming / [AS 3]Some Advice about Accessing objects in an Array

Tutorial for moving timeline code into classes.

Flag Post

Topic: Game Programming / Can I charge for my game?

Defender’s Quest and VVVVVV both did something like that, and it worked reasonably well in both cases.

However, Kongregate now seems to favor the “free to play” model, and they know what they’re doing. You might do well to try that. The model is basically like this: everything is accessible for free, but it takes a while to get. Players can spend money to save time.

In any case, it’s probably a bad idea to drive players away too early. If you’ve got lots of content, that’s potentially a lot of ad revenue. Kongregate gets good ad revenue, and you’ll be able to get a 35% share, so the longer you can keep players playing, the more you’ll make.

Flag Post

Topic: Game Programming / any means to increase size limits?

Tips to reduce file size

In particular, take a look at the log of the build. (After building, go to Window → Console → Editor Log)

Flag Post

Topic: Game Programming / Deeper Topic (part 2): Composition over inheritance

Originally posted by Draco18s:

You have this:

var entity = new Entity();
entity.attachComponent( new PositionComponent(200,200) );

But you never address how this is handled. What does the Entity class look like, how does it store its components and so on?

Ash stores components in a Dictionary – the component class is the key, and the component is the value.

Originally posted by Draco18s:

(As a side note, what kind of entity would not have a position component?)

Good question. Perhaps something like general information about the world that doesn’t have a specific position. The time of day in the simulation, for instance, or whether it’s currently raining.

Or maybe you store information about the game. Stage dimensions, target framerate, background color, etc.

But that still seems like an odd, inefficient use of the framework.

Originally posted by Draco18s:

Semi-related, how would this be approached from a Unity standpoint where there’s already an Entity/Component pattern in existence, do we eschew the Entity half of our equation and use Unity’s GameObject as our entity, relegating all of our components to extending Unity’s components (so they attach directly to the GameObject) or do we create a base MonoBehaviour script as our entity and our own component system?

In theory, you should try to work within an existing system rather than reinventing the wheel.

In this case, while Unity handles the entities and components, it doesn’t have anything resembling systems. It doesn’t even provide a function to find all game objects that match your “key ring.”

So… try using GameObjects, but if that doesn’t work out, I think you’d be justified in reinventing the wheel.

Flag Post

Topic: Game Programming / [AGAL] Can't make this simple test work.

I think the testbed is broken. I tried “mov oc, fc1”, and it still had no effect. Same with Colin’s sample code.

Flag Post

Topic: Game Programming / [Unity C# - Sight Cones] - Uzzbuzz's Questions

Calculating a vector between two points is as easy as subtracting two points.

Simple example: Suppose the enemy is at (10, 10, 10) and the player is at the origin. You want the vector from the player to the enemy, so what do you do? Subtract (0, 0, 0) from (10, 10, 10). Clearly, this results in <10, 10, 10>.
Sanity check: Starting at the origin, move +10 units along the axes. You do in fact end up at (10, 10, 10), so we did the subtraction in the correct order.

Let’s take a slightly more complex example, so that you can distinguish between the position and the movement. The enemy is still at (10, 10, 10), but now the player is at (0, 1, 2). Subtract, and you get <10, 9, 8>.
Sanity check: Starting at (0, 1, 2), move by <10, 9, 8>. Once again, you end up at (10, 10, 10), so we’re still good.

Ok, now we have the vector <10, 9, 8>. What do we do with it? How do we get a point five units along an arbitrary vector?

Let’s start with an easier question. How do you get a point one unit along this vector? Oh, wait, there’s a function for that!

//Step 1: Find the vector from the player to this enemy.
Vector3 offset = agent.transform.position - combatTarget.gameObject.transform.position;
//offset is now (10, 9, 8)

//Step 2: Keep the vector pointed in the same direction, but set its length to 1.
//offset is now approximately (0.6389, 0.5750, 0.5111)

//Step 3: Extend it to length 5.
offset *= 5;
//offset is now approximately (3.1944, 2.8750, 2.5555)

//Step 4: Find the destination. Remember, offset is relative to the player's location.
agent.SetDestination(combatTarget.gameObject.transform.position + offset);
Flag Post

Topic: Game Programming / Creating a side scrolling platformgame in As3

Originally posted by dragon_of_celts:

Static variables, by convention, are all upper case, so “static var gravity:Boolean;” should be “static var GRAVITY:Boolean;”.)

That’s for constant values. Non-constant variables are lowercase, static or no. Or more precisely, they’re camelCase, but the point is that all-uppercase names indicate a value that will never change.

Flag Post

Topic: Game Programming / Is self-promotion of games acceptable in this forum?

I’m not a mod, but my vote goes to “don’t post it here.” There’s already a comments system to give feedback, and there are better ways of promoting games.

I’d be ok with this forum being about game design (game mechanics, story, art style, etc.), rather than just programming. And if everyone promoting their games had a specific question to ask, I wouldn’t mind so much. (“Please give feedback” isn’t specific enough, sorry.) But as it is, I feel like they’re just adding clutter.

Perhaps there should be a “Game Feedback” forum, where people can go to give and get feedback.

Flag Post

Topic: Game Programming / Haxe/OpenFL primer -- If Flash dies, this is your lifeboat

Originally posted by FlashGrenade:

Okay now you are being snide for the sake of being snide.

Yeah, probably. But I think it’s warranted.

You don’t know if your code will work? Test it.
You can’t test your code because you don’t know what to type in the first place? Google it.
You can’t find answers on Google? Ask in the forums.
You can’t use the forums?

Give me a break.

Originally posted by FlashGrenade:

You are not doing anyone any favors with your “Just test it, just google it.” attitude, least of all yourself.

Not even myself? It’s been working fine for me.

And I really don’t see why it wouldn’t work for you. Seriously, ask in the forums. People are there to help out.

Flag Post

Topic: Game Programming / Haxe/OpenFL primer -- If Flash dies, this is your lifeboat

If you’re not sure how to code something in Haxe as opposed to AS3, look it up.
Forget the syntax for for loops? Google “haxe for loop.”
Not sure how to embed images? Google “openfl embedding images.”

Originally posted by FlashGrenade:

The forums and irc you mentioned are lost woods to me.

You obviously know how forums work. Are you just complaining for the sake of complaining?

Originally posted by FlashGrenade:

And don’t get me started on that command line crap. If I wanted to type in commands old school, I would hop in the delorian, drive all the way back to 85 and grab my old Tandy 1000.

I don’t usually link to this site, but it seems appropriate at this point.

Flag Post

Topic: Serious Discussion / Just leave me alone

Originally posted by dias17se:

There wasn´t porn and bullying before the internet ? Sorry but that´s wrong.

The SAT* has been administered successfully. Your test results will arrive in 1-2 months.

*Sarcasm Awareness Test

Flag Post

Topic: Game Programming / Haxe/OpenFL primer -- If Flash dies, this is your lifeboat

Originally posted by FlashGrenade:

However making sure that my newly types haxe code is correct is going to be an issue for myself and for other programmers who wish to follow suit.

Can’t you just test it? I’m not sure what the issue is.

Originally posted by FlashGrenade:

Is there anywhere we can go for guidance on this matter? Forums, blogs? Chat rooms?

OpenFL forums
Haxe forums
Haxe IRC

Originally posted by Lucidius:

No more embedding assets anymore using the [Embed] tag and I am having trouble getting assets to load properly.

Maybe I’m forgetting something back from when I started, but I find the assets system easier to use than [Embed] ever was.

Put <assets path="assets" /> in your application.xml file, then call Assets.getWhatever("assets/path/to/the/file"). Or add a separate <assets> tag for each type of asset if you prefer; that can save you some typing if done right.

Though maybe the problem is you’re not sure where each asset is ending up? Simple solution: compile for anything but Flash, find the corresponding bin directory, open the nested bin directory in there, and you’ll get to see where each asset ended up.

Flag Post

Topic: Serious Discussion / Just leave me alone

As Kasic said, these “issues” have been around for ages. (And in most cases aren’t real issues.)

I don’t usually disagree with Vika, but this time I have some nits to pick.

Originally posted by vikaTae:


You can’t meet a person’s eyes over video. And there are other drawbacks.

Originally posted by vikaTae:

And without the net, she would reference friends who are that weight and think its healthy. It’s just ill-informed people swapping opinions.

The internet may, however, make it easier for them to ignore informed opinions.

Flag Post

Topic: Game Programming / weird url issue

Ugh, yeah, don’t use frames to display different pages. Makes it hard for people to link to anything but your homepage.

Flag Post

Topic: Game Programming / Text based rpg

Originally posted by dragon_of_celts:

So far the only one I’ve had a problem with is “a bird in the the bush”

The only one I’ve had a problem with was “you that read wrong.” (Both times!)

Though I instantly caught both “defiantly” and “buisiness,” so I think it balances out.

Flag Post

Topic: Game Programming / Where is the dashboard?

Edit: I refreshed immediately before, and I was still ninja’d…

Flag Post

Topic: Game Programming / Text based rpg

Also, start small. “A few in-depth areas” is too large.

The game should be one single in-depth area, and even that shouldn’t have too much depth. If it works, you can flesh it out. If it doesn’t, you can start again.

I’d suggest that you implement features in this order:
1) One to three characters.
2) One or two plot points.
3) One puzzle to solve or one choice to make.
4) Good spelling and grammar.
5) Shipping. Not that kind.
6) Other stuff. (Optional.)

Flag Post

Topic: Run Mobile / Why dude? Why?

Power cells will be easier to get when the next update comes out.

Flag Post

Topic: Run Mobile / Why don't I have my duplicator runner unlocked

Bumping is only a problem when you bump something from the second page, because then something gets pushed off the first page. This forum doesn’t even have a second page yet.

Flag Post

Topic: Run Mobile / What's the Duplicator like?

The duplicator creates a clone of himself every few seconds. As long as any clone survives, you can keep going.

Flag Post

Topic: Game Programming / As3: Timer wont work

Originally posted by Mond:

Assuming your game is 30FPS, you are reinstantiating enemyspawn every 33 msecs… enemyspawn never has a chance to run for 1000 msecs, therefore, it never throws the TimerEvent and enemyShipTimer is never called.

Pretty sure that timers aren’t garbage collected until you stop them, so every single instance would survive for 1000 milliseconds. (And then it would survive for another 1000 milliseconds, and so on until Flash crashed.)

Flag Post

Topic: Game Programming / Uploading games