Good news everyone!

Posted: March 11, 2011 by Hannibal[SPA] (Rafuron) in Mapping Tricks, Special

Good news everyone! Specially to mappers  >:-D

Before start, read this:

net_graph 1: command to see some important values like fps or network info

– “IN” value in net_graph: IN is the information that the server sends to you and is the only way to know if a map will LAG. Mako v1.4 had a lag problem at the bridge part. That part had 650 of IN playing in a local sever (alone). So 650 is the limit value playing alone. The limit on a full ze server can vary depending on the server quality (maybe 3.000 or 4.000 in a full server with 50 ppl).

report_entities: command to see the number of entities in a map (the crash problem of Paranoid and the current Predator happen due to the number of entities). Only the Host/Server can use this command.

cl_showents: command to see a different way of number of entities in a map.

Now, well, read carefully because this may save your ass if you are a mapper : LAG can disappear from your map, FOREVER! (server can still lag due to server problems). How? Read this:

Kaemon and I were testing a map with a really high IN (850 of IN!), which only had arround 40 entities and 3 models. So we decided to check and discover the reasons behind this strange and unsual high IN. So I started making a test map full of different entities for testing, starting with the main suspects Kaemon pointed: the models. So I added static objects, ragdolls, prop_dynamic both animated and static, etc… and these are the results:

prop_static: no IN. They wont never lag in your map.

ragdoll: no IN if they are not in movement. 285-400 if they are in movement! (Being shotted)

prop_dynamic (without animation): no IN

prop_dynamic (animated): from 200 to 300 of IN! (Varies with the model)

prop_dynamic (without animation but parented to something that can move): from 200 to 300 IN again!

But then, we added the Synth model (the crab from Paranoid) Result? Crab with an animation going on, and parented had no IN.

So, what the hell? Kaemon said the words: “the crab has not physics model“. And that’s right, it hasn’t physic model… Mystery resolved: the physic in a model (even when disabled) increases immensely he IN (and the lag in your map). What if I put 3 horse models in a server? I have 700 of IN in an empty server = lag in a full server. Moreover, Kaemon discovered that all model with physics and bones have what are called “bone_followers”, wich are basically the “Physic Solids that Follow the Bones”. And they are (each one of them) an entity that COUNTs! (Notice that the engine crashes if 2048 entities exist at the same time)

This girl is using up 1+15 entities! Not only one!

So, we can kill two birds with one stone: fix the lag (no IN) and fix the crash due the number of entities (since now Models will count as 1 Entity instead of 10-20). All this with one single action: deleting the .phy file:

Titan Monster includes: Hurt Triggers, Push Triggers, Sound Effects, Blood Particles, Two Hit Boxes, Game UI, Parented Knife, Gargantuan Model, Logic Relays, Reduced Gravity, Shacking Effects, Parented Red Light, and more, more, more!

This is the Titan of Paranoid with their entities. The heaviest item I have done so far (with lots of entities). Look their info in-game:

209 IN by himself, thats 1/3 of the lagging-like-hell limit.

So, 209 of IN, with 4 of these the server would be exploding, moreover, 45 ents each one is a lot. (notice that the  “in : 68”  is the IN at an empty server without Titan). FIX:  move this file to another directory:

Kaemon recomends you to create a new folder in its original place and just put it inside.

Result:

From 209 IN (600 starts lagging) to 4 IN! Unbelievable! Also 12 entities less.

In terms of "IN-Lag" this means we can have now 50 Titan Monsters running arround, no problem!

So, now, the Titan has 5200%  LESS LAG and has 26’6% less entities (in a cheaper entity it could change from 18 Entities to 3 Entities!).  Same animations, same effect, same impression 🙂 easy. THE MODEL LOSSES THE LAG! (Titan Monster goes from 205 to 4 IN, that comes from the Triggers and Sounds) AND ALSO BECOMES LESS ENTITY EXPENSIVE! (avoiding server crashes due to not free edicts, or giving you the chance of making maps with more of this kind of things).

The “bad” thing:

– The model will not have physic  and can’t be used for “On Hit by Bullets” events like Bahamuth on Mako. But apart form Bahamuth, all the other models on our maps have their Physic disabled, and we use their “HP” (like Titan in Paranoid) with other entities on top of them.

– The model will not have a Ragdoll option (wich anyway we don’t use it nor recommend, due to the high lag and how expensive those entities are).

And thats all… No other side-effects. Profit! This is an example. What do you thing that lags more  1 pistol on the floor or 750 animated moving horses? (The server, not the computer due to FPS drop)

There are really 750 Horse Models in this picture.

Yeah, you guessed right (I guess XD) the answer is: the pistol! And this it’s because the info he is sending to the server about his physic model is more expensive that the info of where 750 parented prop_dynamics are at that same moment.

After this, lag and crash problems will be highly improved and/or completely fixed on Paranoid next versions, and the future Minas Tirith. Luffaren may try to fix Predator with this new trick and will sure prove to be a helpful information for his upcoming maps aswel.

Advertisements
Comments
  1. Luffaren says:

    As i said yesterday.. This made my fucking DAY! 😀

  2. ZaN says:

    Nice to see some technical tutorials, now i don’t know much about mapping, but these looks like some advanced mapping tutorials, some good info, that people would find interested in, hope to see more threads like these.

  3. Kaemon says:

    This is indeed a big discovery for us.

    To make clear some points in case you didn’t get them on the explanations:

    – 1 Normal Model = About 16 Entities (1 Prop + 15 Bonefollowers) and about 100-400 IN.
    – 1 Model after removing his Physics (that we don’t need) = 1 Entity and about 0 IN.

    Also, when Hannibal says that 750 Horses “Lag” less than 1 Pistol, he means that they don’t have IN, so they don’t lag the server with their information about where their solid mesh is. They still drop more FPS than the gun.
    And yeah, a single GUN has more IN than 750 Horses because of his physics.

    The Source Engine is unbelievable sometimes… XD
    We hope to don’t find downfalls to this discovery after testing online with other people, but so far seems one of the most promising discoveries we never made; helping reduce the IN and increasing the number of entities available.

    Also, notice that monsters like Titan and AntLionGuard, even if they had a Phys model (lagging more and taking more entities) it was allways OFF so the zombie inside was abble to move.
    The only time when it can’t be used its for models that need Physic ON, wich, on our own mapping, only means “Hit Based Monsters” like Bahamuth.

  4. LeGrem says:

    i’ve make the test with an animated prop_dynamic link to a train and i fall from 550 IN to 110 IN without the .phy !!

    You’re awesome guy’s ^^

  5. Kaemon says:

    Nice. I contacted as many mappers I saw online to let them know about the new, since I know most will find it really usefull, and you weren’t the only one that already successfully tested it.

    Also, I would like to thank Paul from Steam Gamers for changing their MG server to “mg_warmcup_arena_final” wich was the map that called my attention to this issue and Hannibal mentioned on the rant.

  6. Puni says:

    Very interesting. Nice article.

    I found out what IN means when the CSS update happened. It ruined breakfloor (my in was 2000+) Somehow wildfire clan managed to fix the map but i have no idea how!

    Oh, and does all the Horses mean that your actually gonna do the rohirrim charge we talked about? 😀

  7. Crazyjay says:

    dear god why didnt you find this out when i started making my map, i’ve been crashing my friends server like crazy xD

  8. All horses pic means that many hoers at the same place rulz .
    Impossible to make that scene. I have enough work to do.

  9. But remember that this thing fixes the lag, and the “no free alloc” crash (server crash), check the number of entities (report_entities), if the number is > 1500 then you should use the trick.

  10. Kaemon says:

    Completly unrelated but I answered many questions on the FAQ today.
    They were there for a long time, sorry for not checking the FAQ in so long… They are not updated on the top, but answered bellow their respective question-comments.

    I look foward to update the FAQ section someday, making it easier to read and with all the questions updated; but I don’t feel like doing it right now. XD

    I took too long to write the answer, but Fuckballs got the last Geek Point on my last rant.
    Also, we won’t have news in a couple days (probably) because we think this last post its pretty important for many mappers and we want to keep it in front page to give everyone the time to see/check it.

  11. UNREA1 says:

    This is gonna be really handy.

  12. Anonymous says:

    I have been mapping for a while now and hear a lot of talk about the “cost” of things when mapping… its very very rare than anyone gives any quantitive information… I wish someone someday would produce a comprehensive article or tutorial about this subject, how much different entites, materials etc cost from a client a server sided point of view… The info you have given here is excellent and well explained. Well done… we just need more info like this 🙂