A - Z Beginner Full Guide Page 6

From The DarkMod Wiki
Revision as of 13:03, 28 September 2007 by Fidcal (talk | contribs)
Jump to navigationJump to search

written by Fidcal

Previous Page ... Next Page


More Sounds, More Atmosphere

We have already covered this in the section on rainfall so we are doing the same thing but this time to add tension as the player enters the house...

  • Clone one of the speakers from the yard.
  • Check the name - often this keeps the same as the previous causing an error. If so, rename it to whatever you want.
  • Give it the following properties...
  1. s_volume 1 = loudness
  2. s_mindistance 0 = start fade distance
  3. s_maxdistance 8 = fades to nothing here
  4. s_shader sound/ambient/ambience/mansion_tense_02.ogg = sound file. try also 01a and 01b (sounds can also be selected at the bottom of Entity Inspector when this property is selected.)
  5. s_looping 1 = plays repeatedly

Place the speaker in the middle of the big room. Check it vertically also to be half way up. Clone it and put it in small room too.

Save and try it out!

Portalizing: Visportals

Portalizing defines which areas of a mission are to be rendered at any time so as to avoid unnecessary rendering. Without it a big mission would grind to a halt. Our little mission could manage but even here, if you put in torrential rain you will find it slowing down on many PCs. Portalizing won't help out in the rain but it will improve performance indoors; why waste processing time on the rain when you can't see it?

To divide up the mission for rendering we use 'visportals'. These are simply brushes with one surface having a visportal texture. Full details of visportals are at Visportals and you should eventually get a good understanding of them. For now, this is how and where we shall put visportals in this tutorial mission...

  • Make a thin brush like a wall 4 units thick and about the size of a door.
  • Give it the texture common > nodraw all over.
  • Give it the texture editor > visportal on one of its big surfaces. This is its active surface which you should focus on when placing the brush.
  • Place it inside the yard door and exactly' fit the gap in the door frame. Technically it does not need to be inside the door but only need its visportal surface in contact with any part of the door but in this situation that's the most convenient place. Being in contact with the door will close the visportal when the door is closed so no rendering will take place of the outside when you are inside and vice versa. Even if the door is open it will still close itself if you pass through another visportal and round a corner.
  • Clone it, turn it, and place this one close to the old door to the little room. But here, the old door has holes. If the visportal connected with it then when closed the gaps in the door would go black. This would be true of a iron barred gate or portcullis or a glass windowed door etc. So place the visportal so its active surface is tight within the doorframe but not in contact with the door. It is still worth having because it will still work as an auto-visportal as you will see.
  • Clone again and tilt it over and put this one in the gap to the upstairs. Cut right through the ladder. I didn't expect this to work with the ladder entity poking through but it does.
  • Clone again and put this one just below the elevator platform. I left a gap between elevator entity and visportal surface. I'd have to check to see if it would be disabled if they contacted.
  • Clone again and resize this to go in the middle of the yard - right up to the sky and wall to wall. It should be placed at that protruding corner near the door so it crosses the yard from west to east. There must be no gaps.

Save, dmap, map and try it out. If you have torrential rain then you should notice a big difference when you go inside and close the yard door.

Now, try this, in the console type and enter r_showPortals 1 and back in the game you should see your visportals as green or red wireframes.

  • First make sure every one is working - that it is either red or green when you approach it (you won't see the ones too far away at all that's OK)
  • Now check they are working correctly...
  1. From the south end of the yard looking north with the yard door closed you should see the big yard visportal green and the door one red.
  2. Now open the door and the door one should turn green.
  3. Still without looking in through the door you should see the upstairs one and the old door one and maybe the elevator one two depending on your position. They will be red or green depending on your position. Move left so you see them round the side of the yard door visportal and they are red; look at them through the yard door and they should be green. In fact you should only see the elevator one if the old door one is green.
  4. Go inside and close the yard door. Its visportal should go red and if you have a monsoon out there the performance should improve.
  5. Open the yard door again and look back at its green visportal. If you are close you should see the big yard visportal outside also green if it is overlapping the door one. Now step back a few paces and to your right a little until the big yard visportal no longer clips over the door visportal. It should turn red indicating that the bottom half the yard is no longer rendered even though the door is open. Clever eh?
  6. Wander around and notice how the visportals open and close.
  7. You can also try r_showTris 2 which will show you what is being rendered at any time.


Sound Propogation

Visportals not only affect rendering but also sound propogation. Sound from the player to AI is directed through visportals and reduced if they are closed. Sound from AI to the player is also affected but comes more direct. So an AI the other side of a wall might be faintly heard. When a door in contact with a working visporal is opened further along he might be louder but the sound will still seem to come directly from him through the wall. Whereas if the player makes a noise the AI will hear it from the direction of the door and go there to investigate.

You might have already noticed that the sound of Creep and the thug in the house is reduced when you are in the yard with the door closed at mission start. And the sound of the rain is cut off when you are inside and close the door.

Finishing Decor & Furniture

Loot!

Stims and Responses

Objectives

  1. Break into Creep's House
  2. Steal back the scepter he stole from you
  3. Kill him (normal level)
  4. KO him and lock him outside (hard level)
  5. Drop the incriminating message. Don't get seen (Expert)
  6. Creep is a thief and must have other loot worth stealing - take at least 500 (normal)
  7. Creep is a thief and must have other loot worth stealing - take at least 750 (Hard)
  8. Creep is a thief and must have other loot worth stealing - take at least 1000 (Expert)
  9. Find his key and exit by the front door (expert)

Testing Your Mission

Zipping up

link to zip up wiki

Your own Build Design

link to build design wiki

Additional Recommended Information

All mission developers ought to read and know the following...

Performance: Essential Must-Knows


Previous Page ... Next Page