| 11-15-2002, 08:16 AM | #1 |
Guest | Okay.. so I have my map and it works well, but when I go to quit it takes forever to exit. I think it has to do with the large number of array variables I have in it.. but.. if you guys know what could be lagging it up.. feel free to give me some ideas. |
| 11-15-2002, 08:20 AM | #2 |
It's impossible for us to know what's lagging your map when we don't know what's in your map. Common examples are: 1: Over 200 units 2: Weather effects 3: Crap Computers 4: Too many players 5: 20+ simultaneus periodic triggers there are more, but basically anything excessive will lag on a weaker computer. Try to tone down your graphic settings. If this doesn't help, then post some specifics about your map. -Insaniteus- |
| 11-15-2002, 08:27 AM | #3 |
Guest | No, no, no.. the map itself doesn't lag.. when you go to quit it lags... after the scores screen it blacks out for longer than normal... I think it has to do with Warcraft III clearing all the memory it used for my map.. I'm using a lot of arrays.. so.. I dunno.. |
| 11-15-2002, 08:40 AM | #4 |
Then skip the score screen. |
| 11-15-2002, 09:06 AM | #5 |
Guest | It still lags afterwards when you just Alt + F4 it.. it's not the score screen.. it's the map.. I guess. |
| 11-15-2002, 09:10 AM | #6 |
Guest | One thing.. the arrays I'm using go up to values as large as 1111, but they only really use about a tenth of the numbers from 1 to 1111, so could War 3 be queing up a space in the memory for those thousand slots, and taking forever to clear them when the map's done? |
| 11-15-2002, 09:33 AM | #7 |
Guest | hmmmmm maybe... thats it, or... ur comp sucks..0_o |
| 11-15-2002, 09:44 AM | #8 |
Guest | It ain't that bad... I decreased the periodic times to .25 seconds... I wish there was abetter way to do them. It's lagging a bit less now.. maybe it's exceptible.. since I do have AIM, Windows media player, etc running :/ |
| 11-15-2002, 10:08 AM | #9 |
Guest | Okay.. I've done it.. I had to set the .1 second periodic triggers and a loop in the 1 second trigger, waiting for .1 seconds every run through of the loop... now I've got it all.. with low lag ;) |
| 11-15-2002, 04:08 PM | #10 |
Guest | it happens usually when u have a lot of units created in a game... my new td im making im gona try make the units revive instead of just creating new ones.. altho that means theres less variety i wonder if replacing a unit takes up memory... |
| 11-15-2002, 04:16 PM | #11 |
Well, make a trigger that if a unit dies, its cleared from the field of play. And if your making a td or one were units spawn, make them spawn in different groups, say a group of 5 five times if you want 25 of them. And if its a quest open game, make it to were the spawned units are part of a group, and when they all die the group is cleared and it waits 2 or so seconds to spawn another group. And make it to were units spawn at different times, not all at once. Like say the game starts, it waits five or so seconds and then it enables a trigger that spawns that group every so often. Thats more of a quests open rpg anti lag trigger, but it will work for other games. Sometimes more triggers makes the map less laggy, just as long as they arent all going at once. |
| 11-16-2002, 04:21 AM | #12 | |
Quote:
I know you've already solved your lag problem and the above really wasn't the cause of the lag but I thought some people might find it interesting to read up on some general concepts in programming. The classic way around this problem is using hash tables. When the event space is large but only a small number of those events actually come into play, hash tables can be used to save some space. Hash tables are also useful whenever you need fast lookup. It isn't too difficult to implement a hash table from scratch and I would recommend doing it for people who haven't done it before and are interested in programming. You can learn a lot by implementing these things. Search on google for 'hash table' and you'll find tons of sites explaining what they are. |
