Results 1 to 7 of 7

Thread: Elevation

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962

    Elevation

    I have some images, and I want to be able to fake a 3d world using them. Basicly, I want the image to change in size depending on the elevation of the image. I don't mind using Direct X, otherwise I will be using bitblt and the simlar resizing APIs.
    Involved in: Sentience

  2. #2
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Well to resize things you could just use StretchBlt()
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    I know, but How would I do the math?
    Involved in: Sentience

  4. #4
    jim mcnamara
    Guest
    Define your vanishing point (the horizon). Let's say it's 500
    (whatever units of distance) Nothing beyond 500 can be seen.

    Size is linearly proportional to distance. so in this example,
    something 100 units away is 80% of it's original size.

    Assume vanishingPoint = 500 or any number you want.

    Code:
    Function spriteSize(SpriteHeight as Single, Distance as single) as Single
      spriteSize = 0
      if Distance < VanishingPoint then
             spriteSize = SpriteHeight *(( VansihingPoint - Distance) /Distance )
      end if

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    Thanks. Any ideas where to get pictures for games?
    Involved in: Sentience

  6. #6
    PowerPoster MidgetsBro's Avatar
    Join Date
    Oct 2000
    Location
    Apparently, Internet.com
    Posts
    3,125
    Originally posted by Gaming_World
    Thanks. Any ideas where to get pictures for games?
    Make your own! Then the game is genuinely yours.
    <removed by admin>

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Oct 2000
    Location
    Oregon
    Posts
    962
    I would, except that I suck at art.
    Involved in: Sentience

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width