Major flaw in particle stuff

  • zc00gii
    4th Dec 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • Simon
    4th Dec 2010 Administrator 1 Permalink
    I'm Simon, and I approve of this message.
    Could you implement it/give us an idea of how easy/hard it is to do?
  • zc00gii
    4th Dec 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • Finalflash50
    4th Dec 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • alexthesax
    4th Dec 2010 Member 0 Permalink
    Well, I have a base in C++, just getting to learning pointers, so that will transfer over to C, but the best way I know how to eliminate a bunch of conditionals, would be just to make a Gigantic switch. I have some time, if you tell me how to do this effectively without pointers and such, I am 100% willing to do this.
  • cracker64
    4th Dec 2010 Developer 0 Permalink
    im bored, ill do this.
  • HK6
    4th Dec 2010 Member 0 Permalink
    cracker64
    Let me know when/if you get it done and I will try it on my computer. See how fast it runs.
  • Finalflash50
    4th Dec 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • Moach
    4th Dec 2010 Member 0 Permalink
    it would be very well worth it to have this thing ported to C++...

    i believe one could expect an at least tenfold boost in FPS if the type-checking was done with classes and function pointers instead of if-else chains....

    not to mention a lot easier to debug and mod

    C++ has the needed features for this built-in! (they're called VTables) -- a particle type could be defined by extending a base-type class and overriding virtual functions for display, update and whatnot...

    a lot more modder-friendly, and would eliminate the need to check types by "trial-and-error"...

    and particle-to-particle reactions could be coordinated via a switch (which uses jump tables under the hood) so it's a lot faster than if-else checks


    i think i'll have a go into it... C++ is fun
  • zc00gii
    4th Dec 2010 Banned 0 Permalink
    This post is hidden because the user is banned