Computer Science Canada

Any way to easily determine coordinates in the Run Window?

Author:  Pearse [ Thu Dec 09, 2010 6:16 pm ]
Post subject:  Any way to easily determine coordinates in the Run Window?

For collision detection of static items/walls, im using logic like this:

if y>= 100 and x >= 25 and x<= 50 then
y := 100
end if

So basically if variable Y is found to be more then 100 and variable X is found in between 25 and 50, you cannot proceed any further then 50.

The only problem is, I can't really tell which numbers to use. Not using exact numbers will lead to further problems. I can only eyeball it, and while it works its slow and inefficient. Is there any way I can instantly get the coordinate of any point in the run window?

Also, the static items/walls are a part of a large picture taking up the entire window, so I cant just use the coordinate of wear I draw the items because they aren't separate.

thanks

Author:  Tony [ Thu Dec 09, 2010 6:54 pm ]
Post subject:  RE:Any way to easily determine coordinates in the Run Window?

It helps if the same numbers (such as from a map file) are used to both render the level and used for collision. If you are drawing from one set of data and using a separate set of data for collisions, that can easily lead to problems.


: