Hyperion Entertainment

  • Increase font size
  • Default font size
  • Decrease font size
Home F.A.Q. Heretic II Performance Tweaks under WarpOS

Performance Tweaks under WarpOS

Article Index
Performance Tweaks under WarpOS
PART ONE: TROUBLESHOOTING FAQ
PART TWO: PERFORMANCE TWEAKING

PART TWO: PERFORMANCE TWEAKING

General

Do not use AHI if you don't have a soundcard. AHI will introduce an noticable overhead because of its generic mixing routines. In short, it will make things considerably slower, even more if you have slow 68k CPU like a 040/25.

Heretic II uses a console variable ami_soundcache for specifing the size of the sound effects cache. Although you won't notice any speedup during a timerefresh command, the general performance will improve if you set this to something higher than its default settings - provided you have the memory. See below for more information on that topic.

Software Rendering

If you are using the software renderer, you should select a resolution that is adequate for your system. The 603e 160 will not be able to cope with a 640x480 display, it is recommended that you use 320x240 for that. For the 240MHz 603e or the low-end 604 systems, you might want to try a 400x300 resolution. Finally, high-end 604 systems (200 MHz or faster) can use 512x384 or even 640x480, although most users will find the latter one too slow. Much lagging is caused by the caching if the caches are set too low. The default setting is selected for 64 MB systems, if you have more memory you can raise this setting. For 100 MB systems, you can safely set both the ami_imagecache and the ami_soundcache variable to 5000000, although the ami_soundcache variable need not be set much higher.

Hardware Rendering

Most problems with slow hardware rendering performance have proven themselves to be either caused by overheating, or incorrect installation of Warp3D. If your system gets very hot, you should try to add a cooler to it. Especially in an un-towerized A1200, heat can be a severe problem.

Incorrect installation of Warp3D may have severe impacts on performance. First of all you should try the Warp3D demos to see if they run and at what frame rate. For example, the "Engine" demo should show more than just a few lines of text and two red gouraud-shaded polygons. If you don't get this, refer to the "Problems.txt" file in the Warp3D archive. It has a detailed listing of version numbers of different libraries required for Warp3D to operate properly.

On the Heretic II side, there are a few console variables that can be used to tweak performance too. If you install the game in "Expert" mode, then the installation script will offer you the possibility to do this in a bit more "interactive" way. We'll go into a few details here but be warned that some of this might potentially lead to instability.

The first thing you should do if you think Heretic II is too slow, is to reduce the "Effects Detail" in the video config menu. The special FX employed by the Heretic II engine are quite heavy, especially since they use a lot of overdrawing. Also, the issues about theami_soundcache variable mentioned above applies to the hardware renderer as well.

The following console variables have an impact on Heretic II's performance:

    gl_buffers
gl_sync

This will usually be set to "2" to indicate double buffering. You may set this to "3" if you have a graphics card with at least 8 megabytes. You will also want to set gl_sync to 0 in this case. gl_sync will enable (if set to "1") or disable (if set to "0") vertical synchronisation. When this is enabled (i.e. set to "1"), then after rendering the frame the game will wait until the vertical blanking face and switch display there.

With two buffers, the game usually shows one buffer and draws to the second. When the second buffer is full, it must wait until the first buffer is no longer visible, otherwise you would see the update of the next frame.

With three buffers, the game can show buffer 1, draw into buffer 2 and when this one is filled, continue drawing into buffer 3. When the vertical blank occurs, the buffers are switched, meaning the former buffer 2 will now be the visible buffer, buffer 3 will still be drawn into and buffer 1 is now free when buffer 3 is full.

With double buffering, the maximum frame rate is closely coupled with the refresh rate of your monitor. For example, if your monitor does 100 Hz, meaning 100 frames per second, then this will be the maximum that Heretic II could do. Furthermore, when Heretic II does take slightly more than 1/100 of a second to render a frame, frame rate will drop to 50 fps since the game will wait the next frame for the vertical sync.

Triple buffering will allow the game to operate at full speed, since it will not have to wait for the buffer switch. In the above example, this means that if it takes slightly more than the 1/100 of a second to render the frame, it will still immediately start rendering the next one.

gl_texturecache

Since some of the levels in Heretic II use a lot of textures, and a lot of large textures, it is next to impossible to fit those into a physical memory of less than 128 MB. To prevent this, the Amiga version uses a cache where textures are loaded into and replaced if a new texture must be loaded and memory is full. This works reasonably well but might cause frequent disk accesses. The gl_texturecache variable specifies how much memory should be used. The default value is selected to suit a 64 megabytes system, there is however no need to restrict yourself to using 64 megabytes if you have considerably more than that. As a rule of thumb, you should set this variable to the size of your main memory minus 70 MB. For example, if you have 80 MB, you can set gl_texturecache to 10 MB. There is no need to set it to anything higher than approx. 25 megabytes.

gl_forcedepth

This specifies the minimum depth that Heretic II should use. Although it will not affect speed, display quality will be improved if you set it to 16. Heretic II will not work in 24 bit mode.

A few words about the Permedia 2 chip

The Permedia 2 based cards were advertised as offering "workstation class graphics performance". While it is true that those chips have been frequently used in expensive GL accelerators, most of the times these where used in conjunction with GLint/Oxygen chips that are not available on the Permedia-2-based Amiga cards. The Permedia 2 is, by all means, an outdated chip. Its performance is below the class of even a Voodoo I, plus it is missing a few crucial blending features that make it necessary to emulate certain features (as seen, for example, with the fires in Heretic II). The fill rate of the P2 is far below what even a low-end 3D card on the Wintel market will deliver. For example, when I start the second tutorial map in 320x240 fullscreen, a "timerefresh" delivers 72 FPS, while it delivers 102 FPS when I resize the screen to the smallest possible size. Although it might be arguable if 72 vs 102 FPS really makes that much difference, this is on a screen with very few pixels to start with, and in 640x480 the difference becomes much more obvious.

Bottom line is that at higher resolutions, the graphics card will slow down the CPU. Heretic 2 would be able to go faster (remember the 102 FPS) if there was a more decent graphics chip. This observation is further confirmed by our assessment that a 200 Mhz Cyberstorm PPC is roughly equivalent in performance to an AMD K6-2 @400 Mhz.

The Hyperion Entertainment Team.