Recent posts by SteelGiant on Kongregate

Flag Post

Topic: General Gaming / Idle Mine rant

I got some (slightly) intellectual entertainment out of it by optimising and making a calculator for this game that helps you work out the best thing to mine:

Idle Mine Calculator

If you’re going to be clicking, you might as well be doing it as efficiently as possible!

 
Flag Post

Topic: General Gaming / idle mine

I made a calculator for this game that helps you work out the best thing to mine

Idle Mine Calculator

Give it a try

 
Flag Post

Topic: Game Programming / AS2 copypixels() and draw()

Ok, well I got this to work myself in the end. Because a couple of other people expressed interest when i first mentioned it I thought I’d share my method.

First, set up the thing that you’re going to draw onto:

import flash.display.BitmapData;

var groundbmps:BitmapData = new BitmapData(640, 480, true,0×000000);
_root.groundmc.attachBitmap(groundbmps, _root.groundmc.getNextHighestDepth());

This attaches a (640 by 480 in this case) transparent drawing area to the ‘groundmc’ which is what i wanted to draw on.

Then when you want to draw a movieclip, examplemc, onto it simply go

import flash.geom.Matrix;

var myMatrix:Matrix = new Matrix();
myMatrix.rotate(examplemc._rotation*Math.PI/180);

var translateMatrix:Matrix = new Matrix();
translateMatrix.translate(examplemc.x,examplemc.y);

myMatrix.concat(translateMatrix);

_root.groundbmps.draw(examplemc,myMatrix);

removeMovieClip(examplemc);

That will then draw examplemc on the groundmc (-this assumes that the origin for groundmc and examplemc are the same i think…) and remove examplemc.

Its working perfectly in my game now, so any errors are down to typinig that up, but if anyone has any questions/advice that would be great.

 
Flag Post

Topic: Game Programming / AS2 copypixels() and draw()

I’m trying to go from having a .png in a movieclip and then to draw that onto a background image so i can then remove the movieclip to increase performance. I heard its possible to do that with the above functions, but I cant figure out how to implement it properly. Anyone able to provide an idiots guide?

 
Flag Post

Topic: Game Programming / Having large numbers of objects in AS2 -& How to turn movieclip into a bitmap and print on the ground?

Thanks for those responses, I think I follow the examples of making a given bitmap and then playing with that, however I cant figure out how to get that to work for the situation I’m in.

I have some movieclips (which arent animated, they’re just holding a static image). The movieclips fly according to some code, then become just sit on the floor. At the moment I just delete the onEnterFrame, but I’d prefer to turn the image in the movieclip to just a thing drawn on the floor.

Can someone elaborate on how exactly to go from .png inside movieclip to same image in the right place, orientation etc drawn on the floor (or an arbitrary movieclip)?

 
Flag Post

Topic: Game Programming / Having large numbers of objects in AS2 -& How to turn movieclip into a bitmap and print on the ground?

Further details: Currently the ‘bits’ are put onto the stage as Movieclips, which have had the .png of the image put into them in the library. (Is this really inefficient to start off with?)

So what I’d like to do is get it to draw the contents of the ‘bits’ movieclip onto the ground movieclip (but only after I’ve done something to it, so I cant just draw straight away), but I’m not sure how to do that…

Edit: Yes some kind of tutorial would be really useful, as I cant seem to find any myself.

 
Flag Post

Topic: Game Programming / Having large numbers of objects in AS2 -& How to turn movieclip into a bitmap and print on the ground?

Ok, they look useful.

As I have movieclips I assume I need to use the draw() function?

I just tried it out, but it looks like they just vanish without leaving an image…

This is what happens when i want to swap the dynamic movieclip object out and draw the static one on the ground:

_root.ground.draw(this);
removeMovieClip(this);

What should I be putting there to make sure the image is drawn onto the “ground” movieclip at the same position and orientation on top of all other stuff?

 
Flag Post

Topic: Game Programming / Having large numbers of objects in AS2 -& How to turn movieclip into a bitmap and print on the ground?

I’m trying to make something where I’d like to have a large number of bits on the floor. After about 200-300 or so of these bits are on the floor the game starts to slow down (I’ve tried it on 2 computers of different speeds) and so i need to limit the numbers by deleting old ones when new ones are created.

Currently the bits are created as movieclips, have some onEnterFrame stuff they do for a few frames, and then once thats done the onEnterFrame is deleted and they just sit there.

In games like ‘endless zombie rampage’ it looks like there are a virtually unlimited number of splatters and bodyparts without this kind of performance drop.

Whats the best way to handle large numbers of static objects like this? Any advice would be great.

 
Flag Post

Topic: Game Programming / Use of commercial game assets

I thought that was probably the case, although I’m not sure all the examples I’ve seen fell under that…

What about IP though? What are the rules on setting a game in an existing fictional setting, and if that isnt ok how much of a change is required to make it ‘distinct’ from the setting?

 
Flag Post

Topic: Game Programming / Use of commercial game assets

I notice there are several games on here that make use of sprites, sounds and other assets and IP from mainstream games. When is this and when is this not ok?

Are there just certain older games where the developers have allowed the public to make use of assets from their games?