HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

600 Spheres

09-25-2008, 04:55 PM#1
Toadcop
Ya 600 dynamicaly moving and colliding spheres =) // no i don't have a quad core CPU :P

here is the demo map. ©Toadcop xD loled...
Attached Files
File type: w3xXColl.w3x (56.9 KB)
09-25-2008, 05:04 PM#2
grim001
Oh, the food quantity is the number of balls, not "COUNT"

That is a lot of balls; it is almost as though each ball is executing almost no code per interval, which would explain why they bounce and collide in such an ugly way...

Here's my demo.
09-25-2008, 05:35 PM#3
emjlr3
i want to try this tonight when I get home, I bet I can't get mine above 75-85w/o massive fps drops, and that is with a damn good CPU and GPU
09-25-2008, 05:35 PM#4
Szythe
Mine dies out at around 50.

Edit: The food count is at 600, but the moving balls are at 50.

It's probably important to note also that when the food is at 600 and there are 0 moving balls, my framerate is still shit. And yes, I obviously did test it toadcop...
09-25-2008, 05:37 PM#5
Toadcop
n/c ...

test before post something =)

Quote:
my framerate is still shit
obviously your GPU is shit cause it can't handle the rendereing of units well. or some other issues do you want to see the code what happens if the "count" is 0 ? =)

grim001
well you demo is slow ~35 fps.

Quote:
which would explain why they bounce and collide in such an ugly way...
it's because balls are random generated. and some other stuff at which your system would fail =)
09-25-2008, 06:16 PM#6
grim001
Quote:
Originally Posted by Litany
Is it just me or is your map empty?
You should run it.

Quote:
Originally Posted by Toadcop
grim001
well you demo is slow ~35 fps.
Sorry but you have the worst computer ever if you are having framerate issues.

Quote:
Originally Posted by Toadcop
it's because balls are random generated. and some other stuff at which your system would fail =)
I generate random balls that actually work correctly.
The "other stuff" is the fact that your collision and bouncing are so flawed that they are useless.
09-25-2008, 06:25 PM#7
Dark.Revenant
What I want to know is... WHY? Why would you want 500 balls in a map?

Anyway, my partially-GUI physics system can't do 500 balls playably but it can do a more reasonable amount, like about 100 or so.
09-25-2008, 09:20 PM#8
Rising_Dusk
I think he may compile jasshelper and other stuff externally to the WE. I had similar problems running Vex's hero contest 2 entry.
09-25-2008, 09:38 PM#9
Bobo_The_Kodo
Sure 600 balls can be present without moving at full fps for me, but it starts dropping when the moving amount is around 50...
09-25-2008, 09:40 PM#10
Toadcop
Quote:
Tried to, but I run everything from the WE, so "not all player starting locations have been placed" -> no trigger data -> dead map.
omfg it's so hard to take a mpq tool and view the map and see wat it doesnt have wct and wtg files ? and war3map.j is "optimized" with vex optimizer...

war3map.j ->
Collapse JASS:
function Nr takes nothing returns boolean
set Xv=GetUnitUserData(GetFilterUnit())
if Xv!=0 and Ve[Xv]!=Ve[Ev]and not IsUnitInGroup(Ve[Xv],Ee[Ev])then
call GroupAddUnit(Ee[Xv],Ve[Ev])
set jv=false
set Ov=Xe[Ev]
set Rv=Oe[Ev]
set Iv=Xe[Xv]
set Av=Oe[Xv]
set Gv=le[Ev]+le[Xv]
set hv=Le[Ev]
set Hv=Le[Xv]
set Nv=Mx[Ov]-Mx[Iv]
set bv=px[Ov]-px[Iv]
set Bv=Px[Ov]-Px[Iv]
set cv=Mx[Rv]-Mx[Av]
set Cv=px[Rv]-px[Av]
set dv=Px[Rv]-Px[Av]
if Nv*Nv+bv*bv+Bv*Bv<(Gv-D)*(Gv-D)then
set Dv=SquareRoot(Nv*Nv+bv*bv+Bv*Bv)+.001
set fv=(Dv-Gv)/(Dv*(hv+Hv))
set Mx[Ov]=Mx[Ov]-Hv*Nv*fv
set px[Ov]=px[Ov]-Hv*bv*fv
set Px[Ov]=Px[Ov]-Hv*Bv*fv
set Mx[Iv]=Mx[Iv]+hv*Nv*fv
set px[Iv]=px[Iv]+hv*bv*fv
set Px[Iv]=Px[Iv]+hv*Bv*fv
set be[Ev]=true
set be[Xv]=true
set Nv=Mx[Ov]-Mx[Iv]
set bv=px[Ov]-px[Iv]
set Bv=Px[Ov]-Px[Iv]
set gv=.0
set jv=Nv*cv+bv*Cv+Bv*dv<.0
else
set Dv=cv*cv+Cv*Cv+dv*dv
if Dv>.001 then
set fv=Nv*cv+bv*Cv+Bv*dv
set Fv=fv*fv-Dv*((Nv*Nv+bv*bv+Bv*Bv)-Gv*Gv)
if Fv>=.0 then
set gv=-(fv+SquareRoot(Fv))/ Dv
set jv=gv>=.0 and gv<=N
endif
endif
endif
if jv then
set Ae[Ev]=Ae[Ev]+gv
set Ae[Xv]=Ae[Xv]+gv
set Mx[Ov]=Mx[Ov]+Mx[Rv]*gv
set px[Ov]=px[Ov]+px[Rv]*gv
set Px[Ov]=Px[Ov]+Px[Rv]*gv
set Mx[Iv]=Mx[Iv]+Mx[Av]*gv
set px[Iv]=px[Iv]+px[Av]*gv
set Px[Iv]=Px[Iv]+Px[Av]*gv
set Dv=SquareRoot(Nv*Nv+bv*bv+Bv*Bv)+.001
set Nv=Nv/ Dv
set bv=bv/ Dv
set Bv=Bv/ Dv
set fv=(Nv*(Mx[Rv]-Mx[Av])+bv*(px[Rv]-px[Av])+Bv*(Px[Rv]-Px[Av]))*(1.+ue[Ev]*ue[Xv])/(hv+Hv)
set Mx[Rv]=Mx[Rv]-Hv*Nv*fv
set px[Rv]=px[Rv]-Hv*bv*fv
set Px[Rv]=Px[Rv]-Hv*Bv*fv
set Mx[Av]=Mx[Av]+hv*Nv*fv
set px[Av]=px[Av]+hv*bv*fv
set Px[Av]=Px[Av]+hv*Bv*fv
set Dv=-fv*hv*Hv*(1./ ue[Ev]*ue[Xv])
if Dv>Ue[Ev]then
set Jv=Ge[Ev]
loop
exitwhen Jv<0
call Go(Ce[de[Ev]+Jv],Xv,Dv)
set Jv=Jv-1
endloop
endif
if Dv>Ue[Xv]then
set Jv=Ge[Xv]
loop
exitwhen Jv<0
call Go(Ce[de[Xv]+Jv],Ev,Dv)
set Jv=Jv-1
endloop
endif
set kv=We[Ev]
if kv!=0 and Dv>ye[Ev]then
set Kv=Hx[jx[kv]+GetRandomInt(0,Jx[kv])]
call SetSoundVolume(Kv,R2I(((Dv-ye[Ev])*Ye[Ev])*1.27+.5))
call AttachSoundToUnit(Kv,Ve[Ev])
call StartSound(Kv)
endif
set kv=We[Xv]
if kv!=0 and Dv>ye[Xv]then
set Kv=Hx[jx[kv]+GetRandomInt(0,Jx[kv])]
call SetSoundVolume(Kv,R2I(((Dv-ye[Xv])*Ye[Xv])*1.27+.5))
call AttachSoundToUnit(Kv,Ve[Xv])
call StartSound(Kv)
endif
endif
endif
return false
endfunction 

it's the Enum callback aka collision algorithm.



Quote:
Sure 600 balls can be present without moving at full fps for me, but it starts dropping when the moving amount is around 50...
GroupEnumUnitsInRange - is the main reason for lags. so if you object has around alot of other objects it will caclulate much stuff (in any case) aka this part is minimaly optimizable.

every unit in range requires TriggerEvaluate action + stuff inside of the callback.
09-25-2008, 09:50 PM#11
Rising_Dusk
I'm fairly sure having 600 units moving at once is the cause of the lag, not GroupEnumUnitsInRange. The damned game isn't designed to support having 600 units moved at once, even without triggers in the whole map that rapes my computer.
09-25-2008, 09:56 PM#12
Bobo_The_Kodo
Well you said in the first post that 600 can be dynamically moving and colliding, which isnt really the case, only around 50 - 100 can be moving and colliding before alot of lag
09-25-2008, 10:08 PM#13
Toadcop
show me an other map with 600 active objects =) (war3) aka you can manipulate them at any time and you will get the request completed.
in my case is simply don't waste performance on objects which does have to low action (movement). and in fact it's the whole sense of this demo =) what uneeded objects should be switched of. (it's like in any normal physic engine is (not wc3 =)) )

and the other part of the story is what.
1) jass is slow
2) war3 have own limitations on moving alot of units.

Quote:
Originally Posted by Dumbcop
emo...

Quote:
If you're lost, ask for directions.
why you are asking supid questions then? "why i can't open it in WE" etc.
he allways optimized his oe. btw
09-25-2008, 10:16 PM#14
Joker
Quote:
Originally Posted by Litany
The game isn't really designed to have 600 units period. That's, what, 12 players riding their food caps?
I wonder why blizzard doesn't have a 6v6 option for ladder?
09-25-2008, 10:41 PM#15
TEC_Ghost
So I tested it with 600 balls, the most moving I could get was around 60. No lag at all, and I was running WoW in the background too.

[edit] Tested it a little more still with half of my CPU being taken by wow, I started lagging at 900 balls with 100 moving. So people who are lagging without anything moving at all need to get new computers.