Just thought i'd share the experience.
has to been seen to believe =)
http://www.youtube.com/watch?v=D7v5tgkdtWY
Mac
Just thought i'd share the experience.
has to been seen to believe =)
http://www.youtube.com/watch?v=D7v5tgkdtWY
Mac
Cool stuff dude. Starling is great.
Amazing! Would be cool to see some code samples when you're done!
I didn't even think it was possible to animate quadbatches...!
Awesome work, Mac!!! It's not just Starling, but that you're using it in a very smart way =)
I'm looking forward to what you make of this! =)
@theflashguy,
What I did was create a sprite that contains 2 quads for the top layer.
In the first one i drop all the basic background tiles wich have blendmode.none
In the second one I drop all the animating border textures. Wich have blendmode.normal
on the the fly, when moving or animating, i recreate the quads with reset() and refill them with the updated textures.
This way the sprite containing them will be drawn in just two draw calls.
@Daniel-San perhaps its cleverish but trying this with the regular displaylist in flashcs5.5 tought me that one you hit a bottleneck its game over and you have to start stripping stuff that makes the whole experience worthwhile.
With your framework. Its more like the opposite.
Again; epic stuff and easy to use.
The learning curve i would have had to spend on n2d2 or stage3d is now spend on my own thing.
@MacShrike
Do you redraw the quadbatch every frame? Or do you have some kind of elapsedTime before you call batch.reset and redraw your quads?
Have you noticed a limit to how many you can animate and how often?
No.
I place the screen in tiles +1 on each side in the sprite then reposition that with a simple xy move until the border is reached. Then i recreate the quad.
The animating layer is also in the sprite and moves with it auto.
I also recreate that on a border change.
The animation iw run thru a timer. You can do it from the enterframe but this clogs it up and also and mostly, because of the 'idiotic' speed the enterframe runs at, the animation would be way to fast anyway.
In this instance i have it running at 180ms.
Regards Mac
I think that all readers want to see a source of this demo :)))
@MacShrike. I have an 85x85x32 tilemap running at 60fps and I have a quadbatch with 100 images in it for my enemies. If I try and call reset on the enemy batch and then redraw the enemies in different positions the frame rate completely dies.
Am I going about this the wrong way? Surely one quad batch being reset shouldn't have a big impact on performance...
Difficult to say without the code.
I can only suggest;
Not drawing anything in the batch that is off screen.
Make sure ALL the textures are in the same atlas.
Dont mix blendmodes in a batch, group em by blendmode.
Dont draw to many quads in one batch its better to draw three layers into three batches and group em in a sprite than drawing all in one batch.
Try to keep the recreate batch routine as light and simple as possible no heavy logic in it.
Also: This demo is build for display purposes only so to speak.
After adding another layer with items and a take routine im am now also running between 34-47 fps(very unomptimized code so that should be better)
Dont get discouraged! Perhaps run it thru the profiler to see where you get high memory consumption.
I agree with ekeeper!
Well before i post the 'MAGIC' code. Yall should know that after adding another item layer some special effect and a simple take and respawn routine.
I have now dropped to 25-35 fps. With an average memory usage of only 14M.
Although, thats with the tilelayer beeing at alpha 0.7
still its the framerate i started with in regular flash so im not too dissapointed.
Also its not optimised code wise so there might still be hope.
When i have it all figured out ill post some code.
Mac
You must log in to post.