new particle-projectile system in the works

Very impressive screen shoot from your work.

Pyro is really good too use it as a projectil lib and very stable.
Thanks for the share :slight_smile:

i consider it .4 right now. I still want to write a 100% C++ handler (right now all particles HAVE to go through python which is slower then existing particle system but you get more control.

I also want to write a particle editor.

i converted this sample into pyro system ā€¦ will be there in the next release.

Really thx.
Good new for the community.

You make an really good job TreeForm.
Generic tools like particule editor/world editor ectā€¦ (up to date :wink:)
Itā€™s the only things that really left to panda3D.

Maybe you could add too and little txt file the install and use on your next release to help the new coming dev on this community :wink:

PS: iā€™ve make some test on prototype game with pyro for use it with fire (ennemie+player) and particules (explosion, effect, buff, ectā€¦).
Pyro is really stable and fast to use it for all ā€œbulletā€ type particule.
Nice job

Cool! It is really rewarding to hear that some one used my system!
The basic idea about pyro is fast python-generation-geometry interface.

  • sorry i donā€™t understand what you want me to add.

sorry i donā€™t understand what you want me to add.

Just some file like an readme.txt with some instruction for people that starting with panda3D and pyhton to install your lib and to use it :wink:
I saw lot of new people on the forum that start to use Panda :wink:

one question is pyro available through another linkā€¦the one I tried doesnt work. also is pyro custom made by treeform or is it obtainable through someone/some other website. I am really curious for a free particle solution other than particle illusion lol they charge you :slight_smile: but its VERY good particle creation. Anyway if anyone has another particle program or if treeform could somehow make the link work :slight_smile: that would be great b/c I really need a beam like effect like on halo 2 with the scarab gun :slight_smile: and very big explosions ahhh explosions :slight_smile:

the p3dp link works for me? I will put up another mirror when i get home.

I have added a new mirror link. Dave says he is looking on how to integrate this into panda3d source base.

nice new :slight_smile:

I have downloaded pyro from the first link in the top post and am trying to build it. I use panda3d version 1.5.3 on linux. Panda3d is not in /usr/ā€¦ on my system, so I change SConstruct to point to my paths.

Running scons I get an error:

build/pyro.cxx: In member function 'void Pyro::segment(LVector3f, LVector3f, int, float, LVector4f)':
build/pyro.cxx:215: error: 'size' was not declared in this scope

Just guessing, I change ā€œsizeā€ into ā€œthiknessā€ in this function, so building continues. It compiles fine, but when interrogate runs, I get the error:

*** Error in pyro.h near line 34, column 19:
  syntax error, unexpected TYPENAME_IDENTIFIER, expecting '('

I donā€™t know what this means or how to fix it.

some changes i made to make pyro4 compiling and running (mostly) under osx:

It may also resolve the above error, i have encountered it once as well, but i cant really tell you where to search.

# in pyro_manager.py
if ConfigVariableBool("load-pyro").getValue():
    print "*********************"
    try:
        import libpyro
    except:
        import imp
        import sys
        if sys.platform =='darwin':
            module = imp.load_dynamic( "libpyro", "pyro/libpyro.dylib")
            sys.modules["libpyro"] = module
        elif 'win' in sys.platform:
            module = imp.load_dynamic( "libpyro", "pyro/libpyro.dll")
            sys.modules["libpyro"] = module
    from libpyro import Pyro as Generator
# replace the whole SConstruct
import sys, os

if sys.platform == 'darwin':
  PANDA_INCLUDE_DIR = '/usr/local/panda/include'
  PANDA_PARSER_INC_DIR = '/usr/local/panda/include/parser-inc'
  SYSTEM_INCLUDE_DIR = '/Developer/SDKs/MacOSX10.5.sdk/usr/include/'
  PYTHON_INCLUDE_DIR = '/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/Python.framework/Headers/'
  PANDA_LIB_DIR = '/usr/local/panda/lib'
  PANDA_INTERROGATE_BIN_DIR = '/usr/local/panda/bin/interrogate'
  ADDONS = ' -Dvolatile -D__FLT_EVAL_METHOD__=0 -D__LITTLE_ENDIAN__ -D__inline__=inline -D__GNUC__ '
else:
  PANDA_INCLUDE_DIR = '/usr/include/panda3d/'
  PANDA_PARSER_INC_DIR = '/usr/include/panda3d/parser-inc'
  SYSTEM_INCLUDE_DIR = '/usr/include/'
  PYTHON_INCLUDE_DIR = "/usr/include/python2.5/"
  PANDA_LIB_DIR = '/usr/lib/panda3d/'
  PANDA_INTERROGATE_BIN_DIR = 'interrogate'
  ADDONS = ''

BuildDir('build', '.')

interrogate = Builder(action = '%s -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const %s -S%s -S%s -oc $TARGET -od build/pyro.in -fnames -string -refcount -assert -python-native -I%s -module libpyro -library libpyro $SOURCE' % (PANDA_INTERROGATE_BIN_DIR, ADDONS, PANDA_PARSER_INC_DIR, PANDA_INCLUDE_DIR, SYSTEM_INCLUDE_DIR) ) 
env = Environment(BUILDERS = {'Interrogate' : interrogate})

include_path = [PANDA_INCLUDE_DIR,PYTHON_INCLUDE_DIR]
if sys.platform == 'darwin':
  standard_libs = ['framework', 'pandaexpress', 'dtool', 'dtoolconfig', 'panda', 'recorder', 'pgui', 'pgraph', 'putil', 'collide', 'chan', 'text', 'pnmimage', 'pnmimagetypes', 'dtoolbase', 'pandafx', 'event', 'dgraph', 'express', 'pandabase', 'audio', 'grutil', 'tform', 'linmath', 'gobj', 'mathutil', 'lerp', 'downloader', 'pstatclient', 'pipeline', 'pnmtext', 'gsgbase', 'parametrics', 'net', 'nativenet', 'display', 'device', 'cull', 'interrogatedb', 'dconfig', 'prc', 'char', 'movies', 'distort', 'effects', 'dtoolutil', 'python']
else:
  standard_libs = ['p3pystub', 'p3framework', 'pandaexpress', 'p3dtool', 'p3dtoolconfig', 'panda', 'pandafx']
lib_path = PANDA_LIB_DIR

if sys.platform == 'darwin':
  env['ENV']['LD_LIBRARY_PATH'] = os.environ['LD_LIBRARY_PATH']
  env['ENV']['DYLD_LIBRARY_PATH'] = os.environ['DYLD_LIBRARY_PATH']

env.Interrogate('build/pyro_igate.cxx', 'pyro.h')
SharedLibrary('libpyro',
              ['build/pyro_module.cxx','build/pyro.cxx','build/pyro_igate.cxx'],              
              #CCFLAGS='-O3 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"build/pyro_module.d" -MT"build/pyro_module.d"',
              CCFLAGS='-O3 -c',
              CPPPATH=include_path,
              LIBPATH=lib_path,
              LIBS=standard_libs)

it may not be required to have that many libraryā€™s in the standard_libs, however using the ones from windows didnt work at all.

The samples worked fine for a while, until it crashed with this error:

/Users/rspoerri/Desktop/pyro/pyro_manager.py:248: DeprecationWarning: integer argument expected, got float
  (particle.pos-particle.posB).length(),particle.speed * particle.time)
Assertion failed: (result == 0), function lock, file /usr/local/panda/include/mutexPosixImpl.I, line 122.

Thanks! Using your SConstruct it builds perfectly. I get to run the three test scripts, although wreck_test.py runs at just 5 fps :slight_smile:

I will run wreck_test.py for a while to see if I get a crash as well.

One thing i missed,

Only applies to OS X users:
Once you have compiled the lib, rename the libpyro.dylib to libpyro.so (remove the old ones). I have tried doing that within the SConscript, but didnt find out how to do it.

Applies to everyone:
fix this in pyro.cxx to have the compilation working as well:
line 215

    LVector3f v1 = start - _up*thikness;
    LVector3f v2 = stop - _up*thikness;
    LVector3f v3 = stop + _up*thikness;
    LVector3f v4 = start + _up*thikness;

iā€™ve seen a dll file lying around and iā€™d like to use this under gnu/linux.
i couldnā€™t find any instructions about building it under linux - is it windows only?

Actually, it has been implemented in CVS and it will be available in 1.6.0 under the name MeshDrawer, if my information is correct.

It works for me on linux.

Yeah the c++ portion has been integrated into panda3d no use using the old code. It goes under name MeshDrawer now.

thx. canā€™t wait to try it out!

I am starting the more of C++ implementation. But i think its sort of getting more and more specific to my game which not might be good as a contrib lib.