HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Projectile System

08-04-2009, 12:24 PM#1
Wizardum
Hello guys!
I've been developing a projectile system, which does a lot of things at the same time. Instead, of only moving a missile or making a jump individually, it does it all. However when I added the knockback feature to it, it started causing trouble.

For example I have a unit which is spawning missiles and this missiles are moving upwards in a spiral movement. The missiles move perfectly without any problem until another unit starts knockbacking units, far away from the first unit. What happens now is that the missiles that are moving around the first unit will start to have their path changed. I realized the angle and the speed values get changed some how. Strange thing is that the knockbacks don't get messed up.
I've already tested this 3D spiraling movement at the same time with jumps and missile arcs, and none have caused trouble. The knockback seems to be the root of the problem, but it's odd because I haven't changed anything on the system loop, only added a knockback method to make different calculations and to store them on the struct.

Another thing that has been pissing me off as well:
My system hads the possibility to attach an effect to the missile and in the end destroy it. But when I decided to put the knockback thing, I had to add another type of effect, an instant effect, which would be created and destroyed every time the unit moves.
However I discovered it is the causer of the tremendous lag, when more than 60 missiles (instances) are being moved. When I remove the instant effect, everything goes back to normal, and my system become capable, once again, of moving more than 100 missiles.
Now if someone has a solution for this, I'd really appreciate it, because I actually need that instant effect.

here is the system code:
(Sorry if it is too long and hard to read)

Expand Dummy Engine:

Also if you want to see the horrible results, you can download the map at the bottom of this post.
The blood mage is the one with spiraling effects, and the paladin is the one with the knockbacks. Try to run both at the same time, and you'll see what I mentioned above.

By the way, suggestions to improve the overall efficiency of this system are welcome and appreciated.

Thanks in advance!!

Wizzy..
Attached Files
File type: w3x[vJASS] Dummy Engine.w3x (38.9 KB)
08-07-2009, 07:48 PM#2
Wizardum
*bumping*
08-07-2009, 08:24 PM#3
chobibo
Use a custom dust effect so that you wouldn't need to constantly create-destroy effects, you can use the ImpaleDustTarget.mdx as a base for the dust effect.
08-07-2009, 08:42 PM#4
Wizardum
now what's exactly a custom dust effect?
08-07-2009, 08:47 PM#5
chobibo
Edited mdl model.
08-08-2009, 11:33 AM#6
Wizardum
and where exactly do I get it or do it? I've never heard something like that
08-08-2009, 01:58 PM#7
chobibo
What I mean is make a dust model with a stand animation, instead of killing it every movement, you just keep on playing it's animation, which reduces the drag on the game engine.
08-08-2009, 06:41 PM#8
Wizardum
ah, I guess you're talking about a dummy effect right? nice idea.