|
-
Oct 25th, 2001, 11:41 PM
#1
Thread Starter
Fanatic Member
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.
-
Oct 26th, 2001, 03:14 AM
#2
Retired VBF Adm1nistrator
Well to resize things you could just use StretchBlt()
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Oct 26th, 2001, 03:37 PM
#3
Thread Starter
Fanatic Member
I know, but How would I do the math?
-
Oct 26th, 2001, 04:37 PM
#4
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
-
Oct 26th, 2001, 05:55 PM
#5
Thread Starter
Fanatic Member
Thanks. Any ideas where to get pictures for games?
-
Oct 26th, 2001, 10:55 PM
#6
PowerPoster
Originally posted by Gaming_World
Thanks. Any ideas where to get pictures for games?
Make your own! Then the game is genuinely yours.
-
Oct 27th, 2001, 12:57 AM
#7
Thread Starter
Fanatic Member
I would, except that I suck at art.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|