Log In  


the original sparkler

Cart #sparkler-0 | 2024-02-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5


thanks to @Ummmm_ok ,we have another version which have a smoother line
Cart #sparkler_alt-1 | 2024-02-28 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
5

Description

A tiny sparkler simulator, a game or a tool, or whatever you think.
Hope you enjoy:)

Controls

C or mouse left to fire
X or mouse right to take a new one
F9 whenever you want to save a gif of last 8 seconds(only for downloaded version)

5


i really love this! if you wanted smoother lines you could

line(l.x, l.y, next_l.x, next_l.y)

and it will pick up where it left off.


that's brilliant! how can i get the next element in the for loop? i looked up the Next() function but it needs the key of L and i don't know how to get it QAQ


and i'm not sure which effect of these two lines is better, the previos one is like it's fading and your line is more gorgeous, i think i will update both version when i make the effect like what you did


@Ummmm_ok i'm not familiar with this forum,not sure if i should "@" you to reply or just submit below then you can get my reply? but i'm curios about how to get the next element in a table that has no key and had been searching for it for a while after your feedback(cry


@iscream208 im not sure of the best way to do it but i just did

for i = 1, #table do
    local L = table[i]
    local next_L = table[i + 1]
end

@Ummmm_ok i see! never thought of use the for loop to note the index lmao. thanks a lot for the suggestion!! i'll upload the smoother one later



[Please log in to post a comment]