Results 1 to 10 of 10

Thread: Collision done directly with OnCollision ( don't understand it, help me understand)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Don't know why, but it just looks to me like the whole code is done by nearly hardest possible way. I can't even follow what the code is doing... Are you calculating collisions same place you move player? SpriteEngine way of coding is relic of the past DelphiX which was absolutely horrible way to make games. DoMove, DoCollision; all of those are optional steps that make the code more complicated than it should be. With vectors the code amount would be reduced by 60% while code would become more readable and faster.

    That said, once you've already started that way i'm not one telling you to change all the work. Just, think the code through wholly. In what order are those class methods called and how do the variables change in between. Does your collision take into account if player is 5 pixels inside the wall, aswell as 6 or 16 pixels? If your movement is not frame-based or floating point then you can't rely on certain things.

    Are the floats absolutely rounded correctly with either Trunc() or Round()? Do you draw the player from its center point or corner?

    ps. I have also msn if you'd like to chat about things more detailed. Send a pm
    Last edited by User137; 29-08-2011 at 06:56 AM.

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
  •