Its simple. Its cheap. Hopefully it is enough to inspire you to dig up your explosion code and post it here. It's $10 sent via payapl to the best explosion code out there.
I have always been fascinated by explosions. I almost took a job in Amarillo Texas just so I could build hydrogen bombs, the biggest man made explosions I know of. Thankfully my altruistic self won out and I decided it would be better for humanity if I used my skills to produce power to bless the lives of others, rather than destroy them.
The competition will run through July 7th. With the winner announced by July 14th.
The criteria is as follows:
- Attitude. How do you treat others? Are you nice and helpful (10 pts) or a troll, arrogant, and unhelpful (0 pts).
- Code Sharing. Is it able to be used and modified without restriction (10 pts), displayed so that others can see, but all rights retained (5 pts), or not shared at all (0 pts).
- Usability. Is it simple to implement and use in code (10 pts), or does it take a nuclear science degree to figure out how to set it up to use in code (0 pts)?
- Readibiltiy. Is the code simple to read with lots of comments (10 pts)? Or does it require prophetic skills to interpret and decipher the technique used (0 pts)?
- Awesomeness. Does it make you go, "Wow, I wish I was able to code stuff like that?" (up to 10 pts).
- Frames per second. Can it run at a full 60 fps (up to 10 pts)? Or does it lag out with stuttery frames on older iPads?
- Judging slush fund. 10 points that the judge (currently only me) or judges (if someone would like to volunteer to help make it more fair, please do so), that the judge can use any way he/she sees fit. If you are a judge you will be not be allowed to receive the $10. Feel free to participate, you can still win, but realize the $10 will go to the person with the most points who is not a judge.
Hopefully that covers everything. It's meant to be fun, enjoyable, and help facilitate learning about how to make explosions in games.
Please post all entries, comments, and code in this thread.
To be considered for judging you must include somewhere in your entry post the following word spelled backwards, "aibohphobia". Thus the judges can do a search and gather all the entries and look at them one by one.
Comments
Hi there! Are you looking for a visual/partical animation, physics effect, or both?
I am looking for whatever you would enjoy coding the most. It is meant to be an enjoyable, leisurely, competition. Feel free to do multiple explosions.
I'm working on my own explosion entry, and I'll have done it a little bit.
(In case if you wondered how many people would enter)
I have started my entry. It works! But the way I set up initial angles/velocity of particles made it so that if I use enough particles, the explosion is a square shape xD Going to restructure those calculations so it will be more circular, and more random.
@skythecoder and @riverforge, great work. Keep it up. Take your time, there is plenty of it left
Can I share my source for a critique and for advice before submitting it?
@riverforge absolutely. The judging won't start until after July 7th.
Okay, so it's definitely sloppy/disorganized. I was really just trying to figure out what approach to take, and I've modified a lot of it. That being said, I set it up to make totally custom explosions based on the parameters. So you should be able to paste in just this main and then tweak the parameters while running it.
Here's how they work:
gN --> the number of rectangles drawn in the explosion
gT --> This adjusts the speed of the explosion and the time before the
rectangles start to fall (gravity) and the rate at which the alpha level changes. Larger numbers = slow motion
gR_min --> the minimum random number for speed/angle
gR_max --> the maximum random number for speed/angle
gDone --> 0 means the animation is occurring. Do not adjust the parameter gN unless gDone = 1 ----important note: drag gDone back to 0 to start the new explosion----
Some of the explosions look good, some look bad. Play with the parameters and tell me what you think
It's very pixel-like. I made it this way because I'm using spritely in my projects so a square based explosion works well with it.
Here is my entry so far: aibohphobia
Updated again, and again,and again... And again!
Try playing around with the parameters
Particles now can bounce of the edges
aibohphobia
My entry shouldn't win cos it's just a tweak of an old particle effect shader I did yonks ago.
Run it and touch the screen. Can stutter with a lot of simultaneous touches, but smooth if touched gently.
@spacemonkey That's a lot of conditionals! I wonder if it couldn't be improved with a little mathematics ...
@Andrew_Stacey possibly, the conditionals are mostly types of tweening which I took almost verbatim from the tweening lua that I believe Codea uses. And all the If's are pulling out bit's from the parameters to see which modes you want the particle to run in. It's good old fashioned generic, poor performing code ;-)
aibohphobia
Here's another one. It's based on http://www.clicktorelease.com/blog/vertex-displacement-noise-3d-webgl-glsl-three-js fixed for Codea. You need http://www.clicktorelease.com/blog/vertex-displacement-webgl-glsl-perlin-noise-three-js/explosion.png in your images for the readImage on line 8.
Grab code here: https://gist.github.com/sp4cemonkey/7caadf6d098be9e0d865
Here's another version. It puts the explosion into 2d space via a tweaked projection matrix and will go bang on touch points. at 4 explosions simultaneously runs smooth, but degrades from there if you touch too fast.
code: https://gist.github.com/sp4cemonkey/b6cd5c718a7598717700 this also has some comments to explain usage
I got my entry in over here, it's a 3D explosion with a particle system into a small and easy class.
These entries are amazing. You are all fantastic programmers.
@spacemonkey, I see no reason why your entry cannot be part of the competition. There is no reason you cannot submit code you have worked on previously.
Here's a particle based example using the ship parts which come with Codea, though could be easily customised with your own parts
These are all fantastic entries!
Less than a week left!
I wasn't going to enter but I had to make an explosion (2d) for my game. It's as close as I've gotten all day, has a stupid name due to having a class called Explosion already (Updated, set size and draw with smaller explosions, big ones can lag if theres more than 2):
These were all great entries. Judging is almost complete. I'll announce the results on the 14th as stated above.
:-SS
with luatee code you can use
for the texture
@Jmv38 here's the texture i thought I included it:
Texture added, looks good!
After much judging coder takes the prize. Everyone else tied for second. Coder gets ten dollars and everyone else that participated gets five dollars. Please pm me the email address you want me to PayPal the money too. Thank you all and I hope you had fun.
Just throw my $5 at some charity of your choice.
@MrScience101 that's very charitable of you!
I liked so much @Luatee 's explosion. And I even prefer it without texture
@deactive thank you, I tried to make it as realistic as possible for 2D but without the texture it doesn't quite match it.
@MrScience101 thanks, I'm honoured
"> . Same as @spacemonkey , please donate my prize to charity too.
I did not expect so many charitable donations. I guess I'll have to figure out one to give to, any particular one you want?
Animals
|) ?
Doctors without borders? Sign me up for the charity event.
Likewise - add mine to the charity donation.
Hello here ! I have found a cartoon explosion from Two Lives Left (twolivesleft.com/prototypes/cartoon-explosions/) today and I have rewrite it for Codea : https://gist.github.com/HyroVitalyProtago/6b85d82eb534a4c8a844. Maybe a lot of people don't know about this cool effect...
Have a good day !
That's really neat! Thanks for sharing
Thank you for the donations to charity. It went to helping a family whose father suffered a stroke and lost his job. Then the mother was suspended from her job. It provided apples, meat, potatoes, carrots, milk and other necessities (twice!) to some very hungry children who were very, very, thankful. Never seen teen age children cry before for receiving food. It was both heartwarming and heartbreaking at the same time. Thank you for your donations.
@MrScience101, that is so great to hear. I applaud all of you for donating.
@MrScience101 Oh crud, I forgot to reply. I wanted mine to go to charity too. Is it too late?
I assumed everyone who did not send me a pm wanted their winnings to go to charity. If this was in error, just send me a pm and I'll send the money via paypal. So no you were not too late at all.