Well, you're right that label will be recalculated every SP frame, but it will select one (very long) string instead of checking (and sometimes recalculating) hundreds of separate pixels. I don't really know if ternary with floats is equivalent to ternary with (very long) string at runtime, but either way i think there's more pixels than frames.
@DatMaluchGuy19
Try to add 22 closing parentheses in the end of p_tgt.next.z,p_tgt.next.x,p_tgt.links.z,p_tgt.links.x and 3 closing parentheses in the end of p_tgt.next
__D is dampener, __P is gain PCi=(lerp(TAlt,h,pow(TD/200,2))-FCAltitude+rate(lerp(TAlt,h,pow(TD/200,2))-FCAltitude)*__D)*__P
40 here is some distance after which missile surely can't damage airplane
Missile's pitch angle=smooth((abs(Longitude-FCLongitude)+abs(Latitude-FCLatitude))<40|(PCi!=PCi)?0:sign(PCi)*90,(PCi!=PCi)?0:abs(PCi))
Be carefull, SP forum might not display full expressions
So, does anybody have any pointers about getting started?
Tutorial section of forums and videos, and perhaps some geometry.
What am i looking for with my centers of mass, thrust, and lift?
Thruster must face towards center of mass (if you don't want to use it to rotate craft), so for forward-facing engines usually center of thrust is directly behind center of mass.
Center of lift is where wing's forces are applied, it moves while you fly.
Usually wing pulls airplane up, so in cruise CoL is near CoM, but such airplane won't decrease pitchrate naturally.
At high AoA both lift and drag are higher, so if CoL is in front of CoM it'll pull airplane's nose back and upwards, increasing AoA even further, which will eventually lead to stall or uncontrollable spin.
If CoL is behind CoM, it will pull tail away from direction of flight, so airplane will be pretty stable, but if CoL will be too far from CoM you won't be able to control it.
In real life getting center of lift is not that easy, so usually it's recommended to get center of mass around quarter-chord behind midpoint of leading edge.
How do i make a slick or at least cohesive fuselage? I see some incredible stuff on here and want to leave my own work on the table.
I can't really say much about it. Fuselage is 28-sided (circular ones are 24-sided), in newer versions you can "slice" specific part from it with four planes. Greater ones are using hollow fuselages as plating (e.g. screenshot from this post), but it will require either a lot of time or geometry knowledge and calculator to align them properly.
Also, what the heck do upvotes do? And do i spend points to give them?
They do nothing but they're used in rating, both for crafts and users. You don't need anything to give one.
smooth(sign((input-current)+rate(input-current)*D),
P*abs((input-current)+rate(input-current)*D))
SP forum doesn't displays full line, so it's split with linefeed.
It's a form of PID, P is gain, D is dampener
It's always clamped between -1 and 1, and will perhaps be 1 at the level start.
It's generally not proportional to input and it's not suitable for rockets|TVC, but it works fine with control surfaces.
For high-speed airplanes, don't forget that airplane's behaviour changes with airspeed.
@Skykid028 I do not have android device.
About colors, i got one more similar message recently and i noticed that result from different user is slightly different, but at the moment i don't know why is it different and how to fix it.
For your specific case i can suggest to increase number of bits per color if possible, although i doubt it is the problem.
min(90,max(10+atan(TAS/(2*pi*PROP_RADIUS*0.5*PROP_RPM*60)),0))/90 will perhaps work
PROP_RADIUS is in meters, not blocks.
So, you calculate velocity at the middle of blade, add velocity of airplane relative to air, calculate angle between result and propeller plane, and add 10 degrees.
You can use control bases to make specific parts bend in specific places, and i bet actual soft-body part will lag five times more than entire build without it.
You don't really need to make airplane unstable to make it maneuverable.
High AoA won't increase maximum GForce (in general situation with dumb AI it will rather decrease it) and won't help you to evade gunfire, it can only help you to point your guns faster (to some extent, and with aerodynamic control only it will rather be dash than continuous increase in turnrate) at the cost of speed (which is life) and glide ratio (which is what wing built for).
So if you need to increase GForce i recommend to increase wing area and then move CoM so that angle of attack during turn will be just a bit below stall (13deg for symmetric wing, 16deg for semi-symmetric, 28deg for flat-bottom).
F22 is forever? Doesn't wastes savings? Perhaps you don't know how hard is fighter jet maintenance, but hey, you must at least remember that F22's "cosmetics" is tons of stealth coating?
@Kendog84
1) There's /10 in the middle of first AP_h_ac variable setter, it's proportion between altitude difference and flight path angle. Replace 10 with higher value toget lower vertical velocity.
2) It's what i wrote before, <10 in the end of activator of wpSystem_ctgt_id. You can use DebugExpression sqrt(pow(wpSystem_d_x,2)+pow(wpSystem_d_y,2)+pow(wpSystem_d_z,2)) in dev console to get current distance to waypoint.
AI "piloted" plane and player "piloted" one take different routes (at least initially) for some reason, even if I spawn them at the same location.
I know about it. wpSystem_ctgt_id variable setter must be zero if Time is less than 0.1s, but Time is global so it only works for player's airplane, and those who was spawned later will perhaps start from 1 or 2 (i.e. second or third point). Try to replace Time with sum(1) in wpSystem_ctgt_id and it's activator.
You're more likely to successfully pass the waypoint if you only change one type of coords with every ID.
IDK why it works such way. It only uses coords to get angle to waypoint, and then uses that angle to turn.
Related to above, if the plane has to turn a lot to reach the next WP, you should make it travel a long distance (so the plane can turn gradually). Again, less likely to miss WP this way.
Not a surprise. Airplane needs time (and thus distance) to turn, and if AP doesn't makes airplane fly chaotically it will become more and more accurate (to some limit) until a change in heading or altitude occurs.
@Olliebowen replace AP_out_ail,AP_out_ele,AP_out_rudder,AP_out_throttle variables setters with inputs you need.
Or replace AP_in_head variable setter with sum(Roll)*20 and AP_in_alt with smooth(Altitude,Time<.1)+sum(Pitch*20) if you wish to keep arcade controls.
An example is auto-rotating heli, it gets energy from airflow and uses it to produce thrust. Perhaps your craft works same way, but thrust in this case is more than drag.
@Kendog84 Setting target to your current position seems like an odd idea.
A slider is limited, it may work for default map but it won't work for other maps, and it's accuracy depends on it's range.
A keyboard maybe?
For preset coords i can make a selector or menu.
@DenizLion You can't use state of real hardware and you can't change user's inputs with FT. max(0,rate(Throttle)) or rate(Throttle)?1:0 will work while Throttle's rising. Throttle=1?1:0 will work if Throttle's 100%
Activate1?input-if-active:input-if-inactive
Angle of rotator is it's input multiplied by it's range. WNP's post Snow's guide in case you can't understand WNP's post
Here it is. I don't really know how it'll work, but it's actually coded.
@PlaneFlightX
@rexzion (perhaps you noticed already)
Kendog, you will know about this comment without mention since it's your post...
Here. Some white parts were cropped so you need to use white background.
"fun" fact: it uses ~7.28 symbols per pixel. Andrew image used 16 symbols per pixel so tech's better than it was, but PNG files can use less than one byte per pixel...
̶2̶4 28 Sides of fuselage... Building with calculator and notepad... But it works correctly, right?
What doesn't works correctly is slicing of hollow fuselages and a lot of underlines in combination with full stops.
I'm not sure if it's just for me and how exactly it works, so i can't send bug report at the moment, but it's a post for complaining, right?
@ollielebananiaCFSP I agree that it's results are still too laggy and too large, but you're comparing wrong app.
With fuselage you can get a lot of different shapes and your brain can understand what's edge and what's plane, but this app can only work with what a label can display and uses array of pixels.
But i have different function: it takes two python functions as edges and fills area between them with solid color using underlines. I didn't noticed any fps decrease in level using three 1560-line cats made with that function and i could edit them in designer with minor lags. I think it's the result for you to compare.
@WNP78
I will try it if i will find suitable squares.
For now i found out that it will only be effective if large square is 17 or more pixels wide, and both full stop and unicode square aren't suitable because full stop is round-ish and square isn't actually square. image
Little update since i saw spiderman avatar mod for it: it's unity and i don't understand how it stores 3d model, so i can't do anything with it.
I wish good luck for others.
@FlyingPatriot #comment-4113027
1. use markdown! [text](address)this one should work
2. your link is not readable because of stars or underscores (markdown)
3. don't use redirects, it sucks to get to four different domains just because you need one japanese site.
Some recommendations: <#RRGGBBAA> and <#RGBA> works too, so it isn't necessary to write "color";
sort of run-length encoding will significantly decrease performance cost (especially if you will ignore some of least significant bits);
you don't need to write pixels with zero alpha, you can use whitespace or <space=Xem> tag instead (i'm using tag if there's more than 15 transparent pixels and whitespaces otherwise, but it's just because of length and i don't really know how it affects performance);
if you're using left alignment you can throw away transparent pixels in front of linefeed.
Don't you think last line of description makes challenge nonsensical?
You will literally need to call most of humans who can do it to get five of them here, and even so, five months feels like a bit too little time to do it (but it may be just lazy me).
For designer, it's mostly fine (because i don't really use it's menus), but two changes i'd like to see is possibility to use Tab/Shift+Tab and spacebar to choose and control input fields/buttons/checkboxes and possibility to switch off screen updates as long as nothing changed. In my opinion it's just stupid to load 80% of GPU while anything stays same.
@WormWithLegs
... or replace RotationAxis tag in xml with PositionAxis.
it's properties here are <positionaxis axis="0,1,0" input="Trim" scale="0.2" min="-0.45" max="1.5">/positionaxis>
(nvm all-lowercase letters, it's broken by browser html parser)
axis is a vector (it may not be normalized), it's offset of moving end in meters when input is 1/scale.
Gun firing and recoil animation was not synchronized for me for some reason.
I did not expect such good and highly-appreciated build to be drone with fixed animation.
Not sure if i can call it revolutionary.
Her legs are beautiful though.
I just understood why code must have comments.
What's the difference between chasing and following?
Is there significant reasons why you use RateH >= -0.05 & RateH <= 0.05 instead of abs(RateH) <= 0.05 ?
What's the difference betwween TrueH and Heading?
Was it originallly writen in FT or was it copied from other program?
Well, you're right that label will be recalculated every SP frame, but it will select one (very long) string instead of checking (and sometimes recalculating) hundreds of separate pixels. I don't really know if ternary with floats is equivalent to ternary with (very long) string at runtime, but either way i think there's more pixels than frames.
+1source?
+1I mean, i didn't saw her with cat ears, and style seems wrong (although maybe it's because of low resolution).
@DatMaluchGuy19
+1Try to add 22 closing parentheses in the end of
p_tgt.next.z
,p_tgt.next.x
,p_tgt.links.z
,p_tgt.links.x
and 3 closing parentheses in the end ofp_tgt.next
@DatMaluchGuy19 Yes, you can.
+1FCLongitude
,FCAltitude
,FCLatitude
are coords of missileTD=sqrt( pow(Longitude-FCLongitude+TargetDistance*cos(TargetElevation)*sin(TargetHeading),2) + pow(Latitude-FCLatitude+TargetDistance*cos(TargetElevation)*cos(TargetHeading),2) )
TAlt
=Altitude+TargetDistance*sin(TargetElevation)
h
=5+195*(.5+.5*cos(clamp(0.1*TD+20,0,340)))+1800*(.5+.5*cos(clamp(.01*(TD-45000),0,180)))
__D
is dampener,__P
is gainPCi
=(lerp(TAlt,h,pow(TD/200,2))-FCAltitude+rate(lerp(TAlt,h,pow(TD/200,2))-FCAltitude)*__D)*__P
40
here is some distance after which missile surely can't damage airplaneMissile's pitch angle=
smooth((abs(Longitude-FCLongitude)+abs(Latitude-FCLatitude))<40|(PCi!=PCi)?0:sign(PCi)*90,(PCi!=PCi)?0:abs(PCi))
Be carefull, SP forum might not display full expressions
+1Tutorial section of forums and videos, and perhaps some geometry.
Thruster must face towards center of mass (if you don't want to use it to rotate craft), so for forward-facing engines usually center of thrust is directly behind center of mass.
Center of lift is where wing's forces are applied, it moves while you fly.
Usually wing pulls airplane up, so in cruise CoL is near CoM, but such airplane won't decrease pitchrate naturally.
At high AoA both lift and drag are higher, so if CoL is in front of CoM it'll pull airplane's nose back and upwards, increasing AoA even further, which will eventually lead to stall or uncontrollable spin.
If CoL is behind CoM, it will pull tail away from direction of flight, so airplane will be pretty stable, but if CoL will be too far from CoM you won't be able to control it.
In real life getting center of lift is not that easy, so usually it's recommended to get center of mass around quarter-chord behind midpoint of leading edge.
I can't really say much about it. Fuselage is 28-sided (circular ones are 24-sided), in newer versions you can "slice" specific part from it with four planes. Greater ones are using hollow fuselages as plating (e.g. screenshot from this post), but it will require either a lot of time or geometry knowledge and calculator to align them properly.
They do nothing but they're used in rating, both for crafts and users. You don't need anything to give one.
+1Well, it sucks.
Knowing two of three inputs and HMAC, can we try to guess hash function and key they're using?
+1
+1smooth(sign((input-current)+rate(input-current)*D),
P*abs((input-current)+rate(input-current)*D))
SP forum doesn't displays full line, so it's split with linefeed.
It's a form of PID,
P
is gain,D
is dampenerIt's always clamped between -1 and 1, and will perhaps be 1 at the level start.
It's generally not proportional to input and it's not suitable for rockets|TVC, but it works fine with control surfaces.
For high-speed airplanes, don't forget that airplane's behaviour changes with airspeed.
@Skykid028 I do not have android device.
+1About colors, i got one more similar message recently and i noticed that result from different user is slightly different, but at the moment i don't know why is it different and how to fix it.
For your specific case i can suggest to increase number of bits per color if possible, although i doubt it is the problem.
Epic fail.
+1Try to ask in FTLab, they had a channel for pre-made codes.
@piglincheerful To clarify, are you a bot?
+1What's up with that link you attached to the end of your comment?
There's always a way to ruin tech, but can you make the tech better?
+1Autocorrect preferring collar over collab? Hey, that's pretty interesting!
+1How did you even teach it?
+1min(90,max(10+atan(TAS/(2*pi*PROP_RADIUS*0.5*PROP_RPM*60)),0))/90
will perhaps workPROP_RADIUS is in meters, not blocks.
So, you calculate velocity at the middle of blade, add velocity of airplane relative to air, calculate angle between result and propeller plane, and add 10 degrees.
You can try to use button with interactionType=Toggle and some activation group for actual weapons.
+1You can use control bases to make specific parts bend in specific places, and i bet actual soft-body part will lag five times more than entire build without it.
+1@TheFlightGuySP AFAIK bending wings and rotators is a bug of game engine, not feature of a game.
+1You don't really need to make airplane unstable to make it maneuverable.
+1High AoA won't increase maximum GForce (in general situation with dumb AI it will rather decrease it) and won't help you to evade gunfire, it can only help you to point your guns faster (to some extent, and with aerodynamic control only it will rather be dash than continuous increase in turnrate) at the cost of speed (which is life) and glide ratio (which is what wing built for).
So if you need to increase GForce i recommend to increase wing area and then move CoM so that angle of attack during turn will be just a bit below stall (13deg for symmetric wing, 16deg for semi-symmetric, 28deg for flat-bottom).
R.I.P.
+1F22 is forever? Doesn't wastes savings? Perhaps you don't know how hard is fighter jet maintenance, but hey, you must at least remember that F22's "cosmetics" is tons of stealth coating?
+1I think she needs a 10-15m-long drone.
+1@DatRoadTrainGuy19 311x15=4665 performance cost, but with 15 AI scripts, 15 variable sets etc..
+1@HololiveFan2009 There's a site and plane634 said already about apps.
+1@PlanariaLab add cockpit coords and subtract missile coords before transformation? Still looks like a work for search-and-replace tool tbh.
+1@Kendog84
1) There's
/10
in the middle of firstAP_h_ac
variable setter, it's proportion between altitude difference and flight path angle. Replace 10 with higher value toget lower vertical velocity.2) It's what i wrote before, <10 in the end of activator of
wpSystem_ctgt_id
. You can useDebugExpression sqrt(pow(wpSystem_d_x,2)+pow(wpSystem_d_y,2)+pow(wpSystem_d_z,2))
in dev console to get current distance to waypoint.I know about it.
wpSystem_ctgt_id
variable setter must be zero if Time is less than 0.1s, but Time is global so it only works for player's airplane, and those who was spawned later will perhaps start from 1 or 2 (i.e. second or third point). Try to replace Time withsum(1)
inwpSystem_ctgt_id
and it's activator.IDK why it works such way. It only uses coords to get angle to waypoint, and then uses that angle to turn.
Not a surprise. Airplane needs time (and thus distance) to turn, and if AP doesn't makes airplane fly chaotically it will become more and more accurate (to some limit) until a change in heading or altitude occurs.
+1@Olliebowen replace
+1AP_out_ail
,AP_out_ele
,AP_out_rudder
,AP_out_throttle
variables setters with inputs you need.Or replace
AP_in_head
variable setter withsum(Roll)*20
andAP_in_alt
withsmooth(Altitude,Time<.1)+sum(Pitch*20)
if you wish to keep arcade controls.My entry. FT-only, truck itself isn't my build.
+1@Kendog84
+1It's in the end of activator of
wpSystem_ctgt_id
An example is auto-rotating heli, it gets energy from airflow and uses it to produce thrust. Perhaps your craft works same way, but thrust in this case is more than drag.
+1@Kendog84 Setting target to your current position seems like an odd idea.
+1A slider is limited, it may work for default map but it won't work for other maps, and it's accuracy depends on it's range.
A keyboard maybe?
For preset coords i can make a selector or menu.
@DenizLion You can't use state of real hardware and you can't change user's inputs with FT.
+1max(0,rate(Throttle))
orrate(Throttle)?1:0
will work while Throttle's rising.Throttle=1?1:0
will work if Throttle's 100%
+1Activate1?input-if-active:input-if-inactive
Angle of rotator is it's input multiplied by it's range.
WNP's post
Snow's guide in case you can't understand WNP's post
Is it (the code) your own development?
+1Here it is. I don't really know how it'll work, but it's actually coded.
+1@PlaneFlightX
@rexzion (perhaps you noticed already)
Kendog, you will know about this comment without mention since it's your post...
Here. Some white parts were cropped so you need to use white background.
+1"fun" fact: it uses ~7.28 symbols per pixel. Andrew image used 16 symbols per pixel so tech's better than it was, but PNG files can use less than one byte per pixel...
swedish flag
+1red bull logo with text
red bull logo without text
spotify
Use Military font if you see thick white stripes between pixels.
̶2̶4 28 Sides of fuselage... Building with calculator and notepad... But it works correctly, right?
+1What doesn't works correctly is slicing of hollow fuselages and a lot of underlines in combination with full stops.
I'm not sure if it's just for me and how exactly it works, so i can't send bug report at the moment, but it's a post for complaining, right?
@ollielebananiaCFSP I agree that it's results are still too laggy and too large, but you're comparing wrong app.
+1With fuselage you can get a lot of different shapes and your brain can understand what's edge and what's plane, but this app can only work with what a label can display and uses array of pixels.
But i have different function: it takes two python functions as edges and fills area between them with solid color using underlines. I didn't noticed any fps decrease in level using three 1560-line cats made with that function and i could edit them in designer with minor lags. I think it's the result for you to compare.
@WNP78
+1I will try it if i will find suitable squares.
For now i found out that it will only be effective if large square is 17 or more pixels wide, and both full stop and unicode square aren't suitable because full stop is round-ish and square isn't actually square.
image
Little update since i saw spiderman avatar mod for it: it's unity and i don't understand how it stores 3d model, so i can't do anything with it.
+1I wish good luck for others.
@FlyingPatriot #comment-4113027
+11. use markdown!
[text](address)
this one should work2. your link is not readable because of stars or underscores (markdown)
3. don't use redirects, it sucks to get to four different domains just because you need one japanese site.
@ReinMcDeer
+1targetingStyle
(ContinuousLock
orStandardLock
, though i'm still not sure if it can be changed)It's a shame you can't make it work.
+1Some recommendations: <#RRGGBBAA> and <#RGBA> works too, so it isn't necessary to write "color";
+1sort of run-length encoding will significantly decrease performance cost (especially if you will ignore some of least significant bits);
you don't need to write pixels with zero alpha, you can use whitespace or <space=Xem> tag instead (i'm using tag if there's more than 15 transparent pixels and whitespaces otherwise, but it's just because of length and i don't really know how it affects performance);
if you're using left alignment you can throw away transparent pixels in front of linefeed.
Don't you think last line of description makes challenge nonsensical?
+1You will literally need to call most of humans who can do it to get five of them here, and even so, five months feels like a bit too little time to do it (but it may be just lazy me).
/reminder for myself to be a bit less lazy
+1For designer, it's mostly fine (because i don't really use it's menus), but two changes i'd like to see is possibility to use Tab/Shift+Tab and spacebar to choose and control input fields/buttons/checkboxes and possibility to switch off screen updates as long as nothing changed. In my opinion it's just stupid to load 80% of GPU while anything stays same.
+1@WormWithLegs
+1... or replace RotationAxis tag in xml with PositionAxis.
it's properties here are
<positionaxis axis="0,1,0" input="Trim" scale="0.2" min="-0.45" max="1.5">/positionaxis>
(nvm all-lowercase letters, it's broken by browser html parser)
axis is a vector (it may not be normalized), it's offset of moving end in meters when input is 1/scale.
Gun firing and recoil animation was not synchronized for me for some reason.
+1I did not expect such good and highly-appreciated build to be drone with fixed animation.
Not sure if i can call it revolutionary.
Her legs are beautiful though.
I just understood why code must have comments.
+1What's the difference between chasing and following?
Is there significant reasons why you use
RateH >= -0.05 & RateH <= 0.05
instead ofabs(RateH) <= 0.05
?What's the difference betwween TrueH and Heading?
Was it originallly writen in FT or was it copied from other program?