How many pixels will translate to 1 km?

Blitz3D Forums/Blitz3D Beginners Area/How many pixels will translate to 1 km?

po(Posted 2003) [#1]
Does anyone remember the old dos game: Gorilla? There were 2 gorillas on top of randomly generated sky scrapers, and you had to throw banannas at one another to win. You had to type in the angle and speed to throw the bananna.
The speed works in killo-metres(KM), not pixels.
So if you type in the speed as 50, it will go slower then if it were pixels.
angle = 30
speed = 50
	
;vspeed=speed*sin(angle)
vspeed#=0
hspeed#=speed*Cos(angle) 


That's what I got so far.

-Thanks


MSW(Posted 2003) [#2]
You will just have to decide how many pixels will make up a kilometer then calculate a scaleing factor...

example:

5 pixels per meter


pixels_per_meter# = 5

scale_factor# = pixels_per_meter# / 1000 




then to calculate Vspeed and Hspeed:


Vspeed# = (speed * scale_factor#) * SIN(angle)
Hspeed# = (speed * scale_factor#) * COS(angle)




Rob(Posted 2003) [#3]
Just make them naked then the distance will be a lot less, particularly if they are ford mountain gorillas.


Zo Zo Zee Zar(Posted 2003) [#4]
Why can't the naked ford gorillas be friendly anyway? Why must they hurt each other when they can just be lovers.


Rob(Posted 2003) [#5]
Sweet lovers, peeling each others bannanas tenderly and with care. Like husband ape and wife ape. Perhaps they can make a nest on the same tower?


darklordz(Posted 2003) [#6]
no no now the two towers don't make sence...


po(Posted 2003) [#7]
A little bit off topic....


eBusiness(Posted 2003) [#8]
Whatever, just try with random factors until it fits your expectations. And by the way, how to make explosive bananas?


ford escort(Posted 2003) [#9]
dist=3000 ;m distance beetween the 2 apes (3km)
ape1x=10 ;x pixel coordinate of ape1
ape2x=60 ;x pixel coordinate of ape2
distpix=abs(ape1x-ape2x); distance in pixel beetween the 2 apes
pixfactor=(dist/distpix); distance of 1 pixel in meters