Thread: bullet detection prob

  1. #16
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    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.

  2. #17
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,608
    Archive not valid.

  3. #18
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    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

  4. #19
    Registered User
    Join Date
    Dec 2001
    Posts
    479
    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?

  5. #20
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,608
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Deal or No Deal listbox prob
    By kryptkat in forum Windows Programming
    Replies: 5
    Last Post: 03-30-2009, 07:53 PM
  2. pic movement
    By pode in forum Game Programming
    Replies: 31
    Last Post: 08-21-2002, 10:30 PM
  3. bounding box collision detection
    By DavidP in forum Game Programming
    Replies: 7
    Last Post: 07-08-2002, 12:43 AM
  4. Allegro help-o
    By Vicious in forum Game Programming
    Replies: 109
    Last Post: 06-11-2002, 09:38 PM
  5. Replies: 4
    Last Post: 05-03-2002, 10:40 PM
Website Security Test