3d Particle System Dll. And It's Pretty Darn Fast!
#101
Posted 20 October 2011 - 07:20 PM
#102
Posted 14 November 2011 - 09:17 AM
part3d_type_life(particle,-1,-1); ?
Nevermind!
Nice!
Any updates coming soon? I've been using this a lot lately.
Edited by Robert3DG+, 14 November 2011 - 09:23 AM.
#103
Posted 14 November 2011 - 09:32 AM
Iccurd, you should add a way to give particles infinite life. This is great for drawing level geometry using the DLL.
part3d_type_life(particle,-1,-1); ?
Nevermind!I just realized it already does this with part3d_type_life(particle,0,0);
Nice!
Any updates coming soon? I've been using this a lot lately.
Probably in GM9. I hear that version will have a proper interface to link GM features from within dlls. Now it's stuck with gm8 because gmapi has no support for gm8.1
And yes, read the comments for the functions, I added a few features here and there. I like the one you get the particle instance so you can manipulate it directly and in such you can tell the system to draw everything for you including your player, ais and 3d world...
#104
Posted 14 November 2011 - 09:36 AM
This DLL has so many great features. I wish more people used it. Maybe we should make a tech demo with it
Edit- Is it possible to give a particle a chance to rotate left or right as it's created using part3d_type_orientation? That would be nice.
Edited by Robert3DG+, 14 November 2011 - 09:39 AM.
#105
Posted 14 November 2011 - 07:59 PM
part3d_particles_create
There was a particle_get_previous to allow getting all the particles of a burst, but I think I removed it when I improved the system drawing speed.
[edit]
Ooops, that's not what the part3d_particles_set_item_rotation sets. so, no, unless you make your own draw script
#106
Posted 04 January 2012 - 01:21 AM
Fixed tiny offset of sprite when a particle is scaled down. Was barely noticeable unless you would be looking right on the point of creation of the particle (which I am in my newest invention). had to use add_scaling instead of the xscale, yscale parameters of draw_sprite_ex.
The result is an extra transform call for each particle, which may reduce the max count by a fraction...
#107
Posted 06 February 2012 - 07:03 AM
I wasted a lot of time during Jam 5 trying to make this behave but no matter what it causes errors
Simply importing the GMres file into my game (The DLL, the tank texture and the tank model included) and trying to put DemoOBJ into the room will cause it to throw errors up whereas in your demo having the DemoOBJ by itself does no such thing. What is wrong here!
___________________________________________
ERROR in
action number 1
of Other Event: Room Start
for object DemoObj:
In script part3d_type_create:
Error in code at line 5:
ind = external_call(global.dll_part3d_type_create);
^
at position 33: Unknown variable dll_part3d_type_create
More info: GM8 Project; Using everything included in the .GMres file.
Edited by Robert3DG+, 06 February 2012 - 07:05 AM.
#108
Posted 06 February 2012 - 08:01 AM
This has always been fun to mess around with, but actually trying to use it fresh in a new game has been a nightmare!
I wasted a lot of time during Jam 5 trying to make this behave but no matter what it causes errors
Simply importing the GMres file into my game (The DLL, the tank texture and the tank model included) and trying to put DemoOBJ into the room will cause it to throw errors up whereas in your demo having the DemoOBJ by itself does no such thing. What is wrong here!___________________________________________ ERROR in action number 1 of Other Event: Room Start for object DemoObj: In script part3d_type_create: Error in code at line 5: ind = external_call(global.dll_part3d_type_create); ^ at position 33: Unknown variable dll_part3d_type_create
More info: GM8 Project; Using everything included in the .GMres file.
Make a boot room, first room. Use this for the room code
GM3dPartSysINIT()
room_goto_next();
Still have the problem?
I think you simply did not put the DemoObj in the first room of your game though....
Make it persistent, and drop it in your first room... Or drop one in every room
It's a little too cody though...
Make a new controller object, persistent
drop it in your first room
game_start
GM3dPartSysINIT()
global.ps = part3d_system_create();
//opt create all your shared part types here
room_end
part3d_system_clear(global.ps);
game_end
//free all your part types here
part3d_system_destroy(global.ps);
GM3dPartSysUnload()
With the boot room method you be able to
access the particle global.ps anywhere in the subsequent rooms, including the create event and the room start events from other objects without fear the system is not initialized yet.
have proper support for room restart and game restart (remember to free your stuff in the room end event)
Safety tip, make your part types global and manage them in that controller.
[edit] actually, I designed it so it did not matter if you destroyed part types if some particles spawned from the template are still in the system. So you can encapsulate part types, emitters in the object that spawns them as long as you don't try to emit a particle of a type that has been destroyed...
an object create
type = part3d_type_create();
part3d_type_direction(type,0,0,360,0,1,1, 2, 2)
part3d_type_life(type,0,100)
em = part3d_emitter_create(global.ps);
part3d_emitter_stream(global.ps,em,type,1);
part3d_emitter_region(global.ps,em,x-30,x+30,y-30,y+30,z,z,ps_shape_rectangle,ps_distr_gaussian);
an object destroy
part3d_emitter_clear(global.ps,em);
part3d_emitter_destroy(global.ps,em);
part3d_type_destroy(type);
an object room_end
instance_destroy();
#109
Posted 06 February 2012 - 09:08 AM
One last thing:

It seems I'm getting so pretty ugly alpha effects. Any idea what I'm doing wrong?
#110
Posted 06 February 2012 - 08:37 PM
//your camera draw
d3d_set_projection_ext(x,y,z,
xto,yto,zto,
v1,v2,v3,lensAngle,aspect,near,far);
//match the coords and direction in the 3d ps dll
PartSysSetCamData(x,y,z,xto,yto,zto,90-lensAngle);
the particle system should default on sort by cam depth but if the above did not work, call this
part3d_system_draw_order(global.ps,2)
after you created the ps.
[edit]
Also, make sure you only use 1 ps in the game. 2 ps will not blend together.
#111
Posted 07 February 2012 - 06:14 AM
I think you forget to tell the system where the camera is
//your camera draw
d3d_set_projection_ext(x,y,z,
xto,yto,zto,
v1,v2,v3,lensAngle,aspect,near,far);
//match the coords and direction in the 3d ps dll
PartSysSetCamData(x,y,z,xto,yto,zto,90-lensAngle);
I already had this in the code, yes.
I took out my camera and put in your CameraObj and PlayerJumpObj objects in it's place. The particles now render correctly but obviously the rest of the game has broke. Will the system only work with the way you have your camera setup? It has a lot of bloat code floating around in it
Thanks for the help too.
Edited by Robert3DG+, 07 February 2012 - 06:14 AM.
#112
Posted 07 February 2012 - 06:44 AM
I do call
d3d_start(); every draw. maybe comment it out if you are one of those who only call it when the room starts. I find it solves a lot of side issues. It may have nuked lights you may have defined.
and the depth of the camera may have some thing to do with your game, if you have lights or objects that are now set before the camera is set.
You can zip your gmk, the dlls and all your resources and send it to me. I can take a look.
#113
Posted 10 August 2012 - 01:44 PM
#114
Posted 10 August 2012 - 08:15 PM
Wow, i really wanted to use this dll, but there's almost no comments in the example, and lots of not needed stuff making everything so messy...
All the comments are in the scripts. If you want to know how it works, read up on GM's particle system, it's a copy of that system aside from some minor changes for 3d support in most functions to include the z axis
#115
Posted 01 November 2012 - 02:10 PM
#116
Posted 01 November 2012 - 07:27 PM
#117
Posted 29 November 2012 - 09:17 PM
#118
Posted 30 November 2012 - 12:38 AM
The download's down again... "User does not have enough bandwidth for you to download this file. Perhaps you should encourage them to Upgrade their account."
You'll have to try Dec 1st.
#119
Posted 01 December 2012 - 02:03 PM
Not a day goes by while using GM-Studio that I don't miss this DLL.
#120
Posted 23 January 2013 - 04:49 PM
It uses GMAPI... Which is not compatible. Until yoyo figures out a way to expose their functions to use in a dll the support stops at GM8.
Is GMAPI still don't have functions you need? It made some progress since then. Even GMOgre3D works with GM8.1 now
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











