| 08-04-2008, 08:38 AM | #1 |
I am working on making a TD game and I want to put as many units in the game as possible without slowing the game down. It is an 8 player map. Each player can build 5 different units. I currently have 27 levels in the map. Creeps spawn every 3 seconds. I have done a little testing on it and this is what I have come up with. If I spawn more than 6 creeps per 5 seconds, by the 5th level the map will start to slow down and lag. The creeps come non-stop. 2 minutes per level and up to 6 creeps spawned (in all 8 player locations) every 3 seconds. Is there a way to spawn more creeps and not get the lag/slowdown? Even if I have to use specific units thats fine. I am thinking that unit animation might be the cause of the slow downs. |
| 08-04-2008, 09:27 AM | #2 |
The first thing you can do to avoid such lag when massing units is removing the unit decay from your spawns, or at least reducing it to e.g. 10 seconds. Not leaving behind a 1000 corpses per minute should help a lot. The second thing is rather a rule: every player should have at most 100 units at the same time. Any more can cause lag when issuing orders. A third thing you must check when you're massing units so fast is that you DON'T leak. If you spawn 6 creeps every 3 seconds for each player, it'll be 48 leaks per 3 seconds, which is a mapkiller. |
| 08-04-2008, 09:27 AM | #3 |
make mobs more powerfull and decrease its number. 12 units per wave (full single group) will be best, send next group when prev nearly destroyed. |
| 08-04-2008, 10:03 AM | #4 |
Yeah, make sure you code is clean of leaks, if your unsure then post your triggers. Second thing is decay, otherwise you have a LOT of corpses on the map Third thing is the maze size, you dont want too many units on the map at once, so if you want to spawn lots of units then they are going to have to be fast/easy to kill/go down a set unkillable path. So that you can keep their numbers down. You could make it a race to kill the units fastest, then if you spawn lots then people will kill lots, and then yeah, everyone will keep the numbers of units down for you. Just have a maximum of 10 5 units moving though each persons area at a time, and when one dies spawn another, and etc! <- just an idea =) |
| 08-04-2008, 10:14 AM | #5 |
There is no need to reinvent the wheel. Check some popular TD (Element TD for example) and see how many units it spawns and at what rate. |
| 08-04-2008, 12:19 PM | #6 |
There is no need to reinvent the wheel. However using a ball drive wheel allows more flexibility, while tracks allow better traction and stability. Tire companies constantly perfect parts of the wheel, while others perfect bearings axles and watnots. So, it is ok to perfect and change the idea to suit your own needs, Cohadar is being silly. Just make sure it works ok - testing is the best way to find the best way! |
| 08-04-2008, 02:43 PM | #7 | |
Quote:
And some companies save time and resources by using industrial espionage. |
| 08-04-2008, 02:56 PM | #8 |
Wait, are u trying to break his td? |
