Jump to content
The Dark Mod Forums

Entities that don't count as entities


motorsep

Recommended Posts

From the purely DarkRadiant perspective it would also be useful to have this concept, since it would allow previewing of def_attached entities (such as torch models that automatically spawn an attached light source). This wouldn't affect anything in the map though, it would just enable more realistic preview rendering in the editor.

Link to comment
Share on other sites

It's not just the memory taken up by the entities themselves. Functions that have to return a list of entities (like "give me a list of all entities that are touching me") often do it by using a fixed-size list that has enough room to list all entities in the map (tech note: that's so that they can do it using fast stack memory instead of slower dynamic memory). So when you increase the limit you increase the size of thousands of memory allocations per frame, not just one, And other things like the physics question "what's touching what?" have to test every entity against every other entity -- those could become a million times a million checks instead of 8k times 8k checks. In reality the game rarely does that much work of course. There are ways to optimize that kind of thing so that you don't have to do an absurd amount of work, but there's no one-size-fits-all solution for optimising algorithms, so when you drastically change the size of something like the entity limit you have to re-test and probably re-design a bunch of algorithms. It's not just a question of how much memory most players have to spare.

Link to comment
Share on other sites

http://wiki.thedarkm....php?title=SEED ???

 

 

What is it

 

It is foremost an entity manager that can:

  • Generate entities from "templates" (even multiple templates at the same time)
  • Place created entities on random positions with random rotations (and random vertex colors)
  • Only creates (spawns) the entities that are "near" the player (saving memory and CPU time)
  • Removes entities "far" from the player, thus overcomes the entity limit
  • Create entities depending on the surface of the floor (no trees on metal, or only pebbles on sand etc.), or based on an image map (greyscale image)
  • Manage entities that were manually placed in the map
  • Combine many entities into one rendermodel (with a matching physics object built from multiple clipmodels), speeding up drawing thousands of things on the screen at the same time dramatically (this also helps overcome the entity limit)
  • Is tied in with the "Object detail" menu setting (so the player can control the amount of detail, depending on the speed of his machine)
  • Works entirely automatic, but has still a lot of manual control for the mapper

The system also includes support for inhibitors, e.g. areas that are clear of generated entities. This way a forest clearing can be specified with only a few entities, instead of being pieced together from multiple generators.

Edited by jaxa
Link to comment
Share on other sites

Well, you can still see inlined entities as regular entities in DR.

 

Yes, you can see inlined entities because from the DR and mapping perspective they are just regular entities that happen to have a particular spawnarg set on them that only makes a difference during the dmap process.

 

What is broken in DR is the rendering of "implied entities" that are not created explicitly by the mapper but spawned automatically at runtime based on entity definitions. For example, a "torch" entity might have a def_attach line that spawns a light at a particular location on the model, and perhaps another def_attach to spawn a smoke/flame particle system. The mapper does not see these automatic entities at all in DR, which presents a problem specifically with lights because they don't see any actual light from their torch model.

 

This is however a completely different issue than the need to create large numbers of detail objects, although they might both make use of similar code in DR if eventually implemented.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 1 reply
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 3 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
×
×
  • Create New...