env_sprite equal to
image? Would using
image instead cause any differences like FPS drops or something like that?
General
Does Env_Sprite Equal to Image Function?
Does Env_Sprite Equal to Image Function?
1

env_sprite equal to
image? Would using
image instead cause any differences like FPS drops or something like that?
env_sprite is created once when loading the map.
image is created on the fly while the game is running. It also causes network traffic because it's not a static image which is saved in the map file but a dynamically created one. So all clients need to be notified about the image.
image the image itself (the actual pixel data) is loaded at runtime (only once, the first time that image is being used) which can cause a small FPS drop or even a bigger one for large images.
env_sprite is better. Can't cause FPS drops at runtime and doesn't cause additional network traffic.
Best Practice
use
env_sprite when the image is part of the map. Especially for static images.
use
image for dynamic images / script controlled images
using a ton of
trigger_delay and
env_sprite to fake animations works but is not the most efficient solution. If you want top performance use a single
image and a fancy tween like
tween_move instead!
env_image and
env_sprite are also basically equal performance-wise.
env_image is just an older variant of
env_sprite with less features. It's only still in the game for backward compatibility.
1
