A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: 3D Flock Code Challenge

  1. #1
    Senior Member
    Join Date
    Jan 2010
    Posts
    126

    3D Flock Code Challenge

    Considering it's running in Flash, I've developed some very fast 3D flock code.

    I think a few guys on this forum know 3D , 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

  2. #2
    When you know are. Son of Bryce's Avatar
    Join Date
    Aug 2002
    Location
    Los Angeles
    Posts
    838
    You're making my head hurt, rumblesushi.

    I don't understand how 3d Flock code works, care to explain the concepts, post some code, or links?

  3. #3
    formerly hooligan2001 :) .hooligan's Avatar
    Join Date
    Mar 2008
    Posts
    405
    I'm not good enough for 3d flocking, I could try 2d? But still I think I would't do so great. Your using Boids right?
    World Arcade | Facebook | Twitter - Follow MEEEE! or not......

  4. #4
    Senior Member
    Join Date
    Jan 2010
    Posts
    126
    Hey Son, well as hooligan just suggested, the classic flocking algorithm is boids. There must be some easily available 2D boids stuff in AS3.

    The change to 3D flocking is honestly not that much harder. The core concepts and behaviour are identical, the main difference is you extend the steering behavior to 2 axis instead of 1. Up/down in addition to left/right.

    And sure, you two can try 2D instead of 3D if you have no 3D experience. It should definitely be easier to match or outperform my version, but still not easy, even in 2D

    By the way I'm actually NOT using boids. My flocking behaviour is completely custom, without referencing boids at all, but the net result is very similar. I just kind of made some custom behaviour that makes for nice flocking, and performs very well.

  5. #5
    Senior Member Pazil's Avatar
    Join Date
    Sep 2006
    Location
    Ontario, Canada
    Posts
    913
    I'll try to have a go at it...probably in 2D, as I have forgotten all my past 3D experiments and stuff...though getting into that again might be cool, at least to draw lines!

    I'm caught up with some freelance work, as soon as I get the time, I'll try running some tests!
    WIP-ZOMBIES

    I love vegetarians! More meat for the rest of us!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center