any ideas why the bullets go that way
here is the dll's.
at least 2 of them im sure is needed dont worry
the third cant harm either(you probably have it already)
edit: new attachment avalable in later post.
any ideas why the bullets go that way
here is the dll's.
at least 2 of them im sure is needed dont worry
the third cant harm either(you probably have it already)
edit: new attachment avalable in later post.
Last edited by pode; 11-05-2003 at 10:38 AM.
it turned out that the dll file is too big to attach so i found a website that you can get it from in a sec.
allegro dll
if that didnt work here is thewebsite
you must find the dll by your own
aaa i see my problem now its because i draw the player always at the center of the scrren but the real position is something different now i just need a way to move the bullets movement to the center of the screen..
any ideas?
As I was saying....translate the bullets relative to the player.
The bullets on screen position will NOT match the bullet's world position.
bullet.screen.x=Player.screen.x;
bullet.screen.y=Player.screen.y;
This will draw the bullet correctly.
But:
bullet.world.x=Player.world.x;
bullet.world.y=Player.world.y;
This is the coords you use to test for what tile the character/bullet is in.
bullet.tile.row=bullet.world.x/tile.size.x;
bullet.tile.column=bullet.world.y/tile.size.y;
Or you can translate all objects relative to the world. This would be easiest since all you do is check for collisions against the onscreen x,y coords.