What does this mean for me? You will always be able to play your favorite games on Kongregate. However, certain site features may suddenly stop working and leave you with a severely degraded experience.
What should I do? We strongly urge all our users to upgrade to modern browsers for a better experience and improved security.
We suggest you install the latest version of one of these browsers:
Kongregate is a community-driven browser games portal with an open platform for all web games.
Get your games in front of thousands of users while monetizing through ads and virtual goods.
Learn more »
i have this lib. it will be open sourced and githubbed when i find a name for it.
it supports blitting, waypoints, tilemaps, mouse, multiple cameras, movement interpolation, automatic 8 way objects, and will handle pixel perfect collisions.
all the graphics of this demo are obviously placeholders.
the primary objective of this library is to minimize the impact of the garbage collector on performance, so everything is pooled and every object is recycled.
let me know if you try it, and any name suggestion will be well received!
thanks for the tittle change!
and thanks for the name suggestion and the feedback! i like the name jasonjie88 suggested.
i will add a fps meter soon. it is using the miner in debug players, and it has a meter so i didn’t needed it so far.
it runs at 30 fps, with 15 fps logic updates and interpolation between.
aaaaaaaaaaand…. i’m new here and i will thank forever everybody if anyone can point me to any topic, if it exists, discussing replacements for bitmapdata getcolorboundsrect , because in my quest of delete every garbage collector intrusion, i’ve hit a wall with the rectangle created by that function.
i need a replacement that doesn’t create an object.
i know that the simple answer is “is only a rectangle, it does nothing to the garbage collector”…. but is the primary objective of the library and the cause of it’s performance the intention of eliminate every single possible hidden allocation.
I’m working on my own blitting engine for myself and I ran into some of these issues. I ended up dropping the bitmapdatas and using a ByteArray instead (with the alchemy opcodes for the fastest possible access). Of course it has to be put in a Bitmap at the very end to display it on the screen, but otherwise I avoid the class due to it taking and returning Point and Rectangle instead of simple ordinates.
I also use Haxe which makes it a lot easier to get awesome performance. I implemented by own scaling and rotation algorithm and it runs great. So I recommend checking it out.
i can’t :P
so here is the other example
obviously again, the graphics are placeholders, and this is only a demo of lots of shoots on screen with pixel perfect collision.
i’m still fighting with the hidden allocations on that, but it seems to feel smooth anyway.
i was testing with bytearrays and vector, and both are faster, but allocates bytearrays or vectors at the same rate that was allocating rectangles with the other method.
i’ll continue the testings with the vector version anyway, it seems faster. i’ll do the alchemy tests later.
I don’t think you’re able to eliminate “every possible allocation” out of your library, after all, if a function you implement returns something more complex than a Number, you need to allocate memory for this, or else you risk spoiling your library’s user’s data. You can, however, accept a return-to parameter of Rectangle type, and return void, like oldstyle C functions do.