Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Draw Black Circle

  1. #11
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Draw Black Circle

    It becomes very slow, Is that because you load the file every time you shoot? Do you pre-catch the bullet hole texture?
    When it returns to normal speed, do the decals stay? If so, there is noting wrong with the rendering, but with the generation of the plane/texture.

    Maybe you can say something what you do when you "pull the trigger". It also could be that the physics are slow.
    Just some ideas to think of.
    NecroSOFT - End of line -

  2. #12

    Draw Black Circle

    I use a " Timer" for shooting time ( shoot every 30 seconds ) and I use this code to select the place of the bullet on the wall

    //------------------------------------------------------------------------//
    SetVector(rayStart, GLDummy_Player.AbsolutePosition);
    SetVector(rayVector, GLSceneViewer1.Buffer.ScreenToVector (AffineVectorMake(CurseX, GLSceneViewer1.Height-CurseY, 0)));
    NormalizeVector(rayVector);
    if GLFreeForm1.RayCastIntersect(rayStart, rayVector, @iPoint, @iNormal) then
    begin
    // create transparent plane
    end;
    //------------------------------------------------------------------------//

    I think the problem because that code but I didn't find any another one to select the place on the GLFreeform

  3. #13
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Draw Black Circle

    You can try to see how long each functies does to complete. Be doing this it becomes clear what is slow I think. I don't think It's your circle drawing stuff but the ray intersection stuff.
    NecroSOFT - End of line -

  4. #14

    Draw Black Circle

    is there another code better than I used to select the place of the bullet on the GlFreeForm

  5. #15
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Draw Black Circle

    What does GlFreeForm do?
    NecroSOFT - End of line -

  6. #16

    Draw Black Circle

    it's just a map ( main map ) but it has a lot of curves

  7. #17

    Draw Black Circle

    it's just a map ( main map ) but it has a lot of curves

  8. #18
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Draw Black Circle

    Collision detection on a large map is often slow. Could that be the problem? You could try to use a physics engine. Most of them have good optimazations for ray intersection on large scale maps.
    NecroSOFT - End of line -

  9. #19

    Draw Black Circle

    were can I find physics engine , is there any demo for that

    thank you

  10. #20
    Legendary Member NecroDOME's Avatar
    Join Date
    Mar 2004
    Location
    The Netherlands, Eindhoven
    Posts
    1,059

    Draw Black Circle

    You could try newton game dynamics. I have used it before and it works well.
    You may want to take a look at TreeCollisions.

    Anyway, did you benchmark you functions?
    NecroSOFT - End of line -

Page 2 of 2 FirstFirst 12

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
  •