You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of trying to tie velocity directly into the base IPS code, I want to house it in a separate module.
In a perfect world, the module would have the following features:
0.2 update speed
optional ability to store speed and velocity on memory chips
option to display speed on the same text panel as standard IPS
method of stabilizing the output to buffer against random coordinate spikes
But given line restrictions, not all of this may be possible. The speed calculation can only be compressed down so far. d=sqrt((:x-x)^2+(:y-y)^2+(:z-z)^2)/t is the smallest form I know of, which is 36 characters.
In addition, velocity involves direction and speed, which means we want the ability to store a vector and the speed itself. the vector in question is [:x-x, :y-y, :z-z], so if we want to store those values then there need to be 3 additional assignment statements. :u=:x-x :v=:y-y :w=:z-z d=sqrt(:u^2+:v^2+:w^2)/t ramps us up to 48 characters.
We also need to grab the current coordinates and save them for the next iteration, which is another round of assignments. :u=:x-x :v=:y-y :w=:z-z :d=sqrt(:u^2+:v^2+:w^2)/t x=:x y=:y z=:z brings us to 64 characters.
And then we have the problem of display. We only have 6 characters left and need a goto statement in there as well, so display is pretty much impossible on this line.
We could consider making base IPS handle display optionally, but the code is so tight there to begin with that we would end up sacrificing configurability for more displayed information.
TODO:
Consider the downsides of a 0.4 update time to allow for display and potentially stabilizing logic.
Brainstorm the idea of a Display Module for the IPS system that purely handles display of information.
Write up a properly minified version that does not store the velocity vector.
Write documentation that explains the reasoning behind separating velocity out into its own module.
The text was updated successfully, but these errors were encountered:
^ happens before divide, so we don't need parens. This brings us to 62 characters. + the goto puts us at :u=:x-x :v=:y-y :w=:z-z :d=(:u^2+:v^2+:w^2)^s/t x=:x y=:y z=:z goto# which is 68 characters.
Instead of trying to tie velocity directly into the base IPS code, I want to house it in a separate module.
In a perfect world, the module would have the following features:
But given line restrictions, not all of this may be possible. The speed calculation can only be compressed down so far.
d=sqrt((:x-x)^2+(:y-y)^2+(:z-z)^2)/t
is the smallest form I know of, which is 36 characters.In addition, velocity involves direction and speed, which means we want the ability to store a vector and the speed itself. the vector in question is
[:x-x, :y-y, :z-z]
, so if we want to store those values then there need to be 3 additional assignment statements.:u=:x-x :v=:y-y :w=:z-z d=sqrt(:u^2+:v^2+:w^2)/t
ramps us up to 48 characters.We also need to grab the current coordinates and save them for the next iteration, which is another round of assignments.
:u=:x-x :v=:y-y :w=:z-z :d=sqrt(:u^2+:v^2+:w^2)/t x=:x y=:y z=:z
brings us to 64 characters.And then we have the problem of display. We only have 6 characters left and need a
goto
statement in there as well, so display is pretty much impossible on this line.We could consider making base IPS handle display optionally, but the code is so tight there to begin with that we would end up sacrificing configurability for more displayed information.
TODO:
The text was updated successfully, but these errors were encountered: