More of a general logical issue. With two different results branching out of a single condition, you need two additional checks.
if abs(value) > threshold:
if value < 0: #negative
Or, you could set a flag if you’d rather perform the evaluation later on:
isNegative = False;
if abs(value) > threshold: isNegative = value < 0;
I don’t think you can make it shorter.
Also, for movement one generally multiplies the axis value from the stick times speed.
move_vec = [speed_x * joy_axis_x, speed_y * joy_axis_y, jump || gravity]
But sometimes I keep a direction vector on top of the one I use for the movement calculation, when I want to trigger different animations for instance. It’s not really faster or slower, but I find it more readable to do something like
isNegative = [isNegative_x, isNegative_y] or
if isNegative.x || isNegative.y
Though that’s just personal taste to be honest. One might as well keep it as two separate variables. A single greater or less than check doesn’t sound like the biggest bottleneck to me.