Yuo could do it that way, and it would save memory usage
by functions, but you'll probably lose it again somewhere
in the complexity, or in lookup tables storing pointers to
all your 'particles'.

IE when you create your 'physical' particles (a "box struct I believe),
create them WITHOUT an action/function in the entity, but
create a pointer in a global array of pointers to every object
you create.
Then you can put a loop 'inside' your main-function loop that goes
through the global array and updates/destroys/reacts each of your
objects as you see fit.
Is that waht you mean? Try to escape from object-oriented-programming?

If you are willing to re-post or even PM me your main.c code
I could probably within a day, recode it to what I mean.
That may be easier to trying to explain. But I'll answer
any questions as best I can if you prefer.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial