nudge_image(3)

πŸ“¦
version 0.7.1 Β· 2 versions
, in nixos 26.05

πŸ’… nudge_image(3) β€” the Arcan Lua API, but make it make sense ✨

okay so bestie, welcome to nudge_image, a little cutie from the image manual family. she's a Lua API function and she's here to shuffle your object around the screen. let's get into it πŸŽ€


✨ NAME ✨

nudge_image β€” sets brand-new coordinates for the object you point at, based on wherever it's currently sitting. it's giving "small adjustment, big main character energy" πŸ’«


🌸 SYNOPSIS 🌸

nil
nudge_image( vid, newx, newy, time, interp )

note that she returns nil, bestie. no sneaky return values, no cap.


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so this is a convenience function, and honestly? iconic of her. under the hood it ultimately resolves to a move_image call internally β€” that's the whole trick 🫢

the difference (and this is the slay part) is that the current image properties get resolved without a full resolve-call, which means you skip all the overhead that a full resolve would drag along with it. lowkey efficient, highkey cute πŸ’…


πŸ’œ NOTES πŸ’œ

  1. the properties are resolved at invocation time β€” which means chaining transformations the way you would with multiple move calls will not have the same effect, because each new position ends up relative to the current one rather than the one at the end of the transformation. so like... don't expect it to behave like stacked moves, fr fr 😭 interp can be set to one of the constants: INTERP_LINEAR, INTERP_SMOOTHSTEP, INTERP_SINE, INTERP_EXPIN, INTERP_EXPOUT, INTERP_EXPINOUT. pick your vibe, bestie ✨

πŸ”₯ EXAMPLE πŸ”₯

function nudge_image0()
      a = fill_surface(32, 32, 255, 0, 0);
      show_image(a);
      move_image(a, VRESW, VRESH);
      nudge_image(a, 10, -10, 100);
end

look at her go πŸ₯Ή makes a surface, shows it, yeets it to VRESW/VRESH, then gives it a lil nudge.


πŸ’€ MISUSE πŸ’€

these are the "not me doing this" moments. please don't πŸ™ˆ

function nudge_image0()
      a = fill_surface(32, 32, 255, 0, 0);
      nudge_image(BADID, 0, 0, 100);
end

BADID is literally right there in the name, bestie. that's a no πŸ’€

function nudge_image1()
      a = fill_surface(32, 32, 255, 0, 0);
      nudge_image(a, 0, 0, -100);
end

negative time? in this economy? also a no 😭


🧚 SEE ALSO 🧚

  • move_image(3) β€” her more dramatic sibling, go say hi 🫢

and that's the whole page, bestie πŸ’– this one's from the image manual, dated October 2026 β€” so like, future-era knowledge, periodt πŸ‘‘β­

πŸ“¦ where this page comes from