A Particle FX Engine for LiveCode

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Hutchboy
Posts: 130
Joined: Wed Aug 01, 2018 2:57 pm
Contact:

A Particle FX Engine for LiveCode

Post by Hutchboy » Fri Sep 26, 2025 1:35 am

Hi,

Attached is a demo of a particle effect engine with scrollbar tunable parameters. I am using this to assess some effects I want to use in games. When you run this note that the apparent small range in the "Grow" scrollbar is because it compounds from frame to frame.

The stack script is pretty well documented and open source (MIT license).

FYI, I am testing on LiveCode version 10.0.3 (rc1)

- Mike
Attachments
Particle FX Engine Demo.livecode.zip
(18.4 KiB) Downloaded 16 times

stam
Posts: 3123
Joined: Sun Jun 04, 2006 9:39 pm

Re: A Particle FX Engine for LiveCode

Post by stam » Fri Sep 26, 2025 2:25 pm

Thanks for another interesting Stack Mike.
Can’t check it out right now as am at work, but I’d say this is LC’s weakest area… how are framerstes with any number of object

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4178
Joined: Sun Jan 07, 2007 9:12 pm

Re: A Particle FX Engine for LiveCode

Post by bn » Sat Sep 27, 2025 10:43 am

Thanks for this stack. It works very well.

As an aside I noticed that when I set the acceleratedRendering to "false" it runs smoother than when it is set to "true".
But that was always true for me and I never got anything "accelerated" when doing animations.

Kind regards
Bernd

Hutchboy
Posts: 130
Joined: Wed Aug 01, 2018 2:57 pm
Contact:

Re: A Particle FX Engine for LiveCode

Post by Hutchboy » Sun Sep 28, 2025 12:17 am

Hi,

Thanks for the comment about acceleratedRendering. I include it because I thought it was a "best practice" but I may take it out if it is not really helping.

At the moment I am finalizing two additions. I'm implementing 1: gravity and 2: a direction/constraint control using an "oval" graphic object and the startAngle/arcAngle properties set by scrollbars so I can simulate "fountain" or "directed beam" type of particle effects. Kind of fun when things work out the way you envision.

- Mike

Post Reply