PDA

View Full Version : objects that are supposed to stand still are "sticky&am



Diaboli
06-08-2007, 01:08 AM
System: Intel Centrino Duo (2,16Ghz)|2048Mb RAM(617Mhz)|Geforce Go 7950GTX 512Mb| Windows Vista
Compiler/IDE: Delphi 2006 for Win32
Library: UndelphiX

I have a problem with my current project: i have some objects (doors) that are supposed to stay stationary, but when i move, they kinda move a little too (10px) and snaps back into position when i stop moving.

here's a picture:

http://thorins.net/prob.jpg

EDIT: SOLVED! i just figured it out after posting this... pls delete thread.

User137
06-08-2007, 01:29 AM
I would guess this is because of mixed order of things. Ideally this might work for this:
1.Move players
2.Place view at player
3.Draw all

Separate physics (game events and movement) and graphics, it will make code more clear too.

Diaboli
06-08-2007, 01:39 AM
i didnt use the spriteengines built-in X and Y coordinates. i instead moved objects at their DoMove according to the X and Y of one of the objects, wich made things REALLY messy... but i got i straightened out now :D