Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / AGK Particles - show immediately?

Author
Message
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 31st Mar 2012 21:40
Hey.

Is there a way to make particles and show them immediately? Because normally, they appear only after they finish 1st loop.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 31st Mar 2012 23:40
would love to have that, but i guess its not possible
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 1st Apr 2012 00:06
Unless we make our own particle system.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 1st Apr 2012 16:03
Well the AppGameKit particle system is good, it just needs a few more commands and features to be GREAT
greenlig
20
Years of Service
User Offline
Joined: 30th Aug 2003
Location: Melbourne
Posted: 2nd Apr 2012 10:28
I agree. There are a few things that could be added to make life easier. One problem that hasn't been addressed, despite my bug entry, is the maximum particle life. It's locked at 20 odd seconds, which is a pain in the neck!

I'd also love a SizeGrow() function of some kind. Would be grand!

Greenlig

Your signature has been erased by a mod as it is far too big.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 2nd Apr 2012 17:41
I've added a new command UpdateParticles that will allow you to advance a particle emitter by a specified amount of time, so you could skip through the initial generation of particles to display a fully active particle emitter on the first sync.

I've also increased the max life to 120 seconds, it's mainly there to ensure the internal array of particles isn't too large as a long life with high frequency can create a lot of particles. But I guess 20 is a bit too low.
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 2nd Apr 2012 18:44
Quote: "I've added a new command UpdateParticles that will allow you to advance a particle emitter by a specified amount of time, so you could skip through the initial generation of particles to display a fully active particle emitter on the first sync."


Great. Though, sometimes it's neccessary to create&instantly play the particles, allowing to view as they begin. (For blood streams etc.)

Though, I guess that's just up to us to code it.

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 3rd Apr 2012 09:52
UpdateParticles() is a GREAT idea!!!

How about some kind of PAUSE particles option? Right now there is no way to pause the particles when the user presses a pause button in the game!!!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Apr 2012 11:48
Quote: "How about some kind of PAUSE particles option? Right now there is no way to pause the particles when the user presses a pause button in the game!!!"

Agreed. To be honest the particle system is not currently very useful except for cludging something together quickly. Even then I prefer to make my own system, it's far more flexible.

I really must finish putting my own particle system into a usable order so I can post it on the forums...

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 3rd Apr 2012 16:47
Baxslash if they add the UpdateParticles() and Pause() commands it will already be very very useful.

Unfortunately it seems they cannot add a "grow/shrink with time" option.

But apart from that, it would fit all my needs!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 3rd Apr 2012 16:49
Quote: "Baxslash if they add the UpdateParticles() and Pause() commands it will already be very very useful.

Unfortunately it seems they cannot add a "grow/shrink with time" option.

But apart from that, it would fit all my needs!"

In that case you're lucky. I have yet to find an occasion when I need particles and the standard particle system suits my need.

Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 3rd Apr 2012 18:04
I've added the ability to pause the particles. There is the possibility of rotation and size changes in future but they will take more time.
Ancient Lady
Valued Member
20
Years of Service
User Offline
Joined: 17th Mar 2004
Location: Anchorage, Alaska, USA
Posted: 3rd Apr 2012 18:52
I love hearing the things that are definitely coming and at least in the thinking stage!

Cheers,
Ancient Lady
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 3rd Apr 2012 23:56
Cool news Paul.

I love that "possibility" option for resize and rotation!

I look forward to 107, I really need it to finally start finalising some project in AppGameKit!!!
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 4th Apr 2012 13:47
Paul did you ever find a solution / Fix the problem with particles in landscape mode on ios (they get rotated 90 degrees) ???
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 4th Apr 2012 17:14
If rotation and sizing make it in then it'll fix itself as those aren't supported by point sprites so it'll all be quad based. It'll be slower than point sprites but won't suffer from the landscape issue.

Although I haven't tested it you may be able to fix it with point sprites by compiling a landscape version of the iOS player by setting shouldautorotatetointerfaceorientation to YES for landscape only and adding Initial Interface Orientation to landscape in the info.plist
kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 4th Apr 2012 18:47 Edited at: 4th Apr 2012 18:47
Yay. I've made a thread, and got two particles functions added

bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 4th Apr 2012 19:34 Edited at: 4th Apr 2012 19:34
Paul, right now the particle engine is PERFECT for small & simple sprite effects. On iOS it does not impact fps even when there are a lot of sprites cos its using point sprites.

If we will be forced to use quads instead of point sprites then it will be a step backwards so I hope we will still have the option to use point sprites with limited functionality.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 4th Apr 2012 19:34
Paul where can I find shouldautorotatetointerfaceorientation ?
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Apr 2012 00:28 Edited at: 5th Apr 2012 00:29
Quote: "where can I find shouldautorotatetointerfaceorientation ?"


In UntitledViewController.m

Quote: "If we will be forced to use quads instead of point sprites then it will be a step backwards"


Point sprites have very limited capabilities and are selected if possible, but will fall back to quads if the particles are too big, or in future if they are rotated or resized.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 5th Apr 2012 09:03
great thanks
Rich Dersheimer
AGK Developer
14
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 8th Apr 2012 17:27
Paul, when sprites behaviors are changed in future releases, please please please try to make sure that old code is NOT broken!
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 9th Apr 2012 04:40
The only likely change will be to SetParticlesVisible, previously it controlled both visibility and activity so they would pause when hidden. In future these will be separate functions controlled by SetParticlesVisible and SetParticlesActive so you can have one without the other.

Nothing else will change for existing code, and falling back to quads instead of point sprites will not be noticeable as they are designed to produce exactly the same effect, just point sprites are faster.

Login to post a reply

Server time is: 2024-05-08 23:10:06
Your offset time is: 2024-05-08 23:10:06