Jump to content

Deban
 Share

Recommended Posts

Hello I used to be an AS3 developer. I started a new project, so... why not try something new?

 

I try different languages and frameworks, all for the web. So here are some bunny benchmarks.

 

I know pixi has it's own, but most benchmark usually test only rendering power and not processing power.

 

What can I say?

You rule!

Not only in rendering power, but more important in processing power.

Link to comment
Share on other sites

I gave another look at the code and made an improvement, wasn't big... but now it render 5,100 bunnies with ~50 fps

 

 

Let's see... Flash always was slow. But then AIR came and there was some mayor improvement with the rendering power with stage 3d. Problem is that the improvements where almost unilateral to stage 3d, and as4 never came along

 

Genome use stage 3d at its full potential, and it uses Haxe to minimize the processing overhead. But when it comes down to your as3 code, there isn't much to be done. AS3 will always be the bottleneck.

 

This is what make the difference:

public function CheckCollitions():void {	var colliding:Boolean;	var bunny1:Bunny;	var rectangle1:Rectangle = new Rectangle(0, 0, 10, 10);	var rectangle2:Rectangle = new Rectangle(5, 8, 10, 10);			for (var i:int = 0; i < bunnies.length; i++)	{		bunny1 = bunnies[i];		for (var j:int = 0; j < 100; j++)			colliding = Collition.Rectangles(rectangle1, rectangle2);	}}

The Collition.Rectangles is a basic axis aligned box collition detection, and it's even inlined.

 

Edit: I thought that maybe the Rectangle that came with flash was using getters and setter, and the function was making extra slow. But no, I create a custom rectangle class and it's the same performance (even a little worse).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...