Editing 235k Frames/RGB values in a heartbeat: Is it possible?

How do I quickly set possibly tens of thousands of frames from data to UI?

I am working on a game similar to The Powder Toy where over 150 of particles that have their own properties.

There are around tens to thousands of pixels that can be assigned a particle to in the game. But am wondering on how I quickly change all those particles.

The simulation would update every frame. They way it works is a very long string like this:

'0 0 0 0 93 0 31 3 31 50 69 10 41'

Each Particle has it’s own number (between 0 and 255), that could then be used to fetch the properties of the particle.

To store the particles, I would just bitpack the data of 4 pixels into 1 number, which is why the particles are between 0 and 255.

Storage should be no issue as I got SimpleBit, a module made by myself that has functions for bitpacking.

And I got an idea of how to shift the Particles, so my only issue is displaying them.

Changing the RGB values of thousands of frames in a heartbeat is a heavy task, and I seriously doubt if it could be performmed by Roblox, and if it could, then it would be very slow.

The Powder Toy itself is partially or even fully writen in Lua, but they work on a far less limited game maker unlike Roblox Studio

In summary: How do I edit thousands of Frames in a heartbeat.

It’d be really easy to test, try that before even thinking about optimizing it.

Have you tried using RunService?

https://developer.roblox.com/en-us/api-reference/class/RunService

If you want the UI to update every frame i do suggest using run service

Yes, I know Run Service, i’ve been coding for almost 2 years.

The problem is updating the sheer number of objects (235k frames).

Each frame’s only detail is it’s RGB value. Are there any tricks to display multiple rgb values in a single frame?

1 Like

im not so sure :sweat_smile: ive only been coding for a few moths (since last september) so i wouldnt listen to me if i were you lol

what do you mean by frame? do you mean frames per second or an actual UI frame?

By Frame I mean UI frame.

I refer frames per second as heartbeat to not confuse people.

1 Like