a few questions

Blitz3D Forums/Blitz3D Beginners Area/a few questions

yours(Posted 2005) [#1]
Hi im new here and have a few questions:

In a 3d game, what should be the scale for objects? As in, should one unit equal, one foot, one inch, etc? Or, does it matter - I know in some other 3d engines I've tried, as you get farther away from the origin of a lever, calculations become less accurate.


What does the colon (:) do in code. I was looking at the driver example and came across this line:

;calculate car velocities
cx#=EntityX( car ):x_vel=cx-prev_x:prev_x=cx
cy#=EntityY( car ):y_vel=cy-prev_y:prev_y=cy
cz#=EntityZ( car ):z_vel=cz-prev_z:prev_z=cz

and was wondering what it's doing.


I hope thats clear.


Naughty Alien(Posted 2005) [#2]
..as I can see you defining X,Y,Z position of CAR entity in 3D space and assigning new recalculated possitions to it..now (:) sign representing first line of code what will be executed after previous one...in another words if you want to see your code without (:) sign, it will be like this

;calculate car velocities
cx#=EntityX( car )
x_vel=cx-prev_x
prev_x=cx

cy#=EntityY( car )
y_vel=cy-prev_y
prev_y=cy


cz#=EntityZ( car )
z_vel=cz-prev_z
prev_z=cz


jfk EO-11110(Posted 2005) [#3]
Hi. The : is a command delimiter. So you can write multiple commands on one line if you want.

I'd use 1 meter per Blitz Unit. Yes, you'll get some Z-Buffer inaccuracy if you're far away from the center of the scene. I think it starts somewhere at 32000 untits away from the center (or even earlier?). So one meter per unit would still work for big levels. You definitively cannot simulate an airplane that flies around a planet that has a radius of 12 million blitz units (like terra) unless you move the landscape towards the airplane frequently, so the airplane remeins inside a certain field near the center.


yours(Posted 2005) [#4]
This helps alot, thanks.