Particular Particles v2.1.2 - Randomizer and export of particle effects

My Cargo-Bots are fine, and none of the presets work. I am on the latest beta, has anyone else checked it with that?

I reinstalled the particle code, rebooted the iPad, no luck.

@Briarfox. Well it is not exactly working as soon as I fix it I will post a video and the relavant code. My change, when done, should texture the particle rectangle with only part of the image associated to it with the setRecTex command

I added the line:

self.particularMesh:SetRectTex(i,self.u,self.v,self.width,self.height) after you create the rectangles. self.u and self.v are the starting cordinates in the atlas map. and self.height and self.width are the how many pixels to use from the u and v coordinates. This way you can use an image as an atlas map instead of loading in several images for each newly created particle.

The rational behind this is if you pass in a list of vec2s you can animate the particles image by updating the index of that list. So, your fire preset could use cycle through images to create a more realistic flame. I will try to implement this to your class tomorrow.

I am just changing the x value of the setRecTex command in the video.

https://www.dropbox.com/s/r305sa0dtxued1c/IMG_0066.mp4

@ignatz any relation with the fact that setContext + sprite is broken in the current beta? You could revert to a previuos version (testFlight allows that).

I think that might be the problem, but I’ll just wait for the fix

I’ve added a sprite picker. It’s a little clunky and requires a doubletap to select a sprite. I’m unsure on any other way to distinguish between scrolling and selecting.

@Briarfox My sprite picker distinguishes scrolling and selecting by how far away the touch is when it ended from when it started.

Edit: Your sprite picker is much faster than mine…

Good idea, I’ll try and handle scrolling/touch like that.

I looked over your code, got the idea of it and started playing with it :slight_smile:

If you look in my touch class you’ll see that I distinguish a tap by whether or not it moved and whether or not the end came within half a second of the start.

I’ve been working on my sprite picker and might have a new version in a little bit.

Removed double tap!

The new beta fixes the problem I was having

Awesome @ignatz so what do you think?

@-)
:open_mouth:
:smiley:
=D>
boy, you make good tools! Well done!

Minor update to fix scrolling and added Loading output to show that it is indeed loading a spritepack.

Just updated, very nice tool! and nice use of coroutines on the sprite loader :wink:

Lets just say, someones post inspired me :slight_smile:

but here’s something interesting

take out the coroutine.yield() inside the loops in setImages, and instead, put it after the loop, immediately before coroutine.yield(grid)

Then the pix load 2-3 times faster.

Thanks Ignatz, I should have caught that! updated with the fix.

Added an update notification that lets you update Particular Particles if an update is detected on the gist.

Tanks @stavrogin and @briarfox :slight_smile:

http://youtu.be/7refK0cevpo