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

Thread: What kind of games are best to start with?

  1. #11

    What kind of games are best to start with?

    The entire story changes of course when you want pixel perfect collision detection, but this is easy too!
    Somehow I think I need this one since not everything will be rectangular. So do you have some links or something about it? I think I've read something about it somewhere, but at the moment I'm not able to find out where.

  2. #12

    What kind of games are best to start with?

    Well rectangular collision detection is not only for rectangular images, but it is less accurate (alot less) than pixel perfect! I'll have a look for a good tutorial and otherwise I can e-mail you one...

    EDIT : Okay, the tutorial I used to learn it is located here:
    http://www.ifm.liu.se/~ulfek/projects/tutorial.pdf
    It's a very good tutorial, only downside is it's in C and that it uses masks to do the collision detection. I used a simple collision array to do it, which simply is a 2 dimensional array filled with 0 and 1 and on of those numbers (your choice) is used for transparent areas and the other for solid areas. The tutorial can strike you as very hard but it isn't, I must admit that I had to read it 4 times to understand what he was talking about, but a bitmask is simply a 1bit bitmap which means that the pixels can either be black or white. What he simply checks for is if any of the solid pixels of both bitmasks (or collision arrays) overlap eachother and if that is the case you have a collision, if not then you don't! I never used his code, but only the theory. I'll try to write a tutorial on pixel perfect collision detection in the near future.

    Hope this helps a bit...

    P.S. If I where you I would start out with rectangular collisions! If you are going to use pixel perfect cd you will need rectangular too, since it's best to first do rectangular collision detection and only if there are two colliding rectangles to do pixel perfect cd since otherwise the speed of you program decreases with about 25% - 50% !!!
    Do it by the book, but be the author!
    <br />
    <br />Visit the Lion Productions website at:
    <br />http://lionprod.f2o.org

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
  •