• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[vJass] (system) Missile

I have worked on this missle engine for 2 months now and start the first official beta today.

Please post feedback, critism, pros, cons, bugs, etc.
Thanks all for your patience!

And thanks for downloading.
Preview image by Furby. Thanks a lot!

Edit:
I've updated the testmap and added a second spell.
There is a lot of improvements in version 0.1.7 and I plan to make it even faster and even more modular. I also plan to create an easy to understand API.

Used librarys:


Changed all constants (TRUE, FALSE) to true/false
Changed interval to 0.03125
Fixed object leaks
Performance improvements on MissileMovement: Less object generation
Merged MissileLocHelpers to Missile<type>Target
Removed HomingMissile wrapper
Added second spell (Rain of Fire)
Removed Libraries from Modules



Changed name to Missile.
Completely remade in modules, supports now a lot of optional stuff.
Added SpellHelper, fixed a lot of problems, made the Miranas Arrow example WAY more powerful to show what this system is able to be capable of.


Keywords:
Missile, Projectile, xe, xemissile, xecollider, projectile, collider, awesome, anachron, collide, colliding, vJass
Contents

CustomMissile 0.1.7 (Map)

Reviews
BPower: 11:02, 25th Feb 2016 Reason for re-review: Nowadays the spell section is packed full of missile systems from different authors, therefore a more qualified moderator comment than "this is neat stuff" is required. There is keen...
Okay, well I gave this thing a look and I still have to say I like mine better.

When your projectiles are shot over cliff edges (and down slopes in terrain) the pitch-angle that they rest at is off, and they seem to be faced more "downwards" than they should be.
Thanks, I will take a look at it.

There's another thing. If you set the projectile speed to something low (like 100) and give it a unit target, the projectile will be destroyed long before it actually is supposed to reach it's target. The slower the missile is going, the more inaccurate the timing will be.
Well, missiles have (like in xe) an decay. Make it higher for a chosen type of missiles if you know that those missiles are slower.

Okay, in this picture you can see how the projectiles are all tilted at an improper angle.
Well, if you change the model you see that it's the models fault.

This is what I was talking about before. The three projectiles that seem to be moving strangely are both cases where they've missed their target because it is moving. The other two projectiles are not good examples, but they were twitching as the target moved, facing slightly up to down then back up again. There was also a case where the projectile was stuck on the ground and slowly moved towards the edge of the map. I don't get how you missed these problems, as they are frequent and can be even more frequent when the user doesn't know exactly how to use your system.
I haven't missed them, thanks for reporting them, I already fixed them in the new coming version. I've made some major update which make this system faster and even more noob friendly.

Also, when your targets are moving there seem to be a lot of problems with the projectiles arcing properly; lots of twitching and stuff.
Well, I am recalculating it and there is no problem with it?! I mean, that is even better than how wc3 handles arcs.

Please note that the new coming version has a lot of bugfixes and I am remaking the examples, while one is a lineshoot arrow that deals AOE dmg to targets and slows them for a few seconds and the 2nd is a starfall rain.

Thanks for all of your feedback guys.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Anachron said:
Well, missiles have (like in xe) an decay. Make it higher for a chosen type of missiles if you know that those missiles are slower.

Though you don't always know how much time will be required for the missile to hit it's mark. When the projectile is fired from a very far distance or it doesn't move very fast, the amount of time it requires will change indefinitely.

Anachron said:
Well, if you change the model you see that it's the models fault.



Well I was testing it with a whole bunch of different settings (as you should have been) but here, here's a picture with buffed up projectiles so you can clearly see the pitch rotation is messy. If you re-create this, you'll also notice that projectiles have a twitch in their pitch angle.
 
Though you don't always know how much time will be required for the missile to hit it's mark. When the projectile is fired from a very far distance or it doesn't move very fast, the amount of time it requires will change indefinitely.
Yes, so you set the decay to zero for that missile type.

Well I was testing it with a whole bunch of different settings (as you should have been) but here, here's a picture with buffed up projectiles so you can clearly see the pitch rotation is messy. If you re-create this, you'll also notice that projectiles have a twitch in their pitch angle.
I don't see how that is wrong? I take every locations xy into account. Maybe that's my mistake?
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Anachron said:
Yes, so you set the decay to zero for that missile type.

Okay, good, so you've got 0 as a sentinel for indefinite. That's how it should be.

Anachron said:
I take every locations xy into account. Maybe that's my mistake?

I don't see what the location X/Y has to do with anything, this is strictly a problem with the pitch of the unit. Also, what do you mean "maybe it's your mistake"? Last time I checked you were the author of CustomMissile, so I don't see how it could be anybody else' mistake.

Anachron said:
I don't see how that is wrong?

Okay, so then have you ever seen an object move through the air? If you fire an arrow it doesn't face downwards while going up. It faces the direction that it is moving. In the picture I posted above it is blatantly obvious that the projectile's pitch is being calculated wrong, as the projectile is at the very beginning of it's projection yet it's facing downwards. It might as well be facing backwards, too.

I took the time out to review your system, and within 10 minutes I found major mechanical problems that would result in the complete failure of a projectile. To this you've responded with "oh well maybe I'll fix it in the update" and then suggested that possibly, at some point in time as if it were by magical occurrence you made a mistake. Now you're failing to realize that a projectile that faces a different direction from where it is fired is physically impossible.

I really don't know what everybody else sees in this. I've dedicated some time to trying to help you and you've done nothing but ignore and dismiss what I've presented as if it isn't relevant. I'm amazed at how many people credit this system, though I doubt a whole lot of them actually use it since it's obvious that nobody has come across problems that I've found in 5 minutes.

Whatever, then, you can play with your own system and do things how you want to do them, and then convince yourself that it's the right way so that you don't have to do any real work. Good luck.
 
I don't see what the location X/Y has to do with anything, this is strictly a problem with the pitch of the unit. If the above picture looks perfectly normal to you, then don't concern yourself with it.
Yes, and I am calculating the pitch with taking the start and aim vectors into account.
Maybe that's the problem. I see that it looks wrong. Have you tried less zArc?
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I haven't tried anything, other than testing out some projectiles with various settings. The pitch-rotation always seemed to be weird. Either way I've given you like 3 screen-shots and lengthy explanations of the problems, you'd think you would at least know what the problem is by now.

Anachron said:
calculating the pitch with taking the start and aim vectors into account.

I thought this was easy to use. I opened up your map, tested it, and changed a bit of data here and there to make sure everything worked under more extreme circumstances. The first thing I noticed (on your "ideal" situation projectiles) was that the pitch was off.

I then posted here, and you're telling me that you don't see anything wrong. Or you were.
 
I don't see what the location X/Y has to do with anything, this is strictly a problem with the pitch of the unit. Also, what do you mean "maybe it's your mistake"? Last time I checked you were the author of CustomMissile, so I don't see how it could be anybody else' mistake.
I was tyring to say maybe THAT'S my mistake, like maybe that's the thing I am doing wrong.

Okay, so then have you ever seen an object move through the air? If you fire an arrow it doesn't face downwards while going up. It faces the direction that it is moving. In the picture I posted above it is blatantly obvious that the projectile's pitch is being calculated wrong, as the projectile is at the very beginning of it's projection yet it's facing downwards. It might as well be facing backwards, too.
Well, I haven't seen anything wrong in the new version, so I guess I already fixed it. Sorry for any annoyance this version gives.

I took the time out to review your system, and within 10 minutes I found major mechanical problems that would result in the complete failure of a projectile.
None were a complete failure, more optimal issues which I already solved.

To this you've responded with "oh well maybe I'll fix it in the update" and then suggested that possibly, at some point in time as if it were by magical occurrence you made a mistake. Now you're failing to realize that a projectile that faces a different direction from where it is fired is physically impossible.
What? It isn't. You can change the start point at any time.

I really don't know what everybody else sees in this. I've dedicated some time to trying to help you and you've done nothing but ignore and dismiss what I've presented as if it isn't relevant. I'm amazed at how many people credit this system, though I doubt a whole lot of them actually use it since it's obvious that nobody has come across problems that I've found in 5 minutes.
I guess you are just not understanding how to use the system then?

Whatever, then, you can play with your own system and do things how you want to do them, and then convince yourself that it's the right way so that you don't have to do any real work. Good luck.
... Seriously, what the fuck do you want to tell me with that?

I haven't tried anything, other than testing out some projectiles with various settings. The pitch-rotation always seemed to be weird. Either way I've given you like 3 screen-shots and lengthy explanations of the problems, you'd think you would at least know what the problem is by now.
Well, not really, since the new version has some really big core updates.

I thought this was easy to use. I opened up your map, tested it, and changed a bit of data here and there to make sure everything worked under more extreme circumstances. The first thing I noticed (on your "ideal" situation projectiles) was that the pitch was off.
I said everything is optional and that is how it should be.

I then posted here, and you're telling me that you don't see anything wrong. Or you were.
Well, because you don't believe that I am still improving this system and already did a lot of work, here is the pastebin preview of the new version. I guess that one should be more safe, faster and with less bugs. (Please note, other bugs can occur, since I haven't tested it fully yet)

Paralyzing Shot (Testspell for new engine)

(Check out ParalyzingShot and negate the static if to see a line shot, I did this only so you can see everything is going well)
(And no, I haven't finished rain of arrows yet)
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
The problem with the pitch could also be the unit you are using. Check to make sure it's maximum pitch/roll angles are all 0.00 so you don't have any unwanted rotation. In the new map you posted there doesn't seem to be this problem.

Anachron said:
Well, because you don't believe that I am still improving this system and already did a lot of work, here is the pastebin preview of the new version.

It's not that I fear you're not doing any work on the system, it's that the actual work you put into the system is all under your own pretenses. I mean, you've gone through over 25 versions now and there are still problems with fundamental missile mechanics. I highly doubt that even in the next 10 versions you're going to sort it out. You seem to be adding more and more bull onto a poor foundation.

Anachron said:
I was tyring to say maybe THAT'S my mistake, like maybe that's the thing I am doing wrong.

Anachron said:
I don't see how that is wrong?

When it was quite obviously wrong, you "failing" to see how it is incorrect and then saying "maybe that's my mistake" sounds like you're completely discarding the evidence that I presented you, but that's not the point. It seems like the pitch-rotation has been fixed.

Anachron said:
None were a complete failure, more optimal issues which I already solved.

Reduce the "hit-range" value to something low. When you've got a moving target it really screws things up.

Anachron said:
I said everything is optional and that is how it should be.

Well my point is that either your system is flawed or your test map is really poorly put together. I was using your preset values when I discovered error, and after 20-some versions I really didn't expect to encounter bugs that quickly. Also, you have to ask, if I'm encountering bugs so quickly then how can anybody be sure that this system truly is bug-free, especially when you keep piling more features on without ensuring the stability of fundamental features.

Anachron said:
I guess you are just not understanding how to use the system then?

Are you serious? I made my own projectiles system that is more stable than this one and you're telling me that I don't know what I'm doing? I'm sorry but after finding various bugs within 5 minutes you are in no place to say that I am the one who doesn't know what he's doing. I am not the one who releases bug fixes every version because I can't comprehend what it is I'm doing, and I do things properly the first time.

Though, I did have some time to review TriggerHappy's review of this system. I absolutely love how you take his comment about all your globals having the same prefix and then immediately threw it at me in my own thread.

Review said:
I have tested the system and the demo map is really lacking.
If you want to show people the power of your system include some really awesome eyecandy examples.

You still haven't done shit all to improve the demo-map, either, yet you've been nagging at him to review this again for months. Not only does the demo-map have absolutely no eye candy but none of the projectiles created test the integrity of the system. They're all really, really basic cookie-cutter projectiles that have extremely poor limitations, such as only being able to last 6 seconds before immediately dying. Everything is easier when the environment is completely controlled, which is why I give the user the option to use nearly every feature of mine in as simple an action as a right-click.

You don't display any methods of projectile enumeration, though you say it is possible. I like how you also use my idea for grouping projectiles (which you implemented long after me), but I'm not going to whine about you taking my ideas as you already did that with the interface handler.
 
Last edited:
Level 18
Joined
Jan 21, 2006
Messages
2,552
Yea, I noticed that. If you even look in the test-map that I've got submitted in my system that is a problem (though it's fixed now) because until recent I haven't looked at my submission (and it's taking forever to be approved). But now that I went through I noticed that my pitch/roll maximums were at 10, and it was causing my projectiles to shiver when moving over steep terrain changes.

Hm. Everything I've said in the past couple of posts has seemed a lot more harsh then it was when I typed it.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Anachron said:
I don't get what you mean by break?

I don't know. I'm starting to think that maybe this system just has a different type of projectile in mind than what I would consider a Warcraft III projectile.

Anachron said:
Every stupid time? So everytime I add a speed feature I would have to put that into the formula? What a waste of processor speed. I don't see how distance checks are a bad decision.

I don't see how you can tell me that a simple division is a waste of processor speed while you use function calls for all of your location operations, which are way slower. Leads me to believe that you're only trying to disagree with me to save yourself some trouble, because you truly don't understand what you're doing.

Anachron said:
Why should I always calculate the remaining time if I can just check the distance?

Because the distance is 2 (or 3) dimensional, while time is only one. There is less room for error.

Anachron said:
Wrong, you think it is easy to calculate the time and all that shit but actually there is no way to 100% calculate the remaining time

In many cases calculating the time is not easy, but to be frank I do it very well in my own system and you're trying to tell me that it doesn't work. Not only is my system more efficient than yours, it also uses time as I have tried to explain to you how to do.

Also, if you think that there is absolutely no way to calculate time then you truly don't understand physics or mathematics.

Anachron said:
There would be the possibility to calculate the speed every single run but that would be really a waste of calculations.

First of all, the velocity doesn't have to be calculated on each iteration. It only has to be calculated when it is changed. Second of all, you don't even need to calculate it since you can quite easily store the value in the struct and update it whenever the user changes it.

Anachron said:
I mean it works pretty good at it is now, so what about it?

Except you've still got the bugs that I've mentioned above. Your system still breaks quite easily, it shouldn't take a mathematician to use your system without error, and currently the system's stability is based on the user's ability to calculate what all of their values are going to result in.

Anachron said:
You don't have so many features so don't tell me you know how you have to do things, because you are not into my system

At least I know how to control my projectiles. You clearly don't.

Anachron said:
You think well yes, then I'll add this, and this, and this to the calculation. But that will only make it even slower

You have absolutely no idea what you're talking about.

Anachron said:
I try to use one thing which will also be useable in the future, while time is not reliable, distance always is.

Are you like, really stupid or something? I've just given you example after example of instances where your "distance" check will bug, and you continue to refuse my evidence. As I said already, 3 fucking times, distance is based on multiple dimensions while time is only based on one. Why would you use many variables to calculate when the projectile has reached it's target when you only need a single one.

Fuck man I thought that you knew what you were doing, but it's clear you really don't understand a single fucking thing about what you are doing. You're taking all of the easier roads because you don't understand the mathematics behind your actions, instead you just pile a whole fuck-ton of data into a struct and then send the projectile on it's way without any control over whether or not the projectile will do what it is supposed to.

This system should be Graveyarded. You continue to remain ignorant to factual evidence, and so far it seems like the only reason you've found to disagree with me is that your system has more features than mine. I can open your test-map and within a couple of minutes get some values that completely break your system. In fact, I could do it in even less than that. I'd like to see you do the same with mine.
 
Because the distance is 2 (or 3) dimensional, while time is only one. There is less room for error.
Well, but distance is not so complicated as time is.

In many cases calculating the time is not easy, but to be frank I do it very well in my own system and you're trying to tell me that it doesn't work. Not only is my system more efficient than yours, it also uses time as I have tried to explain to you how to do.

Also, if you think that there is absolutely no way to calculate time then you truly don't understand physics or mathematics.
There is a way but it's bad because I'll have to correct the formula everytime I change something on CustomMissile.

Except you've still got the bugs that I've mentioned above. Your system still breaks quite easily, it shouldn't take a mathematician to use your system without error, and currently the system's stability is based on the user's ability to calculate what all of their values are going to result in.
Well not really, I am just forcing them to use proper values which make sense.

At least I know how to control my projectiles. You clearly don't.
Of course I do, but I also want the user to have their free area so it's getting harder as your script. (Because you force the user to create his own framework to do things such as onLoop etc)

Are you like, really stupid or something? I've just given you example after example of instances where your "distance" check will bug, and you continue to refuse my evidence. As I said already, 3 fucking times, distance is based on multiple dimensions while time is only based on one. Why would you use many variables to calculate when the projectile has reached it's target when you only need a single one.

Fuck man I thought that you knew what you were doing, but it's clear you really don't understand a single fucking thing about what you are doing. You're taking all of the easier roads because you don't understand the mathematics behind your actions, instead you just pile a whole fuck-ton of data into a struct and then send the projectile on it's way without any control over whether or not the projectile will do what it is supposed to.
Yes, absolutely. That is what it's supposed to be. A framework where you can do whatever you want with missiles, they don't need to hit or so, you can just create them and shoot them somewhere else.

This system should be Graveyarded. You continue to remain ignorant to factual evidence, and so far it seems like the only reason you've found to disagree with me is that your system has more features than mine. I can open your test-map and within a couple of minutes get some values that completely break your system. In fact, I could do it in even less than that. I'd like to see you do the same with mine.
1st. We clearly have another sense of what is useful and what not. Your system does not seem useful for me, because the user has to do all the shit which you could easily do.
2nd. I have not put any valid value thing into it because this is not finished.
3rd. The only thing you are currently complaining about is how the distance thing is done, right? Well that is my way in doing the collide check, and I am pretty sure it allows users to do tons more things than with your one.
4th. If you can't stop harassing I will merge your posts into a single one with the only fragments that actually are helpful, because in most of the sentences you seem to make this system and/or me bad, which I can not really understand. Why is it so hard to tell:
"The pitch function seems to be broken, you should check it.
I did the following: blargh"
But instead you talk about 3 long posts how bad it is that I release features to test them, dude seriously, cool down.

5th. Just because you don't like the way I make programs does not mean it's wrong. In fact my engine is used by tons of more people because it actually is useful, because I do not force the user to use a feature.

6th. I will easily break your engine by just trying to remove the zArc temporary in flight, it is impossible with your system. Don't tell me your system is any more stable than mine.

7th. If you are still trying to defend your points without seeing my arguments, there clearly is no way to make a proper discussion with you just by using relevant arguments.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Anachron said:
Well, but distance is not so complicated as time is.

It's more complicated but the results are more accurate. Do you think Calculus would have been invented if Newton said, "well, addition is not so complicated".

Anachron said:
Well not really, I am just forcing them to use proper values which make sense.

No, you're forcing them to do the math that your system should be doing.

Anachron said:
Of course I do, but I also want the user to have their free area so it's getting harder as your script. (Because you force the user to create his own framework to do things such as onLoop etc)

Not allowing the user to reference the timer iteration is not forcing him to create his own framework. The only thing is forces them to do is use their own timer, that is not a framework. I suggest you look up the definitions of words before throwing them around.

Anachron said:
because the user has to do all the shit which you could easily do.

It's not "easily" done, as you've even said yourself. None of your extra features that you consider "easily done" are even done properly. You can't just throw data into a struct and call that a feature.

Anachron said:
Yes, absolutely. That is what it's supposed to be. A framework where you can do whatever you want with missiles, they don't need to hit or so, you can just create them and shoot them somewhere else.

Exactly, you have no control over your projectiles. It's entirely up to the user to determine whether the system works or not.

Anachron said:
The only thing you are currently complaining about is how the distance thing is done, right? Well that is my way in doing the collide check, and I am pretty sure it allows users to do tons more things than with your one.

Such as break the functionality of their projectiles.

Anachron said:
If you can't stop harassing I will merge your posts into a single one with the only fragments that actually are helpful, because in most of the sentences you seem to make this system and/or me bad, which I can not really understand. Why is it so hard to tell:

First you tell me that distance is better than time, then you tell me that time is more complex which is why you're not using it. If you can't produce the mathematical support necessary to make your projectiles work properly, then your system is bad.

Anachron said:
But instead you talk about 3 long posts how bad it is that I release features to test them, dude seriously, cool down.

As I was replying to your thread I was testing out the capabilities of this system. The only feature that I noticed you provided was the ability to make projectiles dysfunctional.

Anachron said:
n fact my engine is used by tons of more people because it actually is useful, because I do not force the user to use a feature.

I find it hard to believe there is as much activity with this system as you say there is based on the fact that I barely scratched the surface of your system's problems within 5 minutes of testing it. If you have so many users using it then why is it that these fundamental problems still exist?

It's either because there aren't nearly as many using it as you think there are, or your ability to produce functional code is lacking.

Anachron said:
I will easily break your engine by just trying to remove the zArc temporary in flight, it is impossible with your system. Don't tell me your system is any more stable than mine.

Anachron said:
it is impossible with your system

Lmao. You just contradicted yourself in the same sentence.

Anachron said:
Don't tell me your system is any more stable than mine.

Why? You're the one telling me that it's impossible.

Anachron said:
If you are still trying to defend your points without seeing my arguments, there clearly is no way to make a proper discussion with you just by using relevant arguments.

What do you mean, "defend my points". I don't have to defend facts. If you're still choosing to be ignorant then, as you said, "there clearly is no way to make a proper discussion with you just by using relevant arguments".
 
It's more complicated but the results are more accurate. Do you think Calculus would have been invented if Newton said, "well, addition is not so complicated".
Not really. You can't make a missile that has no aim with your timer system.

No, you're forcing them to do the math that your system should be doing.
As for now, yes, I am forcing them to input proper values. That is not really math, everybody that can use the object editor can use my missile engine.

Not allowing the user to reference the timer iteration is not forcing him to create his own framework. The only thing is forces them to do is use their own timer, that is not a framework. I suggest you look up the definitions of words before throwing them around.
I suggest staying at the main topic before writing any more sentence.

It's not "easily" done, as you've even said yourself. None of your extra features that you consider "easily done" are even done properly. You can't just throw data into a struct and call that a feature.
I didn't, and I did tons of system changings to include the features.

Exactly, you have no control over your projectiles. It's entirely up to the user to determine whether the system works or not.
Not about if it works nor not, but more HOW it works.

Such as break the functionality of their projectiles.
None did ever break the functionality.

First you tell me that distance is better than time, then you tell me that time is more complex which is why you're not using it. If you can't produce the mathematical support necessary to make your projectiles work properly, then your system is bad.
I am just not liking time, is that that hard to understand? Just get it.

As I was replying to your thread I was testing out the capabilities of this system. The only feature that I noticed you provided was the ability to make projectiles dysfunctional.
Stupid values bring stupid results. Even your engine will break if I insert some stupid things into it. But since you have rarely anything for the user to test, you can tell that it works, because it nearly does have no functionality.

I find it hard to believe there is as much activity with this system as you say there is based on the fact that I barely scratched the surface of your system's problems within 5 minutes of testing it. If you have so many users using it then why is it that these fundamental problems still exist?
It's either because there aren't nearly as many using it as you think there are, or your ability to produce functional code is lacking.
It's because you are doing it wrong.

Lmao. You just contradicted yourself in the same sentence.
Why? You're the one telling me that it's impossible.
Nope, the last part belonged to the "removing the zArc while flying", learn to read.

What do you mean, "defend my points". I don't have to defend facts. If you're still choosing to be ignorant then, as you said, "there clearly is no way to make a proper discussion with you just by using relevant arguments".
You are only trying to say why your system is so great whatever, without even looking what I have to argue.

You don't know anything of this system, and since you don't want to, I think you really shouldn't post anything more, not that I don't like feedback, most of your feedback just isn't helpful in any way.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Anachron said:
Not really. You can't make a missile that has no aim with your timer system.

Well you can, but you have to know what you're doing. You can't just send random missiles on their way, but you can improvise and make it look like they have no target when they really do. This is a much better work-around than having all of your projectiles as mindlessly moving units.

Anachron said:
As for now, yes, I am forcing them to input proper values.

Stop trying to use words like "proper values" to save your pride. You force the users to do the math themselves because your system is unstable. This has nothing to do with "proper values". An improper value is a string when a real is required, not 5 when 3 is ideal.

Anachron said:
That is not really math, everybody that can use the object editor can use my missile engine

Yes, that is math. Anybody can choose random numbers but those random numbers won't always work. Mathematics is required to ensure the numbers chosen do work.

Anachron said:
Not allowing the user to reference the timer iteration is not forcing him to create his own framework. The only thing is forces them to do is use their own timer, that is not a framework. I suggest you look up the definitions of words before throwing them around.

I suggest staying at the main topic before writing any more sentence.

What? I was answering a topic that you brought up and now you're telling me to stay on topic? If you want to stay on topic then don't bring up irrelevant information. God man you're not too bright.

Anachron said:
I didn't, and I did tons of system changings to include the features.

Coming from the same guy who won't use time because the mathematics is too complex, I have a hard time seeing what complex changes you could have possibly incorporated that "enabled" these amazing features that don't work without strict values.

Just to clear things up, too, I'm not talking about giving a projectile 30000 speed and seeing whether or not it will break, I'm talking about precise mathematical situations where common problems can arise due to the incoherency of your calculations.

Anachron said:
Not about if it works nor not, but more HOW it works.

Exactly. Nobody cares about how many features you have it's about how stable those features are. Well, nobody with half a brain anyway.

Anachron said:
I am just not liking time, is that that hard to understand? Just get it.

Do you really expect me to believe that? If you could use time and have absolute accuracy you would, you just don't understand the math behind it and you don't want to do the work that would be required to use a more accurate method of target-detection.

Anachron said:
Stupid values bring stupid results. Even your engine will break if I insert some stupid things into it.

Please provide some examples instead of just pulling things out of your ass to throw at me. Monkey-boy.

Anachron said:
But since you have rarely anything for the user to test, you can tell that it works, because it nearly does have no functionality

I don't really know what you're trying to say here. You haven't provided any examples or situations where my system breaks, as I have for you, so I'll assume you mean that you couldn't actually find anything to present.

because it nearly does have no functionality

This sentence makes about as much sense as your argument as a whole.

Anachron said:
It's because you are doing it wrong.

Since when is the malfunction of a system the user's fault?

Anachron said:
Nope, the last part belonged to the "removing the zArc while flying", learn to read.

You tell me that it's easy to break my system, and then you follow up by saying, quite simply, that you can't. In fact you use the word "impossible".

I like how you're telling me to learn how to read after a sentence like this one:

because it nearly does have no functionality.

Learn how to write a proper sentence, and perhaps some properly functioning code to. Then get back to me.

Anachron said:
You are only trying to say why your system is so great whatever, without even looking what I have to argue.

What are you talking about? I've picked absolutely every inch of your arguments apart and revealed how much bullshit that you produce. Not only that but you haven't actually provided a single fact, screen-shot, or example to back up any of your arguments.

Also, I am not trying to say "how great my system is" I am trying to show you how much error you have in yours. This isn't about me. It's about you, and this system. That's why we're in this thread. I found problems with your system, and since I happen to have a projectiles system I thought I'd help you out, but you're too bloody arrogant and ignorant to learn from people who actually know what they're doing.

Anachron said:
You don't know anything of this system, and since you don't want to, I think you really shouldn't post anything more, not that I don't like feedback, most of your feedback just isn't helpful in any way.

What do you mean, I don't know anything about this system? Last time I checked you were coming to my submission thread asking me why your event handler (the idea of which you stole from me) did not work.
 
What do you mean, I don't know anything about this system? Last time I checked you were coming to my submission thread asking me why your event handler (the idea of which you stole from me) did not work.
Holy crap, you call it stealing when I use the eventhandler xe has? Yes, I based my system on xe, as already said. And using great features isn't stealing anything. Everybody uses inheritance and eventhandlers in such situations.

Well you can, but you have to know what you're doing. You can't just send random missiles on their way, but you can improvise and make it look like they have no target when they really do. This is a much better work-around than having all of your projectiles as mindlessly moving units.
I rather give the user the easily possibility to make mindless missiles as to force him to do a workaround for such common things.

Do you really expect me to believe that? If you could use time and have absolute accuracy you would, you just don't understand the math behind it and you don't want to do the work that would be required to use a more accurate method of target-detection.
Time is never accurate in a system with changing values. It is just to useless to update the time every few ms so I can just stick with my 3 dimension check.

I don't really know what you're trying to say here. You haven't provided any examples or situations where my system breaks, as I have for you, so I'll assume you mean that you couldn't actually find anything to present.
Talking about your system:
Why the hell do you force the user to use the arc everytime or not to use it? Can't a user say, let's change it while flying?
And to be even more specific: Your system does only do the basics, and disable features like targetless flying and such things.
Making a workaround just to create a flight with no aim is one of the stupidest things to show the users how easy your system is to use.

Learn how to write a proper sentence, and perhaps some properly functioning code to. Then get back to me.
Learn how not to be arrogant.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
Anachron said:
Holy crap, you call it stealing when I use the eventhandler xe has?

Alright, fair enough; you didn't steal it. That is besides the point.

Anachron said:
Yes, I based my system on xe, as already said. And using great features isn't stealing anything. Everybody uses inheritance and eventhandlers in such situations.

Berbanog, this is maybe offtopic, but why does your eventHandler work and mine not? I have it exactly like yours now, but I get a parse error. (JassHelper wants to have the methods that take something in the parent struct). Why?

"I have it exactly the same as yours now".

Enough said.

Anachron said:
I rather give the user the easily possibility to make mindless missiles as to force him to do a workaround for such common things.

Since when is having a projectile with absolutely no target common? Keep in mind that no target means an instant action that creates a projectile at random and launches it in no particular direction.

Anachron said:
Time is never accurate in a system with changing values.

Clearly uneducated.

Anachron said:
Why the hell do you force the user to use the arc everytime or not to use it? Can't a user say, let's change it while flying?

Since when can the "arc" of a projectile change after it has been set in motion? If I wanted to allow the user to change the arc of the projectile it would be as simple as making the readonly declaration public instead, but I choose not to allow users to do that because it's not normal. I tried to base my system off of plausible events, not magic.

Anachron said:
And to be even more specific: Your system does only do the basics, and disable features like targetless flying and such things.

Okay, but it works all the time. All values are acceptable.

Anachron said:
Making a workaround just to create a flight with no aim is one of the stupidest things to show the users how easy your system is to use.

And what exactly is the Cosine of "no particular direction"? And the Sine? In order for there to be motion there needs to be a specified direction. If there is direction, then there is a target.

Anachron said:
Learn how not to be arrogant.

Nope, the last part belonged to the "removing the zArc while flying", learn to read.

That isn't arrogant. You told me to learn how to read after composing a sentence that didn't make any sense, and now you're calling me arrogant.
 
"I have it exactly the same as yours now".

Enough said.
Offtopic.

Since when is having a projectile with absolutely no target common? Keep in mind that no target means an instant action that creates a projectile at random and launches it in no particular direction.
Well, it should be common (and it should be the default). I know a lot of spells which uses this. For example, DotA:
Jakiros breath, the pudge hook, Miranas arrow,...

Clearly uneducated.
Cleary differently educated as you.

Since when can the "arc" of a projectile change after it has been set in motion? If I wanted to allow the user to change the arc of the projectile it would be as simple as making the readonly declaration public instead, but I choose not to allow users to do that because it's not normal. I tried to base my system off of plausible events, not magic.
So your system is plausible, mine is magic. (Because in mine you can do that and it will work properly)

Okay, but it works all the time. All values are acceptable.
It isn't hard to make a system working when it nearly has nothing to pass to.

And what exactly is the Cosine of "no particular direction"? And the Sine? In order for there to be motion there needs to be a specified direction. If there is direction, then there is a target.
Randomness does not have any direction.

That isn't arrogant. You told me to learn how to read after composing a sentence that didn't make any sense, and now you're calling me arrogant.
I will easily break your engine by just trying to remove the zArc temporary in flight, it is impossible with your system.
It made sense, you called me an idiot if I believe in what I said.
Originally the "it is impossible with your system" belongs to the "remove the zArc temporary in flight". That is why I told you to read it again.
 
Level 22
Joined
Dec 31, 2006
Messages
2,216
Guys, stop this.
I'm deleting your posts (not permanently though, they will still be stored on the hive if it so happens you both want the posts to be here).

Keep it friendly!

Edit: Okay, I've deleted some of your posts. The others seem to be helpful.


Edit: Bah, on seconds thoughts, I've restored them, BUT KEEP IT FRIENDLY. Things like "you obviously don't know what you're doing" and similar will NOT be tolerated.
 
Last edited:
Level 7
Joined
Jun 6, 2010
Messages
224
I see quite a lot of positive comments
This is indeed a nice work but let me be harsh for a couple of lines

JASS:
public method isUnitHit takes unit u returns boolean
            return IsUnitInGroup(u, .enumGroup)
        endmethod
        
        public method hitUnit takes unit u returns nothing
            call GroupAddUnit(.enumGroup, u)
        endmethod
        
        public method unhitUnit takes unit u returns nothing
            call GroupRemoveUnit(.enumGroup, u)
        endmethod
Why?Because you don't want the mods to think your script isnt pretty?

• Also did you notice that this DOESN'T compile? You should point out that users need a more recent or older version of their JNGP so they can use the same version with you.
[library CustomMissile requires CustomEffect, Loc, GroupUtils, optional MissileGroup]
[Missing Requirements:Optional(Libraries cannot require scopes)] Although missilegroup is not even a scope.

• Everyone in the hive except gui users which is inevitable for them hates BJ's (well most of the BJ's) and is against them. Why shouldn't i a big BJ Hater hate this huge BJ?
If you want to state i'm wrong and this is not a BJ then go compile your map, substract your map script and see a 200+ kb script full of arrays, functions that call hundreds of functions and such.


This is a good system BUT not for a big map or AOS type map that uses a lot of code within it. It will definetly ruin the performance of the map.
Think of 100 units using your projectile system simultaneusly and another 7000+ handles running from the map's core.
The only thing you can do to improve your performance is to stop using your library for locations and starting using X,Y. It's faster, safier and lagless.

Don't go all rage on me after this. I'm pointing some good statements here with a friendly approach.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
These sorts of things have already been discussed in the pages of arguments between me and Anachron; he claims that it is more simple, or makes it more efficient, or something along those lines. Read up.
 
This is a good system BUT not for a big map or AOS type map that uses a lot of code within it. It will definetly ruin the performance of the map.
Think of 100 units using your projectile system simultaneusly and another 7000+ handles running from the map's core.
The only thing you can do to improve your performance is to stop using your library for locations and starting using X,Y. It's faster, safier and lagless.

Don't go all rage on me after this. I'm pointing some good statements here with a friendly approach.
Did you even read my script? I never use locations. (Only GetLocationZ())

Everyone in the hive except gui users which is inevitable for them hates BJ's (well most of the BJ's) and is against them. Why shouldn't i a big BJ Hater hate this huge BJ?
If you want to state i'm wrong and this is not a BJ then go compile your map, substract your map script and see a 200+ kb script full of arrays, functions that call hundreds of functions and such.
Its not even 100kb with a testmap, so dude, calm down.

Also did you notice that this DOESN'T compile? You should point out that users need a more recent or older version of their JNGP so they can use the same version with you.
[library CustomMissile requires CustomEffect, Loc, GroupUtils, optional MissileGroup]
[Missing Requirements:Optional(Libraries cannot require scopes)] Although missilegroup is not even a scope.
You just have to use the latest JassNewGenPack version, which is a must for all hiveworkshop spells.

I see quite a lot of positive comments
This is indeed a nice work but let me be harsh for a couple of lines.
Why?
Because I don't want the user to be able to touch .enumGroup but that he can still hit his own units that he wants to be targeted.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
I don't think you really know what you're talking about to be honest. You're running both of our systems worse than my desktop that's 7 years old, indicating you either are trying to test these when your processor is already booked up or you just don't know what you're doing.

Personally I don't know what right you have coming in here (you're obviously new, you joined 2010) to a community of people who have been doing this for years and telling us that we don't know how to do things properly.
 
Level 7
Joined
Jun 6, 2010
Messages
224
I don't think you really know what you're talking about to be honest. You're running both of our systems worse than my desktop that's 7 years old, indicating you either are trying to test these when your processor is already booked up or you just don't know what you're doing.

Personally I don't know what right you have coming in here (you're obviously new, you joined 2010) to a community of people who have been doing this for years and telling us that we don't know how to do things properly.

No Mr.experience sir, i'm opening your eyes.
And maybe i was around this community long before you even had a glimpse of it.

Then explain to me again. How come Archons system work faster than yours? Is it my rotting laptop' fault? As i stated his runs at 40-45 fps, yours barely ran at 20fps.

DotA Runs at 63 fps the whole time. No sir, you need a better angle of view of yourself.
 
Level 18
Joined
Jan 21, 2006
Messages
2,552
And maybe i was around this community long before you even had a glimpse of it.

I highly doubt that. I bought the game when it came out, and have been modding it since.

Then explain to me again. How come Archons system work faster than yours? Is it my rotting laptop' fault? As i stated his runs at 40-45 fps, yours barely ran at 20fps.

I don't know what is wrong with your tests, but your outputs don't make any sense. This system is slower, and it is confirmed by people other than you. Clearly your methods of testing scripts are not adequate enough to be accurate. If you would kindly visit the Custom Projectiles thread to discuss it though that would be perfect. I've already prepared some facts and screen-shots for you.

DotA Runs at 63 fps the whole time. No sir, you need a better angle of view of yourself.

I'm not going to argue about this in Anachron's thread. Either PM me or discuss my projectile library in the actual thread for it.
 
Update. I have upgrades this system.

ChainMissile is now a new helper. You can make missiles that are chaining with it. SpellHelper makes it even easier and takes the default actions so that you only need a few lines to create an ChainMissile.


A very basic jump limited ChainSpell have I made with the following script:
JASS:
library ParalyzingChain requires SpellHelper

    struct ParalyzingChain extends SpellHelper
        private integer chainTimes = 0
        implement SpellHelper_Module
        implement ChainMissile_Module
        
        method onCreate takes nothing returns nothing
            set .sfx            = "Abilities\\Weapons\\SpiritOfVengeanceMissile\\SpiritOfVengeanceMissile.mdl"
            set .scale          = 0.55  //: 55% size
            
            set .turnSpeed      = 1.   //: Can turn 360° degrees in 0.15 seconds
            set .hitRange       = 100.  //: Hits units and missles in range of 100
            set .h              = 50.   //: Has a height of 50.
            set .hitsUnits      = true  //: Hits units
            
            set .moveSpeed      = 400.
            set .checkHeight    = false
            set .checkAimHeight = false
            set .autoSetZ       = false //: Don't correct my z-value please
            
            set .chainRange     = 500.  //: Jumps in a range of 250.
        endmethod
        
        method chainFilter takes unit theUnit returns boolean
            local boolean unitCheck = IsUnitEnemy(theUnit, GetOwningPlayer(.caster)) and GetUnitState(theUnit, UNIT_STATE_LIFE) > 0.405
        
            return unitCheck and .chainTimes < 2 + .lvl
        endmethod
        
        method onChainTargetReach takes unit theTarget returns nothing
            set .chainTimes = .chainTimes +1
            call UnitDamageTarget(.caster, theTarget, 100. + 25. * .lvl, false, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_MAGIC, WEAPON_TYPE_WHOKNOWS)
        endmethod
        
        private static method onInit takes nothing returns nothing
            set thistype.ABILITY_ID = 'plzc'
        endmethod
    endstruct
endlibrary

I made this version for Hives Battlefield. Please test this.
 

Attachments

  • CM_UP_v.0.5.0.w3x
    109.8 KB · Views: 83
Level 18
Joined
Jan 21, 2006
Messages
2,552
Are you sure you've got the right model unit for your dummy? If this works anything like mine then you probably need the special dummy to attach special effects to it. If you copied his dummy without importing the model then it will be as good as NULL, in which case the special effect will not be displayed.

Try making sure you've got the imported dummy (if there is one in the downloadable map).
 
Level 12
Joined
Oct 16, 2010
Messages
680
hey, am i the only one the SpellHelper works for only one ability?or at least one per unit
i tried out on the test map with the same script of that chain spell(except i changed the struct name...)
gave the new abil to mirana , and the same occurs
the first(the original) spell won't do anything and the second (copy of the original) will fire two projectiles(also changed the order id's,and the thistype.abilityid)
why is this?
 
This resource has been updated to 0.1.4:

New example is way shorter and shows the modularisation.
JASS:
library ParalyzingShot requires HomingMissile, MissileSpellHelper

    private struct dummyMissile extends HomingLocMissile
        implement MissileUnitHit
        implement MissileGroundHit
    endstruct

    private struct missile extends dummyMissile
        private static integer      ABILITY_ID  = 'plsh'
        private static integer      BUFF_ID     = 'pssl'
        private static string       BUFF_ORDER  = "slow"
        
        private effect e = null
        private unit caster = null
        private real dmg = 0.
        
        implement MissileCastHelper
        implement MissileBuffHelper
        implement MissileLocTargetHelper
        
        private static method onCast takes nothing returns nothing
            local   thistype    this        = thistype.create()
            local   unit        u           = GetTriggerUnit()
            local   Loc         target      = Loc.fromXY(GetSpellTargetX(), GetSpellTargetY())
            local   Loc         source      = Loc.fromUnit(u)
            local   integer     lvl         = GetUnitAbilityLevel(u, thistype.ABILITY_ID)
            local   real        face        = source.angleTo(target)
            
            set .caster = u
            set .dmg = 50 + lvl * 25
            
            call target.applyLoc(source)
            call target.moveFaced(2000., face)
            
            set source.z = GetLocZ(source.x, source.y) + 50.
            set target.z = GetLocZ(target.x, target.y) + 50.
            
            set source.f = face
            call .fire(source, target)
            call .createDummy(lvl)
        endmethod
        
        method onRegister takes nothing returns nothing
            set .owner              = GetOwningPlayer(.caster)
            
            set .sfx                = "Abilities\\Weapons\\MoonPriestessMissile\\MoonPriestessMissile.mdl"
            set .scale              = 0.55  //: 55% size
            
            set .moveSpeed          = 700.
            set .turnSpeed          = .15
            set .unitHitRange       = 100.
            set .height             = 50.
            set .offsetZ            = 50.
            set .locTargetHitRange  = 50.
        endmethod
        
        method onUnitHit takes unit theUnit returns boolean
            call UnitDamageTarget(.caster, theUnit, .dmg, false, false, ATTACK_TYPE_CHAOS, DAMAGE_TYPE_UNKNOWN, WEAPON_TYPE_WHOKNOWS)
            call .castDummy(theUnit)
            return TRUE
        endmethod
    endstruct

endlibrary

The new module system makes everything replaceable:
MissileLib.PNG
(Everything Except Missile is optional!)
I have put in some predefined missiles, like Unit and Location target missiles.

Please enjoy!

Edit:
I want an directors cut for this shit! :D
 
Level 2
Joined
May 4, 2009
Messages
11
Hey dude, i realize some lag when i am using your system, i order to continuous shot then system show this message:
Code:
Unable to allocate id for an object of type: Loc
Attempt to destroy null struct of type: Loc
Then i check your allocated Loc
JASS:
//
        private static method clearDummy takes nothing returns nothing
            local thistype this = thistype.SELF
            
            call BJDebugMsg(I2S(integer(.startLoc)) + ", " + I2S(integer(.locTarget)))

            call RemoveUnit(.dummy)
        endmethod

if i shot one by one after last one are finished and every thing is ok, message always show 7, 6 and 7, 6 (forexample, always small and recycled). If i continuous shot missiles those numbers increased 100 instances per second until a "Unable to allocate id..." message appear and kick my ass...

I try to find out where you are using Loc without destroy() and make that leaking? Maybe it come form MissileMovement, because above 100 instances allocated per second
JASS:
//
            local Loc curLoc = .loc.clone()//thistype.CUR_LOC
            local Loc nextLoc = .loc.clone()//thistype.NEXT_LOC
But you are already called destroy() at the end...
Now I want to use your system, but when we have alot of Hero using this system and then missiles will be shot more frequently, now i gonna blow up with this. Help plsssss :goblin_boom:
 
Last edited:
Level 8
Joined
Feb 3, 2013
Messages
277
ur missiles twirl in mid air if a target unit turns as well; it doesn't seem like much but its very odd from a visual perpsective - please fix the math when you have the chance

but other than that its pretty modifiable so gud :)
 
Last edited:
Currently the system is in a major rework to become Missile2.

A new module system will be used for building missiles in the future. Example follows:

JASS:
    struct FirstMissile extends Missile
        implement MissileCollideHit // Missile hits other MISSILES
        implement MissileUnitHit // Missile hits UNITS
        implement MissileGroundHit // Missile hits TERRAIN
        implement MissileDestHit // Missile hits DESTRUCTABLES
        
        implement MissileDecay // Missile will DECAY
        
        implement MissileMove // Missile can MOVE
        implement MissilePositionTarget // Missile has target POSITION
    endstruct

There will be helpers like these for easy implementation of spells:
JASS:
    module MissileCastHelper
        //public    static  integer     ABILITY_ID      = 0
        public  static  trigger     CAST_TRIG       = null
    
        private static method castCond takes nothing returns boolean
            return GetSpellAbilityId() == thistype.ABILITY_ID
        endmethod
        
        private static method onInit takes nothing returns nothing
            local integer i = 0
            
            set thistype.CAST_TRIG = CreateTrigger()
            
            call TriggerAddCondition(thistype.CAST_TRIG, Condition(function thistype.castCond))
            call TriggerAddAction(thistype.CAST_TRIG, function thistype.onCast)
            
            loop
                exitwhen i >= bj_MAX_PLAYER_SLOTS
                
                call TriggerRegisterPlayerUnitEvent(thistype.CAST_TRIG, Player(i), EVENT_PLAYER_UNIT_SPELL_CAST, null)
                set i = i +1
            endloop
        endmethod
    endmodule
    
    module MissileBuffHelper
        //public    static  integer     BUFF_ID         = 0
        //public    static  string      BUFF_ORDER      = ""
        public  unit    dummy       = null
        
        public method createDummy takes integer theLevel returns nothing
            set .dummy = CreateUnit(GetOwningPlayer(.toUnit()), EFFECT_UNIT_TYPE, .x, .y, 0.)
            call UnitAddAbility(.dummy, 'Aloc')
            call UnitAddAbility(.dummy, thistype.BUFF_ID)
            call SetUnitAbilityLevel(.dummy, thistype.BUFF_ID, theLevel)
        endmethod
        
        public method castDummy takes unit theUnit returns nothing
            call SetUnitX(.dummy, GetUnitX(theUnit))
            call SetUnitY(.dummy, GetUnitY(theUnit))
            call IssueTargetOrder(.dummy, thistype.BUFF_ORDER, theUnit)
        endmethod
        
        private static method clearDummy takes nothing returns nothing
            local thistype this = thistype.SELF
            call RemoveUnit(.dummy)
        endmethod
        
        private static method onInit takes nothing returns nothing
            call thistype.addCleanup(function thistype.clearDummy)
        endmethod
    endmodule

Why now? Why not. I have planned these updates for ages and I want to make a new minigame that features an updates missile engine that allows me to build cool missiles in a short amount of time.
 
Top