Clan TMMM
Would you like to react to this message? Create an account in a few clicks or log in to continue.


The official site of Clan TMMM
 
HomeHomeSearchLatest imagesRegisterLog in


Latest topics
» Kevkevqaz is back
Units units everywhere I_icon_minitimeby Eat_bacon_daily Wed Feb 22, 2023 7:22 pm

» Hey whats up
Units units everywhere I_icon_minitimeby seankly Tue Feb 04, 2020 10:32 pm

» Gotta click fast - WC3 Mazing #mildlyinteresting
Units units everywhere I_icon_minitimeby hoffmann Wed Jun 21, 2017 10:28 pm

» I'm getting married and you guys are invited
Units units everywhere I_icon_minitimeby Achilles.42 Wed Sep 07, 2016 11:00 am

» Server Photo Album 1
Units units everywhere I_icon_minitimeby Pat1487 Sat Aug 06, 2016 5:28 pm

» Legacy of The Void Beta
Units units everywhere I_icon_minitimeby Achilles.42 Sun Oct 18, 2015 3:21 am

» Hey guys!!!
Units units everywhere I_icon_minitimeby Eat_bacon_daily Fri Oct 16, 2015 11:20 pm

SC2 Links
SC2 Challenge/Tourney Info

Official SC2 Forums

SC2 Curse

SC2Mapster

Team Liquid

SC2 Replayed

SC2 Strategy
WC3 Links
Clan_TMMM[Host] Info

WC3 Challenge/Tourny Rules

Epicwar
Poll
What game does everyone play now?
Starcraft 2
Units units everywhere I_vote_lcap26%Units units everywhere I_vote_rcap
 26% [ 8 ]
Warcraft 3
Units units everywhere I_vote_lcap35%Units units everywhere I_vote_rcap
 35% [ 11 ]
League of Legends
Units units everywhere I_vote_lcap19%Units units everywhere I_vote_rcap
 19% [ 6 ]
World of Warcraft
Units units everywhere I_vote_lcap0%Units units everywhere I_vote_rcap
 0% [ 0 ]
Diablo 2
Units units everywhere I_vote_lcap0%Units units everywhere I_vote_rcap
 0% [ 0 ]
No games at all
Units units everywhere I_vote_lcap10%Units units everywhere I_vote_rcap
 10% [ 3 ]
Other game not listed
Units units everywhere I_vote_lcap10%Units units everywhere I_vote_rcap
 10% [ 3 ]
Total Votes : 31
Transparency

 

 Units units everywhere

Go down 
3 posters
AuthorMessage
Serenity09
Moderator
Moderator
Serenity09



Units units everywhere Empty
PostSubject: Units units everywhere   Units units everywhere I_icon_minitimeSat Jul 10, 2010 7:09 pm

Picking up a map I started awhile ago and I'm running into the problem that there are already a whole lotta units around a pretty big map and there's only going to be more. A lot of these units are stationary but they take up memory nonetheless. I was wondering if there's a good way to reduce lag without making regions/points for every single unit and having them spawn/remove whenever they needed/didnt need to be around. I considered having everything die at start with corpses that would never decay and then create/kill the matching units using the corpses as markers for location and identifiers of which unit, but I wasn't sure if that would help anything.

We're talking a lot of units though. Well over 1000 stationary. Probably will end up being around 2500.
Back to top Go down
Pat1487
Moderator
Moderator
Pat1487



Units units everywhere Empty
PostSubject: Re: Units units everywhere   Units units everywhere I_icon_minitimeSat Jul 10, 2010 9:48 pm

You can make large regions encompassing areas of the map. like if its a maze you can make a region or 2 to cover a whole level for each level

Then when the map starts pick every unit in the region 1 by 1, save the units position to a point array, and save the unit type to a unit type array
Make sure those arrays are synced together so that point[1] is the position of unit[1]
Then remove them
This might cause alot of lag at the start of the map, so you may need to have something that says setting up map, or something like that for the first few seconds

Then when they get to that level, or that section of the map use the array to spawn the units using the unit type array in the position that is saved in the point array to reconstruct the units for that level
Back to top Go down
Serenity09
Moderator
Moderator
Serenity09



Units units everywhere Empty
PostSubject: Re: Units units everywhere   Units units everywhere I_icon_minitimeSat Jul 10, 2010 9:50 pm

sweet thats exactly what i was looking for - thanks
Back to top Go down
SuPa_Link
Recruit
Recruit




Units units everywhere Empty
PostSubject: Re: Units units everywhere   Units units everywhere I_icon_minitimeSun Jul 11, 2010 3:36 pm

I think there is a function to hide parts of the environment to help prevent that lag. So when your not in that region you hide the area and would only cause the lag if you had a bunch of areas showing. Cause slithery if you destroy the units or not, they still take up some memory when they are dead.
Back to top Go down
Pat1487
Moderator
Moderator
Pat1487



Units units everywhere Empty
PostSubject: Re: Units units everywhere   Units units everywhere I_icon_minitimeSun Jul 11, 2010 4:22 pm

Hidden units still take up memory
The only way to clear them from memory is to remove them
Back to top Go down
Sponsored content





Units units everywhere Empty
PostSubject: Re: Units units everywhere   Units units everywhere I_icon_minitime

Back to top Go down
 
Units units everywhere
Back to top 
Page 1 of 1
 Similar topics
-
» new units for campaign

Permissions in this forum:You cannot reply to topics in this forum
Clan TMMM :: Warcraft 3 :: WC3 Tutorials and Help-
Jump to: