Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: GAME engine + non-polygonal 3d collision detection project

  1. #1

    GAME engine + non-polygonal 3d collision detection project

    latest version here: http://www.igrodel.ru/tdg3d

    This is the new release of Collision Detection engine. It is better than CDNR1 (released in 2006). Improved perfomance and less memory requirements, here it is: CDNR2ALPHA v2008-2-5: http://www.igrodel.ru/index.php?p=1202226872



    http://www.igrodel.ru/upload/cdnr2alpha-2008-2-5.7z (245kb)

  2. #2

    GAME engine + non-polygonal 3d collision detection project

    I browsed your code a bit and here are my tips
    Avoid so much divisions. Float divs are slow like hell.

    Slow:
    Code:
    vx:=vx/vlen;
    vy:=vy/vlen;
    vz:=vz/vlen;
    Damn lot faster:
    Code:
    vlen := 1/vlen;
    vx:=vx*vlen;
    vy:=vy*vlen;
    vz:=vz*vlen;
    Also check if you are using any sqrt() for your bounding circle/sphere
    code - its unnecessary!

    Maybe you can use further math-tricks to speed it up a lot.
    To success!

  3. #3

    GAME engine + non-polygonal 3d collision detection project

    small update: the same engine sources with old demo included
    http://www.igrodel.ru/upload/myengine-2008-2-20.zip (771kb)

  4. #4

    GAME engine + non-polygonal 3d collision detection project

    Also check if you are using any sqrt() for your bounding circle/sphere
    code - its unnecessary!
    Hmmm... that makes me kinda curious. How can you do circle collision detection without using the square root :?

    I thought the only way was to use pythagoras. Can you explain how your way works? :razz:
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5

    GAME engine + non-polygonal 3d collision detection project

    Pythagoras said: c¬? = a¬? + b¬?.
    If you want to find out c, you need the root. But
    that isn't exactly what you want to know...
    Code:
    type
      circle = record
        x, y, r: single;
      end;
    
    function collide(a, b: circle): boolean;
    begin
      result &#58;= sqr&#40;a.x-b.x&#41; + sqr&#40;a.y-b.y&#41; <= sqr&#40;a.r+b.r&#41;;
    end;
    Just quad the radii and compare

  6. #6

    GAME engine + non-polygonal 3d collision detection project

    this code (mycollisiontrick.pas) runs only 1 time for each object in frame
    it's better to optimise 2d code in collisioncircle/docollision array layered heightmap algorithm (mydepthcollision.pas) first.

  7. #7

    GAME engine + non-polygonal 3d collision detection project

    @waran: that's a neat trick...You dont need to know the actual length between the circle centers. why didn't i thought about this before. :razz:
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  8. #8

  9. #9

    New version released

    v 2008/3/21
    - new more powerful functions added
    - added post-processing shader functions
    - better GLSL shader support
    - collision detection improvements
    - fixed material management errors
    - some changes in nft_export.py for Blender 2.45

    Download:
    http://www.igrodel.ru/tdg3d/tdg-2008-3-21.zip

    Screenshots:



  10. #10

    GAME engine + non-polygonal 3d collision detection project

    Added screen space ambient occlusion support:



    v 2008/4/5
    - added simple dynamic Ambient Occlusion example
    - added cameraPosition flag to shader parser
    - few bugs fixed

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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