Hello everyone,
I'm trying to make a roguelike with an SDL-based terminal emulator much like what Cogmind uses. I really like how Cogmind uses UI animations, particles, and such to spice up what would otherwise just be static ASCII, so I've been trying to produce a similar system myself — albeit a much more basic version, obviously. I've read all of Kyzrati's dev writeups on the particle system that I can find, but I'd still like to understand further and I'm curious if anyone here knows anything more about it, or knows of other resources I could consult.
My understanding so far is as follows --- not sure if I'm right about all this, though.
* Based on this dev post, it seems that each particle in a system is a discrete object (i.e. "array of structs" rather than "struct of arrays" as I've seen in some particle systems).
* Since particles can do damage to other game objects they bump into, they are proper game objects, rather than just a graphical overlay.
* According to this lecture, the particle grid is finer than the visible game grid, with a 3x3 square of particle tiles per 1 game tile. Colors are blended into the game tiles to produce a smoother effect.
Right now I have two major questions. Firstly, how are particles used to produce interface animations? I can understand explosions, lasers, etc., but I'm curious how, for instance, the effect of tracing out the borders of UI windows is produced using the same system. I presume at a basic level it's just blending the interface elements with particle colors, but I don't know how the underlying particle systems would be structured.
Secondly, how much of a performance drain is a particle system like this? I've read in various places that Cogmind can use hundreds of particle systems simultaneously, which I presume means at least tens of thousands of particles. Is the amount high enough that you'd have to end up micromanaging things like memory locality? I want to make a realtime roguelike, and I wonder if high-resolution particles would cause too much slowdown in that case.
I'm trying to make a roguelike with an SDL-based terminal emulator much like what Cogmind uses. I really like how Cogmind uses UI animations, particles, and such to spice up what would otherwise just be static ASCII, so I've been trying to produce a similar system myself — albeit a much more basic version, obviously. I've read all of Kyzrati's dev writeups on the particle system that I can find, but I'd still like to understand further and I'm curious if anyone here knows anything more about it, or knows of other resources I could consult.
My understanding so far is as follows --- not sure if I'm right about all this, though.
* Based on this dev post, it seems that each particle in a system is a discrete object (i.e. "array of structs" rather than "struct of arrays" as I've seen in some particle systems).
* Since particles can do damage to other game objects they bump into, they are proper game objects, rather than just a graphical overlay.
* According to this lecture, the particle grid is finer than the visible game grid, with a 3x3 square of particle tiles per 1 game tile. Colors are blended into the game tiles to produce a smoother effect.
Right now I have two major questions. Firstly, how are particles used to produce interface animations? I can understand explosions, lasers, etc., but I'm curious how, for instance, the effect of tracing out the borders of UI windows is produced using the same system. I presume at a basic level it's just blending the interface elements with particle colors, but I don't know how the underlying particle systems would be structured.
Secondly, how much of a performance drain is a particle system like this? I've read in various places that Cogmind can use hundreds of particle systems simultaneously, which I presume means at least tens of thousands of particles. Is the amount high enough that you'd have to end up micromanaging things like memory locality? I want to make a realtime roguelike, and I wonder if high-resolution particles would cause too much slowdown in that case.