A tech demo of sorts utilizing "Packed" sprites, which are called that due to all the data being packed into a list. Click the flag and move your mouse!
This project is VERY complex, so I'll try my best to explain what is going on in the code. 1 - Variables There is a resolution variable that defines the size of a pixel to draw, then a width and height variable defining the size of the sprite in pixels. If you want to make packed sprites, though you might want extra transparent pixels around the main sprite or vertex shaders (explained later) might act weird. So if the sprite is 8x8 pixels, it would be better to make it 16x16. Most other variables aren't meant to be changed, so don't mess with them The last variable is PS.Costumes, which is a list that defines separate costumes. If your sprite is 8x8 pixels, there should be 64 entries in the list per costume as 8*8 is 64. 2 - Custom blocks There are three custom blocks. "Draw costume" draws a costume at the current X and Y. It contains all the code necessary to build a costume from the costume list. "My Color Shader" takes color, brightness, saturation, etc. as inputs and affects the color of a pixel. It is meant to be changed to your liking to create cool effects. "My Vertex Shader" is more complex. It takes the X and Y of a pixel as input and outputs another X and Y. It MUST set the variables "ShadedX" and "ShadedY" in order for the packed sprite to work. With it you can create stretching, wobbling, or shaking effects. If you don't want an effect, simply set the values "ShaderX" and "ShaderY" to InX and InY respectively.