FPS and script help please.


(GTBGranny) #1

Hi guys, I have almost finished a map I am making but am having trouble with a couple of things.

Firstly…The FPS really sucks in some places for some reason.

Almost everything in the map is detail brushes and I have put about a million hint brushes spanning the entire length, breadth and diagonal areas of the map.

Doesn’t seem to help with fps though.

Secondly… I can’t seem to get the buttons to the Commandants office to disable once they have been pressed, so that the message doesn’t come up again once it has been pressed.

I was hoping someone could help me out on either of these issues and maybe give any suggestions if they feel like it.

Map is beta and is here http://cid-20c7b9674e1fe7b6.skydrive.live.com/self.aspx/Enemy%20Territory/ET%20Main/reichstag^_beta.pk3

(I know it’s nothing like the Reichstag, I got a bit sidetracked while making it:) )


(-SSF-Sage) #2

Hint brushes doesn’t block vis. Without structural brushes there is no vis block. Research on the subject detail vs structural and then more about hints and vis block generally. And don’t place a hint brush if you don’t know why you place it, it comes with a cost too if used wrong.

Spend a day or two on nothing but reading about the subject (vis block) and you’ll save tons of time in future and make better maps.

I did not test the map so I don’t know the setup. But based on your script I’m guessing it’s allied=open axis=close. If so you can make it with a simple accum setup. So let’s pick accum 0 and decide that 1=closed and 0=open. So this should do it:

	trigger move_bottom
	{
		accum 0 abort_if_equal 0
		accum 0 set 0

            wm_objective_status 5 0 2
            wm_objective_status 5 1 1
            wm_announce "The Commandants Office Is Open !"
		playsound sound/movers/switches/switch_02.wav
		wait 1000
		gotomarker deck_bot 128

	}

	trigger move_top
	{
		accum 0 abort_if_equal 1
		accum 0 set 1

            wm_objective_status 5 0 1
            wm_objective_status 5 1 2
            wm_announce "^7The Commandants Office Is Closed !"
		playsound sound/movers/switches/switch_02.wav
		wait 1000
		gotomarker deck_top 128

	}

Edit. I tested your map, yes that should work. With the accums you have to open the door before you can close it again and vice versa. Because now you can just “open” it 10 times in a row.


(GTBGranny) #3

Many thanks for that, I really appreciate the help.

EDIT I have tested the script and it does block the buttons once they have been pressed.

Unfortunatley the Blue button doesn’t appear to be live though until the Red button is pushed.

The Red button closes the door, and the door is already closed at the beginning of the map.

As for the fps issue…

I have spent hours trawling though web pages and forums about Detail Brushes v Structural etc and I am none the wiser for doing so.

There seems to be lots of conflicting advice regarding the subject.

Is there a particular tutorial or suchlike that you can recommend as the “Actual” way to do things ?


(-SSF-Sage) #4

Oops my bad. Put accum 0 set 1 into the spawn event of the deck’s scriptblock (after a little wait obviously).

As for a tutorial. I haven’t seen a tutorial with false information yet. Some are good and little worse. There’s a good compilation of good tutorials by Shagileo.


(GTBGranny) #5

Many thanks that did the trick with the button.

With regard to the fps issue…

I have been reading up on it and I think I understand it.

The problem as I see it with my map is that the inside of the building is open plan.

I can’t really see how I can use anything to lower the fps as shown in my picture.

The game is drawing all the stairs etc and the spindles for bannisters on each floor.

Am I missing something or is the problem unsolveable.


(Qualmi) #6

if you ask me you shouldnt have fps problems with this room. its all in all not too much of a tris count in there (i only judge the room on the pic cause i didnt donwload the map).

some tips:

i see you use the command

r_showtris

there is the “r_showtris 1” and there is the “r_showtris 2”. “r_showtris 2” is the only one that counts. use it to see what gets drawn and what is vis blocked.

then i see that your room is plain in the middle. there is nothing to block. so if you see it this way its unsolvable as you say. but you can block all whats behind your room. use r_showtris 2 as said above.

until know everything i said is written in tutorials. i recommend the nibsworld tutorial about vis blocking. only my taste, can only say from what ive learned this all (its also enumerated in shagileos doc). the other ones i read have been also very good, but i understood the most from the nib tut.

one tip which is not written in any of those tuts, but can also reduce fps (reduces tris count). as you can see in your pic here

for example the floor is full of t-juncs. if you watch out that especially the edges of your floor dont hit any vertices of other brushes, than you will have a bit less tris count. you can also do this by not cutting up the walls to place doors/windows in it, you can just place the door/window in front of it (1 unit width). this way you can get rid of the t-juncs and reduce a bit the lag.

but again: i really think that your room is not the only one which pulls down the fps. im almost sure that you can spare yourself the t-junc thing i explained above and concentrate on blocking this room from other ones, cause im pretty sure that behind this room is sth which drops down your fps.


(GTBGranny) #7

Many thanks for that excellent reply.

Although I thought I was beginning to understand it I obviously don’t as nothing I try seems to have any affect at all.

This is the biggest disaster in the history of the world.

(Apart from when one of my dogs hurt her leg)

I wonder if it would be possible for someone to alter the .map file for me slightly to give me an example of what needs to be done.

I will gladly email it to them as I am now completely baffled.

With regard to your reply…

I am not sure what you mean about the floor. If I don’t have it going under the wall there are gaps in the doorways.

I suppose there is always the option of making the banister spindles square rather than twelve sided, but I thought it looked much better with twelve.


(GTBGranny) #8

Guys don’t worry I found the problem.

It was the mirror causing the problem all the time.

Now I can go back to another map that I had almost given up on because of lag issues.

My sincere thanks to all.


(Jecoliah) #9

The mirror is not your only problem with FPS.

The Whole map is being drawn from almost any location in the map.

If you were to use Structural brushes and for instance an L shaped hallway to lead to another room, then once in that room the rest of the map should not be drawn.

The Structural brushes can not leak (in order to work), just like your sky box can not leak.

I would suggest to rework the map to block Vis from your other rooms.

Jec


(aaa3) #10

hy, i finally got to check your map ingame. i think i have an idea about your fps… you have way too high tri-count - actually its horrible. it is only second, that you should have made the 2 big rooms" (of the 3 of the map :slight_smile: that entry hall, the main, and the brown. and ok, didnt count the jail under all of those, let"s that be the 4th, seal that one too) walls structural, inlcuding the (now empty, i guess caulked) back wall of the main room too. u will have to make it until from neither of the rooms u can see into the another. so this is 2ndary, to get back to issue 1, triangles; it is clearly caused by the extremely detailed handrails/balusters/hth it"s called. it"s duplicated in large numbers and each one is so dense that u hardly even see them from the whiteness in r_showtris 1 ^^

oh and p.s., hints are not useful at all on this map. [ok, almost all, maybe around the connections between the rooms, but i forgot how exaclty was it by the time i"m posting this so…]


(GTBGranny) #11

Many thanks for your reply guys, it is much appreciated.

I have done a bit more work on the map and the fps is much better now. (I Hope)

There are still a couple of things for me to do but these will have to wait for another day as I am running out of spare time to solve these problems.

The latest beta version is available here http://cid-20c7b9674e1fe7b6.skydrive.live.com/self.aspx/Enemy%20Territory/ET%20Main/reichstag^_beta^_2.pk3

With regard to the big empty hall I still have some confusion about what to do about this.

I thought I would have a look at the baserace source to see how the problem of vast open spaces were dealt with and for the life of me I can’t work out what has been done to achieve good fps.

My whole map is about a quarter of the size of baserace and I am a puzzled as to how it was achieved. (Other than Cptn Triscuits expertise of course.)

Also, what commands have I got to use to count tris etc ?

Many thanks again, and I wish you all a very merry Christmas and Happy New Year.


(aaa3) #12

i"m not sure about counting, maybe it"s r_stats or idk, others will surely tell this; to see them by eye, u write in console „/r_showtris 1”, where 0=returns to normal, 1=shows all you can see, 2=shows all the engine can see from that position u r currently in. the second one is extremely useful for checking vis blocking"s properness, some might do it with lockpvs though (i"ve never used that nor the counter ^^). the 1st one is most useful to check your structures" niceness in terms of tris.

if u ggl srch 4 q3 console commands, u may find the better lists where they"re grouped by function, there u"ll find some nice ones. if any1 else see this they may post a list of the best ones here 4 u…

tomorrow i"ll have a look on the map
+wishing back ofc

[p.s.; well, couldn"t stand it, had a look. its approx. a 2x improvement at me. and i think there is nothing mysterious to worry about nor other maps doing wonders, it was simply that handrail stuff.
to further improve, do a simplification in the entrance hall as well (replace the round stuff on the top of the poles with a little square for example); and finally visblock the rooms from each other. both there is not much more u can do, and that it will be enough imho to achieve a comparatively high fps to other maps imo, as your one is still quite simple in terms of details density, except that many little stuff.]


(ailmanki) #13

r_lockpvs

set it to 1, and the engine will lock on that view, so you can move around and chceck what can be seen from the point you enabled it.

r_speeds is the command to see numbers … lol , search forum for howto use.