• Welcome to Valhalla Legends Archive.
 

Diablo II: Location Unit Conversion

Started by Win32, July 25, 2007, 01:12 PM

Previous topic - Next topic

Win32

I've reached the daunting section of collision detection in my D2GS project. Now, I have the problem that object velocity (such as missiles/players) is measured in pixels / frame.

How am I to convert pixels to object x/y locations? Or simply, what x number pixels equals the distances between object x/y's?


Thanks :)

raylu

Stand on one side of the screen, cast on the other, time it, determine number of pixels, divide, round :P
Pie?

ShadowDancer

#2
each x/y location represents a tile, each tile haves a static amount of pixels, i dont remember well but it can be 16*16.
Quote from: MyndFyre-vL
No. We help people who help themselves.
http://sourceforge.net/projects/d2gs
http://assembla.com/space/d2gs