Log In  

the original sparkler

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


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
4

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)

P#142028 2024-02-27 05:07 ( Edited 2024-02-28 02:19)

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.

P#142029 2024-02-27 05:46 ( Edited 2024-02-27 05:47)

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

P#142034 2024-02-27 06:13

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

P#142035 2024-02-27 06:20

@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

P#142059 2024-02-27 14:51

@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
P#142068 2024-02-27 19:33

@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

P#142096 2024-02-28 01:48

[Please log in to post a comment]