• 🏆 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!

Damage Detection System

Status
Not open for further replies.
Level 23
Joined
Apr 16, 2012
Messages
4,041
Sorry I should have said that.
(Mythic might remember those stress tests.)
I have ran some stress tests with a complete empty Damage Detection System where there are 2 units that attack each other and a third that gains a number of "this unit takes damage" events every second.
So after a while it has 70k events. Then it runs slow.

Of course that is only the events.
Then you also have to think about the other stuff that is in your map.
So with numbers and stress tests like these you can find out how long the re-initialize interval may be so it will never run slow.

There is a second performance thing that is when a unit is actualy attacked.
In the map I posted I have 50 - 250 units attacking each other every second.
It also displays how many (maybe that trigger is disabled and you have to enable it)
But I will run stress test on it as soon as it is finished...
I don't assume that my system will have the best performance but I at least want 2k events and 800 unit attacks per second.
If that is met then I can say it is not too cpu consuming to not use it.

not really good stress test, the lag you notice on all systems is because the numbers that you print want to be drawn even tho they are off screen, and so if you want to print quite a few K lines of text, it will start to lag immensly.

Return type declarations are broken anyways in JNGP. Its perfectly valid to write something like:

JASS:
function foo takes nothing returns nothing array
endfunction

// or

function foo takes nothing returns real integer damagetype
	return 1.0
endfunction

So the parser is quite broken here^^

Lol that is silly, I didnt know that is possible. But it is runnable, because JassHelper only keeps the first one
 
Level 14
Joined
Dec 12, 2012
Messages
1,007
Lol that is silly, I didnt know that is possible. But it is runnable, because JassHelper only keeps the first one

Yes, when I first found that bug I thought "cool, its possible to return integer array". Until I noticed that just everything after the first return type is omitted by JNGP and you could basically write anything there :D
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
btw what is a widget and what does it do?

EDIT: I guess noone wants to anser me that.

But anyway.
I admit that I am a very noob and dont know what some epic stuff actually does or how to optimize my code.
So I asked other people to test my DDS... Sounds lazy isn't it?
I uploaded the new version to this thread.
You can see the code in the thread or download the new version.

Version 1.4b
 
Last edited:
Status
Not open for further replies.
Top