PDA

View Full Version : 3D Flock Code Challenge


rumblesushi
05-05-2011, 02:00 PM
Considering it's running in Flash, I've developed some very fast 3D flock code.

Despite being art focused, I know polycount has a good handful of programmers, so if you're up for a challenge, see how fast you can get an epic 3D flock running at.

A few rules.

1) It must be browser based for accessibility and fairness. But you can use anything, Flash, Java, Unity etc, as long as it runs in the browser.

2) The flocking objects can be anything, however they must have rotation, so you can see the direction they're moving in etc. So no dots/ pixels. Because I'm using a software engine, doing everything on the CPU, I choose to render 3D lines for max performance.

3) Mininum resolution of 750 by 422.

4) Must be a proper cohesive flock, not just a bunch of objects randomly moving around.

5) Must have a moving camera, tracking the Flock.


Here is my demo - http://rumblesushi.com/turbo_flock.html

Runs at around 45fps on my humble Dual Core with 5600 objects.

So you can see how much juice rendering polys uses, this runs at the same framerate, but with only 1100 objects - http://rumblesushi.com/cube_flock.html

I look forward to seeing what you can do ;)

RumbleSushi

hobodactyl
05-05-2011, 04:43 PM
Very cool work! You have the coolest home page ever, by the way :P

rumblesushi
05-06-2011, 09:39 AM
Haha, thanks. I actually forget that site exists sometimes, as it used to be my portfolio for illustration/motion graphics, but since I've moved into game development etc, I just stuck that piece on there ;)

DDuckworth
05-06-2011, 05:50 PM
personally I'd prefer a free floating camera that you could move with WASD and starting out positioned above the flock, this is hard to watch and just seems like a clustercuss of movement, although it is possible to tell that it is a flock, well done though.

rumblesushi
05-06-2011, 06:57 PM
Yeah, it's actually easier to see the flocking behaviour when the camera is more panned out.

You can control the camera with the mouse though. Just click and drag to move the camera up and view the flock from a distance.