Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

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

Thread: Collisions and performance

  1. #11
    Intern Contributor
    Join Date
    Nov 2011
    Posts
    52
    Solved!
    I've implemented ray casting (using bresenham algorithm to "draw" my ray) to check collisions and now it works

    Thank you all for your answers!

  2. #12
    Junior Member Regular Contributor
    Join Date
    Jun 2006
    Location
    Edinburgh - Scotland
    Posts
    147
    Quote Originally Posted by Vincent22 View Post
    Sorry, but I don't understand your suggestion. Can you explain your methods with more details?
    thank you
    The simple brute force way to do collision detection in a light cycle game is to have a large 2D grid of your world which you set the X,Y points of where there are walls/trails/anything you can hit. If you only need to know "Collision or not" then you can use 1 bit.

    It might be the size of your world means the grid is too big (10k by 10k using 1bit is over a gig), but maybe you don't need a 1-to-1 resolution i.e. if the grid 5k by 5k, would the player notice? If the minimum speed is 2 then definitely not.

    Hopefully that makes more sense.

Posting Permissions

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