3D Network Space Game

Blitz3D Forums/Blitz3D Beginners Area/3D Network Space Game

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

1. Yes it is possible. You may have to have multiple sessions of the IDE running though if I remember correctly.

2. Simple way is as follows : store the ship's velocity for each component (ie velocityx,velocityy,velocityz), when thrust is applied multiply the unit vector pointing in the direction of the ship by a 'thrust value' (tformnormal 0,0,1,shipentity,0 to get the forwards vector of the ship in world coordinate space) and add this value to each of the velocityx/y/z values. You will likely also need to limit the ship to some maximum velocity otherwise it will reach a too high velocity.


if 'thrust applied' then 

tformnormal 0,0,1,shipentity,0
velocityx#=velocityx#+tformedx()*thrustamount#
velocityy#=velocityy#+tformedy()*thrustamount#
velocityz#=velocityz#+tformedz()*thrustamount#

if sqr(velocityx^2+velocityy^2+velocityz^2)>maxvelocity# then 
totalvelocity#=sqr(velocityx^2+velocityy^2+velocityz^2)
velocityx#=velocityx#*maxvelocity#/totalvelocity#
velocityy#=velocityy#*maxvelocity#/totalvelocity#
velocityz#=velocityz#*maxvelocity#/totalvelocity#


endif 

endif 

translateentity shipentity,velocityx,velocityy,velocityz