Recent posts by Aesica on Kongregate

Flag Post

Topic: Game Programming / AS3: Severe FPS drop when mouse hovering over game

The objects move even slower when you move the mouse around vs when it's standing still. This leads me to believe that you have a lot of displayobjects that are all firing off (likely unnecessary) mouse events while the mouse is active on the stage. Any DisplayObject (sprites in a game, specifically) that doesn't actually need to receive mouse input should have mouseEnabled = false and any DisplayObjectContainer that won't ever contain things like mouse-interacting objects should have mouseChildren = false.
 
Flag Post

Topic: Game Programming / {AS3} Game Help ?

The justin bieber track is definitely the most important part. Do not leave it out.

 
Flag Post

Topic: Game Programming / AS2 Shared Object help

What did the trace statements output?

 
Flag Post

Topic: Game Programming / Help Out !

Maybe each word is supposed to represent a class.

 
Flag Post

Topic: Game Programming / AS3: Syntax error

This is why opening curly braces are best used on the line directly below rather than the end of the same line. (In my opinion, anyway)

 
Flag Post

Topic: Game Programming / Getting exposure on Kongregate guide

I can’t believe you didn’t mention anything about the icon specifically, as icons are pretty important. Also, you’d be surprised, but including a “start muted” option is pleasing to a lot of people and thus, will boost your ratings slightly.

 
Flag Post

Topic: Game Programming / Separating game logic from drawing logic in canvas

Is it really necessary to subject a player suffering from some kind of lag to 5fps for several seconds when the game logic is still running at full speed? In an mmo perhaps, because the game logic needs to happen at the same rate for everyone playing. In a single player game though, players are (at least I am) more forgiving of games that slow down with lag than games that kill them because their framerate drops so low they can't really tell what's going on--until it's too late.

The comment you're likely referring to raises a good point about the framerate dropping to minimal amounts when tabbed out, etc. Does it really matter if your game's framerate slows to a crawl when not active and thus, the person isn't even playing it? If that's really the case, forcing it to pause is an option--a commonly-used option, at that.

So yeah, I guess you could say I'm in the enter frame camp. And the fewer loops your (possibly quite large) collection of game objects has to constantly cycle through, the better.

Edit for another thought: Hard stop "game overs" are fairly antiquated, as the common practice seems to make them more of a "try again" than a "restart from square 1." Thus, game overs aren't really a big deal, meaning players are less likely to try to abuse framerates to boost their survivability. As for those who are prone to cheating, unless it's a multi-player game, I don't really see the big deal. I used to use game genie/game shark all the time to experience games I loved in new and interesting ways. Now that I attempt to make games, I don't really want to stand in the way of people who might want to do the same thing I did back in the nes/snes days.
 
Flag Post

Topic: Game Programming / Question about arrays

Yeah oops, forgot a period. I’ll edit my post. Anyway vectors are basically arrays, except they’re faster and can only be made up of the specified data type (Number in this case) rather than anything. If you’re more comfortable with arrays, you could certainly use one instead to get the same result, although I find the extra strictness nice because it makes things easier to debug.

 
Flag Post

Topic: Game Programming / Question about arrays

Simple data types (which includes numbers, ints, uints, etc) are always by value rather than by reference. Consider changing your approach to do away with individual powerFire, PowerIce, and powerElect variables entirely, because with an array (or vector) they’re really not needed at all. I usually approach such things like this:

// this is the closest you can get in AS3 to enumeration
private static const TYPE_FIRE:int = 0;
private static const TYPE_ICE:int = 1;
private static const TYPE_ELEC:int = 2;

private var power:Vector.<Number> = new <Number>[0, 0, 0];

// ...then, to access/change/etc:

power[TYPE_ICE] = 3; // setting ice's power to 3
 
Flag Post

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

Thank you so much. All I've ever been able to do with matrices is get them to rotate based on upper-left registration, which is useless (but not as useless as clipRect!). I had no idea you could do what is basically moving them to the center, rotating, and then moving them back like that.

With the following changes, it works perfectly. :D

				iTempWidth = ssSpriteSheet.aSpriteRect[iAppearanceID].width;
				iTempHeight = ssSpriteSheet.aSpriteRect[iAppearanceID].height;
				bmpNew = new BitmapData(iTempWidth, iTempHeight, true, 0);
				bmpNew.copyPixels(ssSpriteSheet.bmpSpriteSheet, ssSpriteSheet.aSpriteRect[iAppearanceID], ZERO_POINT, null, null, true);
				oMatrix = new Matrix();
				oMatrix.translate(iTempWidth * -0.5, iTempHeight * -0.5);
				oMatrix.rotate((iNewDirection + 90) * PIForRadians);
				oMatrix.translate(iTempWidth * 0.5, iTempHeight * 0.5);
				bmpRotationCache = new BitmapData(iTempWidth, iTempHeight, true, 0);
				bmpRotationCache.draw(bmpNew, oMatrix);
 
Flag Post

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

So I'm working on a thing that's primarily rendered through copyPixels and everything is smooth, fantastic, etc. However, I need to be able to rotate things--enemies, bullets, misc particles, whatever. This is where draw (my only real option?) comes in. Unfortunately, rotating with draw seems to be some kind of nightmare, which (according to my failed search attempts) I'm not alone in sharing and that I have yet to find a proper solution for. (maybe I just suck at searching?)

Anyway, I eventually came up with this, uh, "solution." I don't need to explain why it's a fairly disgusting one, and I'd really like to find a better way to do this.

		public function SetVelocity(iNewSpeed:Number, iNewDirection:Number):void
		{
			var bmpNew:BitmapData;
			var mNew:Bitmap;
			var mRotateMe:Sprite;
			var mOuterContainer:Sprite;
			var iTempWidth:int;
			var iTempHeight:int;
			
			if (bRotateWithDirection && iDirection != iNewDirection)
			{
				iTempWidth = ssSpriteSheet.aSpriteRect[iAppearanceID].width;
				iTempHeight = ssSpriteSheet.aSpriteRect[iAppearanceID].height;
				bmpNew = new BitmapData(iTempWidth, iTempHeight, true, 0);
				bmpNew.copyPixels(ssSpriteSheet.bmpSpriteSheet, ssSpriteSheet.aSpriteRect[iAppearanceID], ZERO_POINT, null, null, true);
				mNew = new Bitmap(bmpNew);
				mRotateMe = new Sprite();
				mOuterContainer = new Sprite();
				mRotateMe.addChild(mNew);
				mOuterContainer.addChild(mRotateMe);
				mNew.x = iTempWidth * -0.5;
				mNew.y = iTempHeight * -0.5;
				mRotateMe.x = iTempWidth * 0.5;
				mRotateMe.y = iTempHeight * 0.5;
				mRotateMe.rotation = iNewDirection + 90;
				bmpRotationCache = new BitmapData(iTempWidth, iTempHeight, true, 0);
				bmpRotationCache.draw(mOuterContainer, oMatrix);
			}
			
			iDirection = iNewDirection;
			iSpeed = iNewSpeed;
			vx = Math.cos(iDirection * PIForRadians) * iSpeed;
			vy = Math.sin(iDirection * PIForRadians) * iSpeed;
		}
Any thoughts on how to rotate things via draw in a way that avoids kind of ridiculous, bloated nonsense?
 
Flag Post

Topic: Rise of Mythos / Make a Card (Discussion)

Just showing my World of Warcraft pride! Because boredom, etc:

 
Flag Post

Topic: Game Programming / Will it be possible to export AS3 to HMTL5?

My only real complaint is that dealing with XML objects in haxe is utterly loathesome compared to AS3's fairly-graceful E4X implementation. While I found this, the performance numbers for flash are nothing to write home about.
 
Flag Post

Topic: Game Programming / Best Way to format numbers? (show in thousands, millions, etc.)

Originally posted by Draco18s:

Use switch rather than if…else if… blocks.

Besides personal preference, is there really a reason to favor switch over if/else if blocks when possible? I always thought switch statements compiled into if/else, but I could be wrong. Besides, switch generally feels like a less-flexible if/else block, so I never use it. That aside, Ace_Blue’s array method is what I’d favor for this particular example anyway, only with a vector instead of array.

Edit: Isn’t it considered bad practice to have multiple return statements in the same function?

 
Flag Post

Topic: Game Programming / Will it be possible to export AS3 to HMTL5?

Originally posted by AMD_Paulius_J:

Aesica, have you used it? and maybe you could explain in short terms what does openfl do? because as i understand it’s not a plugin for flash, it’s a separate platform which uses Haxe as it’s primary language. But i want to find out if it will be possible to create games in flash IDE and export them to HTML5, mainly because building in flash IDE is extremely efficient.

Doh, player_03 beat me to it. While I don’t use the flash IDE at all and can’t speculate on how it will feel or work from that perspective, in FlashDevelop, it’s quite similar to working with traditional AS3 with only a few minor quirks. (UInt instead of uint, public function new() instead of public function MyClass(), for example.) Accessing your assets seems a little weird at first too, but then again I think flash CS users do it differently than FD users anyway, so who knows?

 
Flag Post

Topic: Game Programming / Will it be possible to export AS3 to HMTL5?

In a sense, yes.

 
Flag Post

Topic: Game Programming / 3D model search engine

That’s really cool. Seriously. :D However, I do want to say this…

Originally posted by Draco18s:

Really sweet. My only suggestion is to not add more content to the bottom of the page as you scroll down. There’s a point at which the browser will become unresponsive, so it limits how deep a search a user can perform and there is no workaround.


I couldn’t agree more. It really bothers me that the latest trend in web development is to keep piling on more content as the user reaches the bottom of a page rather than giving the user a reliable means to flip between page 1, 2, 3, …n etc.

 
Flag Post

Topic: Game Programming / [Solved] Textfield doesn't show.

Declaring a textformat directly through the constructor is fine, I use embedded fonts and do it like that all the time. antiAliastType just makes it look prettier. OP, it likely has to do with your embed tag—I notice right away you don’t have entries for fontName or mimeType. If you copypast Kewry’s embed code and then replace the relevant fields with your own data, it should work.

Also, try setting the text after you get everything else all set up how you want it.

 
Flag Post

Topic: Game Programming / Suggest a game!

Originally posted by Draco18s:
Originally posted by AntonioS2740:
Originally posted by player_03:

Suggesting ideas is not going to lead to getting more games. Ideas are a dime a dozen. If you really want more games, make them yourself.

This thread is to suggest games. Please do not get mad.

because suggestions are dumb. No one is going to take up your idea just because you suggested it. I have 10,000 ideas for games already, as does*every other developer.* none of them is going to go, "yeah, i like that guy’s suggestion more. "

Not only this, but I (and this is likely true of every single developer out there) am more interested in bringing my ideas to life than someone else’s.

 
Flag Post

Topic: Game Programming / How can you get Developer

Originally posted by darkjonas8:

Please dont just upload troll game just so you can call yourself a dev…

This is why I wish the “D” tag wasn’t even visible.

 
Flag Post

Topic: Rise of Mythos / another inventory page

^ Unless those pages are being given to us for free, this influx of inventory bloat events combined with 2 new inventory pages to buy, row by row, is racketeering at its finest.

 
Flag Post

Topic: Game Programming / GiTD Timing

Doubt I’ll do it this time around—I mean I usually don’t, even though I mean to. I’m very slowly working on a rather ambitious bullet hell shooter (last one I think I’ll make, actually) and also, November has this that I’d like to participate in.

 
Flag Post

Topic: Rise of Mythos / [Devs] Worldboss needs more than 2 opening times

Time-gated content isn’t popular in most civilized countries. When will china realize that?

 
Flag Post

Topic: Rise of Mythos / Fan Game

Even if the games are free to play, web games (flash, html5, etc) are still considered commercial products because so many sites offer ad revenue sharing. (Kong does) If you steal assets from a source you do not own (such as this game) you could run into legal troubles if the developers decide to go after you.

A few more things:

1) RPGs are more work than you think. Good luck with that.

2) The world really doesn't need another tower defense game. Seriously. :|
 
Flag Post

Topic: Game Programming / My games Sphere With Elements

Harsh (but well-meaning) constructive criticism incoming!

1) The writing needs some serious work. I know many flash devs don't speak english as a native language, but it's still important for your audience to be able to understand what's being said in the game, and that it makes for an enjoyable read.

2) Oh my, that font. I know it's tempting to use fancy fonts because "they look cool" however in this case, it makes your dialog sequences harder to read. Titles and such are fine in fancy fonts, but you want heavy amounts of text to be displayed in something players can read more easily and thus, more quickly.

3) So the game itself is a breakout clone. That's fine for a first game, however the physics seem off. Rather than the trajectory being modified by the angle at which it hits the paddle, where it hits the paddle seems to be what determines the direction the ball is going to travel in. It's pretty easy to set up straight up-and-down bounces. Hitting blocks (and the ceiling) seems to cause the same thing to happen.

4) The goal of a given level isn't clear. I filled up my element-bar-thingy and the game kept going. Then, after fulfilling some unknown objective, I finished the level?

5) The shiny gold buttons seem somewhat out of place with the rest of the game's art style.