View Full Version : Optimizing
FreDsom
01-13-2003, 11:38 AM
I'm sure there are lots of these threads already, but I need to know how to optimize my level properly and how to use the exits the best way possible.
In some areas of my level the frame rate is almost 40fps, but still it lags and I can't figuer out why.
Co&Co
01-13-2003, 01:02 PM
40fps and it still lags!! weird. Here are some points:
- using the dummy texture on faces of an object you won't be able to see ingame.
- make sure you don't have to much enemy's at once on your screen. same goes for particle effects.
- avoiding big outdoor area's
- proper use of exits (don't just use them now and then, use them at the right places and also program them).
Can't think of anything else right now...
FreDsom
01-13-2003, 01:17 PM
- proper use of exits (don't just use them now and then, use them at the right places and also program them).
<font size="2" face="Verdana, Arial">and what's proper use of exits, and how do you program them?
Co&Co
01-13-2003, 01:37 PM
I think it's good to make an exit for every single room you have. You can program an exit as following:
Suppose you have 2 rooms seperated by a door (room01 and room02), in the middle of the door you want to make an exit. Take this example in mind when reading this small tutorial images/icons/smile.gif
- go into f4 mode and put your cursor on one side of the exit. Now rename your exit: "toggle1". Now goto the other side of the exit and also rename it to "toggle1.
- now put the next message in the "open-animation" of the door:
::Room01::toggle1->EnableExit(true);
::Room02::toggle1->EnableExit(true);
- and put the next message in the "closed-animation" of the door:
::Room01::toggle1->EnableExit(false);
::Room02::toggle1->EnableExit(false);
This is it. So what happens is that when the door is closed the exit are "false" and when you open the door the exit will toggle to "true" thus making the room visible.
good luck images/icons/wink.gif
FreDsom
01-13-2003, 01:55 PM
so when the exits are disabled, they won't render what you can see through them, but when it's enabled it will. Did I get this right?
and what exactly do I do when I rename the exit?
one last question, is it possible to use to many exits?
william ford
01-13-2003, 08:24 PM
I think it's good to make an exit for every single room you have. You can program an exit as following <font size="2" face="Verdana, Arial">An exit for each room is not nessecery, i think that could only do worse images/icons/shocked.gif . The most i've used is four on a level(its not finished yet but i wont add anymore) and it has like 30 rooms.
zephyrin_xirdal
01-14-2003, 04:59 AM
so when the exits are disabled, they won't render what you can see through them, but when it's enabled it will. Did I get this right?<font size="2" face="Verdana, Arial">Exactly.
and what exactly do I do when I rename the exit?<font size="2" face="Verdana, Arial">Go to F4-mode, bring the mousepointer over the exit and hit "Enter". (Before that disable "select culled polygon" in the overall settings) A window pops-up inside which you can rename the exit. I myself use North, East, South, West abbreviated (exitN, exitE, and so on) so that I don't loose orientation in my own map. Mind that every of those cyan exit-planes you see in MaxEd represent TWO exits! One from every side.
one last question, is it possible to use too many exits?<font size="2" face="Verdana, Arial">Yes, it is. If you've got for example a row of rooms in one straight line, all divided by exits, and you can see from the first room through to the last room you may get the halls-of-mirror-effect ingame. Only an example, so don't overuse exits. But use the switching-off exits feature as often as possible. Of course only in places where a door completely closes over an exit.
You can reread all this in the Remedy-tutorial on dynamic content (I think it was that one, where they describe how-to-make-a-door).
Co&Co
01-14-2003, 06:47 AM
An exit for each room is not nessecery, i think that could only do worse . The most i've used is four on a level(its not finished yet but i wont add anymore) and it has like 30 rooms. <font size="2" face="Verdana, Arial">30 rooms and only 4 exits! Seems a bit low to me. You might want to take a look at the official "Subway_A Level" from Remedy. It has a total of 38 rooms and they have an exit for almost each room (if not for every room).
FreDsom
01-14-2003, 10:17 AM
Thanx for the help! images/icons/grin.gif
An exit for each room is not nessecery, i think that could only do worse . The most i've used is four on a level(its not finished yet but i wont add anymore) and it has like 30 rooms. <font size="2" face="Verdana, Arial">you should at least have 10, even more. And as said before, use them properly.
[ 01-14-2003, 10:20 AM: Message edited by: FreDsom ]
4 exits in a level is insane; unless you had only a few rooms (a lot less than 30). I'm currently using 142 exits in my Rave level - you really should divide every room up. If your level is properly optimised the engine shouldn't be rendering stuff you can't see, which you can test with this command:
maxpayne_gamemode->gm_drawoutlines(1);
Typing that into the game's console will make the engine draw the outlines of everything currently being rendered. If you have a serious case of x-ray vision then you need more exits.
Co&Co
01-14-2003, 02:53 PM
142! images/icons/shocked.gif
How big is your level? and how much time does it take to load your level? BTW, are all 142 exits programmed (toggled on/off)?? If you don't programm an exit does it have any effect?
[ 01-14-2003, 02:59 PM: Message edited by: Co&Co ]
FreDsom
01-14-2003, 02:58 PM
Time to separate your level into smaler ones images/icons/tongue.gif
My level is a reasonable size (i started over a year ago - being work on and off since (more off than on images/icons/wink.gif )) It takes about 10-15 mins to get from start to finish, roughly.
Not all of the exits have exit optimisation on them (toggling on/off) There isn't any need for that except for areas which have higher polycounts, so I've got a few here and there, separating more complex rooms.
If you don't use exit optimsation, the exit still improves game performance. The engine always renders the current room you're in and anything that can be seen through visible exits (the ones that can be seen from your present position)
If you don't use many exits, then you're making bigger rooms... so chances are stuff is being rendered that doesn't need to be (stuff around corners etc)
For example, take an L-shaped corridor. The best place for the exit to go is at the corner - I suppose if you angled it at 45 degrees it would be best (or neatest anyway) Without the exit the entire L-shape would be rendered. With the exit, only the straight bit you can see is rendered.
So even though my level has 142 exits, some of the "rooms" are just corridors.
In MaxED I think you can see the effect of an exit by pressing caps lock - then move your view about and you will see what was being rendered from the viewpoint you were just at. It'll probably look clearest if you do this while looking through a doorway or something similar.
Pressing capslock again will get your view back to normal.
And of course, you can see the effect of exits in-game by using the console command in my other post.
Time to separate your level into smaller ones<font size="2" face="Verdana, Arial">Now there's a good idea images/icons/grin.gif
[ 01-14-2003, 03:33 PM: Message edited by: mph ]
FreDsom
01-15-2003, 09:26 AM
Making one huge level in maxed will only do one thing.. bugs that can't be fixed.. and then you sit there and have one huge level that don't work..
So Separate your level today! graemlins/tinyted.gif
If I could only separate or optimize the outside area of my level images/icons/frown.gif
[ 01-15-2003, 09:35 AM: Message edited by: FreDsom ]
william ford
01-15-2003, 08:53 PM
Well i got like the shittiest computer in the world and it runs fine with 4 exits. Anymore in it would be insane and just a waste of my time.
vBulletin® v3.8.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.