Away3D4 + JigLib runs really slow

33 views
Skip to first unread message

Josh Beckwith

unread,
Mar 17, 2011, 1:29:40 PM3/17/11
to Away3D.dev
This is my first big project with Away3D, so I'm still learning the
ropes. I'm hoping there's some small detail I'm missing that is making
my program ignore the fact that it can use the GPU.

Here's a link to the game: http://positlabs.com/files/code/crossBaller/bin/index.html

Controls:
WASD to move
SPACE to shoot
CLICK AND DRAG to look around

There's nothing super complex going on here, but the game makes my CPU
usage jump to 90-100%, and the framerate is terrible.

I compared it to the CPU usage when I run the shallow water simulation
( http://infiniteturtles.co.uk/projects/away3d/broomstick/ShallowWaterDemo.html
), and it's a huge difference. When i run the sim, my CPU hovers
around 30%.

I tried disabling the physics engine, removing the fence, removing the
environment sphere...and nothing makes a difference.

I've uploaded the source here: http://positlabs.com/files/code/crossBaller/src/
And it's available for download as a rar:
http://positlabs.com/files/code/crossBaller/CrossBaller.rar

And if my computer is on when you play the game, you can get some
friends in on the action ( type login.yourUserName in the chat box to
connect to the server )...but the game is super slow, and not
finished.

If you're interested in learning how to set up a multiplayer
game(http://www.smartfoxserver.com/), feel free to use my code.

Fabrice3D

unread,
Mar 17, 2011, 1:37:11 PM3/17/11
to away3...@googlegroups.com
wmode direct is missing

Fabrice3D

unread,
Mar 17, 2011, 1:40:17 PM3/17/11
to away3...@googlegroups.com
  var flashvars = {};
            var params = {};
            params.quality = "high";
            params.bgcolor = "#ffffff";
            params.allowscriptaccess = "sameDomain";
            params.allowfullscreen = "true";
            params.wmode = "direct";  <----- this one says: engage warpspeed please


On Mar 17, 2011, at 6:29 PM, Josh Beckwith wrote:

Josh Beckwith

unread,
Mar 17, 2011, 3:18:12 PM3/17/11
to Away3D.dev
Amazing!

Is there some way to set that parameter in actionscript?

Thanks for the help!

On Mar 17, 10:40 am, Fabrice3D <fabric...@gmail.com> wrote:
>   var flashvars = {};
>             var params = {};
>             params.quality = "high";
>             params.bgcolor = "#ffffff";
>             params.allowscriptaccess = "sameDomain";
>             params.allowfullscreen = "true";
>             params.wmode = "direct";  <----- this one says: engage warpspeed please
>
> On Mar 17, 2011, at 6:29 PM, Josh Beckwith wrote:
>
>
>
>
>
>
>
> > This is my first big project with Away3D, so I'm still learning the
> > ropes. I'm hoping there's some small detail I'm missing that is making
> > my program ignore the fact that it can use the GPU.
>
> > Here's a link to the game:http://positlabs.com/files/code/crossBaller/bin/index.html
>
> > Controls:
> > WASD to move
> > SPACE to shoot
> > CLICK AND DRAG to look around
>
> > There's nothing super complex going on here, but the game makes my CPU
> > usage jump to 90-100%, and the framerate is terrible.
>
> > I compared it to the CPU usage when I run the shallow water simulation
> > (http://infiniteturtles.co.uk/projects/away3d/broomstick/ShallowWaterD...

Dave

unread,
Mar 17, 2011, 3:22:06 PM3/17/11
to Away3D.dev
Nope, there's isn't a way to set that param in AS3 in the current
molehill release. That will change in a later release.

-Dave

Michael Iv

unread,
Mar 18, 2011, 3:52:50 AM3/18/11
to away3...@googlegroups.com
That is the perfect example where you need to implement continuous collision detection to the fired balls(Or make the walls thicker) .You can see that when they hit the side walls some of them pass through it.
--
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
http://blog.alladvanced.net
Tel:054-4962254
mic...@neurotech.co.il
te...@neurotech.co.il

richardolsson

unread,
Mar 18, 2011, 4:54:58 AM3/18/11
to Away3D.dev
@Dave:
Where have you read this? I'm interested in knowing how one would be
able to change window mode from inside the Flash Player/AVM.

Cheers
/R
Reply all
Reply to author
Forward
0 new messages