Thread: raycasting sprites

  1. #1
    Registered User
    Join Date
    Dec 2003

    raycasting sprites

    Anyone know how to display sprites in a raycasting engine? I am a bit stuck in figuring it out.

    I have the distance of each column from the player How would i correctly position the sprite so it scales and looks correct in the world?

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    You must keep track of when you hit a cell that has a sprite in it. When you hit this cell, save the screen coords and distance. Then when you leave the cell, save the screen coords.

    When you go through your buffer - start your sprite drawing at the saved screen coords and make the sprite spriteheight/distance pixels tall.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. making sprites
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 02-20-2010, 07:00 AM
  2. DirectX and Sprites
    By andyhunter in forum Game Programming
    Replies: 6
    Last Post: 12-24-2004, 06:40 PM
  3. Raycasting code
    By BMJ in forum Game Programming
    Replies: 2
    Last Post: 09-07-2004, 03:26 PM
  4. I Found some nice sprites but need more...
    By BigCheese in forum C++ Programming
    Replies: 1
    Last Post: 03-23-2004, 06:03 PM
  5. Animating Multiple Sprites
    By Tommaso in forum Game Programming
    Replies: 2
    Last Post: 10-11-2002, 12:06 AM