thank u vm for everyone that voted commented in my repls :)
in 150 i made 2d fire works
in 500!!i made 3d fire works
in 1000 ....???
move using ur mouse and enjoooy :)
The only difference I see is that the fireworks are going up about twice as fast and are technically defying gravity as their exploding and falling down way too fast and also where's the 3d ?!?
btw wat?
what do u mean by where is the 3d?
do u know what 3d is?
hello.
@JosephSanthosh
Click and move your mouse around @JosephSanthosh
Oh thanks! Usually 3d is moved on its own. @InvisibleOne
okaay i got it now!
i didn't wanna make it auto because of freedom and stuff
u know
@JosephSanthosh
What has freedom got to do with a game ?!?
lol idk
:)
@JosephSanthosh
haha -- good game though @potatojs
thanks :)
@JosephSanthosh
@JosephSanthosh that it's a game! If you only can watch it it's not a game, then it's a live browser-generated video!
live-browser generated video? @ironblockhd
awesome
GREAT!
@promike
in 150 i made 2d fire works
in 500!!i made 3d fire works
in 1000 ....???
I guess 4D: where you can feel the fireworks as well as see them, like 4D movies. Like you can research exaclty how fireworks feel/sound ;)
hello!
@python88
@potatojs how u doing
nice and fine and all tat stuff and u?
@python88
@potatojs same and all that stuff. and you mr.air?
@python88 i'm not mr.air fine and all how about u?
@potatojs i'm not 'you' and you mr.potato that will be eaten by me during dinner (my mom is cooking potato chips)?
@python88 oh i think it's the goodbye :(
@potatojs would you like some ketchup on you? ahem.. i mean would you like to have a tomato on your head?
@python88 yeah i like that waying of death DO IT
@python88 DO IT!!!
@potatojs do what
@python88 what? lol
@potatojs i mean, if you were in a hot air fryer that is 200 degrees f...
@potatojs igores the fast that they were talking about dieing...
@python88 oh no...
@python88 ?...?
@potatojs You have 550 cycles not 500
what lol
@python88
@potatojs i'm in class right now
@potatojs how r u not in class
@potatojs it's class time
@python88 what he 're still in the summer bruh
i still have 1 week booooy
@python88
@python88 nop it's the summer daah
@potatojs oh. for us we started a month ago
what? lol
@python88
@potatojs my teacher is saying: you need your science notebook. for your independent practice, you will use your science modulales
lol what's your grade?
@python88
@potatojs my teacher watch this video: https://safeshare.tv/x/ss5d6522004e2f0#
@potatojs my birth day is next week!
nice! are you going to make a project about that?
@python88
@potatojs i'll try.
@potatojs a question in class: how is water different from ice?
@potatojs me: bruh...
@potatojs r u there?
@potatojs where i live, it hasn't snowed for 5 years.:(
@python88 where i live,it never snowed :(
yes yes
@python88
@potatojs HERE IS THE BIRTHDAY ONE! https://repl.it/talk/share/if-today-is-your-birthday-click-on-this/51967
Cool. Did you use an engine or is this made from scratch?
Whoa interesting. Goes slow sometimes and then speeds up.( ̄︶ ̄*))
Anyways...
Congrats!🎉🎉
thank you!🎉
@PizzaisGood
@PizzaisGood I think it speeds up on click.
lol no i think i made some faster than oders
@johnnyfrancis
@johnnyfrancis This actually can occur with p5js. I'm not sure exactly why, but in many of my p5js projects this has happened so it would be reasonable to assume it might happen here.
i think it happens because of the frame rate?
when u put to many object show them update them specially in this project where litearally you can have hundreds of particules in the screen at the same time
@fuzzyastrocat
@potatojs Hmm, possibly. Though that wouldn't really explain a random increase of speed on-click. I think it's a p5js thing, not a sketch-specific thing.
nice.
thanks.
@Jakman
Dude, I had an idea, but its not 5d or 4d, its 1d. the first dimension is where everything is a line, so maybe you could make a raycast engine type of thing with fireworks?? idk just an idea
lol i though about that to :D
but.. i don't think i'm going back again...
it would be amazing if i did it in the first one :)
thanks for the suggestion
@dabombdgdzjr
This is some serious code
Magnificent!!
beautiful!!
wonderful!!
and let me guess, for 100 cycles, it is a more magnificent firework?
ayy good job
thanks :)
@ZDev1
yey!!!!!!!
yay!!!
@johndo3
yay!!!!!!
@potatojs
@potatojs Cool! However, the physics on this really irks me... give the fireworks velocity so that they don't just immediately start falling once they explode, then it will look more realistic :D
they have velocity :)
i can just make it...more
@fuzzyastrocat
@potatojs What I mean is that the velocity should carry over into the burst particles. Right now, the firework has velocity, but as soon as it explodes the velocity magically vanishes. In reality, the firework would explode and the particles would "get" all the velocity the firework had.
This would look really weird if it was implemented right now, because there's another problem I've just realized: there's no acceleration on the firework. It goes straight up without slowing down. So, here's the suggested fixes:
- Make it so that the firework slows down — that is, add a negative constant (like, say, 0.1, but tweak it to make it realistic) to the firework's velocity every frame. (this represents gravity)
- When the firework explodes (ie, in the "explode()" function), pass the firework's velocity as an additional parameter. Add that velocity to all the particles' velocities (
direction = p5.Vector.random3D().add(0, -firework_speed)
). - Make it so that the firework explodes only when it is almost stopped, such as
if(firework.speed < [some constant, try 3 or something]) explode(...);
instead of at a fixed time.
Hope that makes sense!
that sounds interesting i'm gonna try it now!
@fuzzyastrocat
@potatojs I just tried implementing it — these few simple changes make it look a lot more realistic!
@potatojs Hey, I see they slow down now. Awesome, they look more realistic!
thanks :)
@fuzzyastrocat
@potatojs No problem! However, I notice this is how you're slowing them down:
if(abs(pos-fireWorks[i].end)<=100){
fireWorks[i].speed*=0.9
}
Don't do that — gravity always exists, so it should always be slowing down :D
Instead, try these three things:
- Remove (don't set)
fireWorks[i].end
. Don't use an arbitrary ending point, a well-made physics system will find the end for you! (so on line 34, get rid offireWorks[i].end>=fireWorks[i].y
and only check for speed. And remove line 7 of fireWork.js). - Always slow down. So, remove lines 31 and 33.
- Slow down correctly. Instead of
fireWorks[i].speed *= 0.9
, dofireWorks[i].speed -= 0.1
. Gravity is linear on velocity — what you are doing now is representing some kind of friction, like air resistance. (But air resistance is so minimal it shouldn't slow them down that much and can therefore be forgotten :D)
Sorry to keep bugging you, I like this project so I want to help it get better :D
(One more note: looks like you pass the velocity to explode
, but you don't do anything with it. Try changing line 66 (or whatever line has let direction= blah blah
on it, I might have the wrong number) to let direction=p5.Vector.random3D().add(0, -vel)
.)
ok i'm gonna try those :D
lol i actually add the velocity to the direction but because the fire work velocity is just a change in the y axes so i just add the vel to the direction.y wich is easier because for some reason i didn't use vectors with the velocity of the fire work itself :D
thanks it's really nice to know that they actually liked this project (because i made it a while ago) lol
@fuzzyastrocat
@potatojs Great!
Ah ok, didn't see that. Yeah it's good to use vectors with everything just to make things consistent, but for a simple case like this that's probably fine.
No problem, I think it's pretty cool :D
thanks :)
@fuzzyastrocat
You got them skills, itz like the fourth of july
4d plosi wanna explode uwu
Time to make a 600 special now!!!
up to you. @potatojs
i'm in the middle of school so i'm :( @potatojs
lmao i have ONE complete week before school lol
@JosephSanthosh
nice 4 u. @potatojs
Nice!!
thanks :)
@LeviSikes
@potatojs ur welcome :>)
Noice
Coding is fun, but it kills me sometimes.
This is one of the things that would probably kill me.
@potatojs
wat? lol
@TheAverageAsian
Yeet. I'm buried under tons of code, which kills me everyday.
@potatojs
Whoops! I'm a little late. Still CONGRATS! :)
lol thanks :)
@DannyIsCoding
@potatojs also, how would 4d firework rockets work?
@DannyIsCoding idk but i'm gonna see :)
yaaaaaayyyyyyyyy btw you shold learn unity and c#!
it's in my plans :)
but i can't right now :(
@AdrianTkachenko
says "this plugin crashed"
this is Unfortunate :(
@HiPeople844
@potatojs now it works i think
Stunning! Great job @potatojs
THANK YOU! :)
@Wilke000
nice
wat? lol
@DavidLi17
@potatojs hoihuhhaheehihoiheheahahehuhhoihihumhumhunhuthuttathehutyaanhutgoescrazy!!!!!!!!!!!!!!!!!!!
potatoes don't eat ducks.
ducks don't eat potatoes.
we can be friends!!!!!!!!!!nom nom nom potato chips are delicous nom nom
@DavidLi17hoihuhhaheehihoiheheahahehuhhoihihumhumhunhuthuttathehutyaanhutgoescrazyhoihuhhaheehihoiheheahahehuhhoihihumhumhunhuthuttathehutyaanhutgoescrazy
ok.
@potatojs nom nom can i eat you nom nom wow you look delicously cool
@potatojs DavidLi17 just ate potatojs nom nom
@DavidLi17stupid duk potatoes like eating duks and not talking to stupid duks
@DavidLi17 oh noooooooooooooo...
@potatojs dude, there is actually a plant called the duck potato!!!!!!!!!!!!!
@potatojs potato:
duck:
@potatojs what grade are you in
@DavidLi17 what? lmao
this is really coolthis plant was born after a potato ate a duk
@DavidLi17 NOICE
i don't know how grades in the US education system work so let's say i'm 13 :)
@DavidLi17
@potatojs first of all, the plant was a potato that wanted to look like a duck so it can avoid being eaten by a duck, but all ducks were smart enough to know that it is still a potato, so they ate the"duck" potato. Are you doing geometry in math?
@potatojs hello 8th grader
oh nice
:)
@DavidLi17
i'm 8th grader
@DavidLi17
NOICE
THANKS
@viraatvv
This is horrible..........y awesome!!!
lol thanks!
@DJWang
can you make it shoot 3d squids?
lol wait a second
actually wait a day lol
@DynamicSquid
actually you're gonna wait a couple years
@DynamicSquid
me: hmmm, 4d fireworks???
other me: that's impossible!
me: welllll, technically...
me a few seconds later: Ok yeah, that is impossible
Me again a few seconds later: ... so...5d fireworks???
lmao
it's actually possible lol
@InvisibleOne
LOL @InvisibleOne
HOW 4/5D @potatojs
ask google :)
@ComputingSquid
real life fireworks @ComputingSquid
@InvisibleOne 4d Fireworks?
Probably a wrong idea.