
-----------------------------------
Aange10
Mon Oct 10, 2011 7:29 pm

Making Efficient Coding
-----------------------------------
What is it you are trying to achieve?
I'm trying to make my coding efficient, and clean. And I have a question about procedures.


What is the problem you are having?
Well I'm looking to put my collision detection into a procedure, in hopes to clean up what could amount to 100s of lines of code ( across various levels that is)

EDIT: Also, if you'd note the part of my collision that has the variables +12, that is me saying that if your withing 12 pixles of this place then you've hit it. Is there a way I can stop doing that, and get perfect collision between rectangles? I'm willing to work with Trig, and I've read over the perfect circle collision as well.

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
I'd like to know if the two lines


    %Collision on bottom & side of platform
    for a : 1 .. 4    
        if player_x >= platform(a).platform_x and player_x = platform(a).platform_x and player_x + player_width = platform(a).platform_y and player_y + player_height = platform(a).platform_y and player_y + (d) 