Legend of Grimrock 2 - Performance Optimizations

Myrthos

Cave Canem
Administrator
Joined
August 30, 2006
Messages
11,223
In an update on Legend of Grimrock 2, the performance optimizations they have been working on for the last few weeks, are discussed. If you are not a programmer, nerd or a geek, you might not find this too interesting....

Some might think that optimizing is boring and tedious because the work is very time consuming and nothing seems to happen to the game on the surface. To help with this I’ve turned opimizing into a sort of game for myself. Whatever I’m optimizing I first come up with some metric, usually a number whose value I can track and try to make it as small as possible. I set up a challenge for myself to see how low I can push that number. Some things are easy to measure like memory consumption of the process with Windows Task Manager or the time needed to process a single frame. But to really dig deep into performance issues it’s necessary to breakdown the measurements into smaller bits to get a better idea what to optimize. Therefore I built a performance profiler directly into the game that I can summon with a press of a button.

The profiler shows milliseconds and percentage of frame time spent in each subsystem of the game and various other statistics. To run at 60 frames per second the computer can spent up to about 16 milliseconds to process each frame, including updating the game world and rendering the view. The profiler also shows amount of temporary memory allocations (Malloc column) during the frame — more about that later.

More information.
 
Joined
Aug 30, 2006
Messages
11,223
Haven't heard 'malloc' or 'calloc' for a while now!

These profilers look excellent and allow the programmers to monitor and optimise their code, particularly since it is their own engine.

The only other time where I saw such profilers being used was with Call of Pripyat, which allowed their game to scale wonderfully with different hardware.

Keep up the good work, and looking forward to Grimrock 2.
 
Joined
Feb 2, 2011
Messages
2,818
Location
United Kingdom
Hum. As a coder I use malloc and calloc a lot; though I guess these days we are doing more with new and delete. Hum. I presume the game was written on windows; who's profiler are they using? (I absolutely hate programming on windows - and swore off of it after 3.1).
 
Joined
Oct 20, 2006
Messages
7,758
Location
usa - no longer boston
From the text I understand he wrote his own profiler, dedicated to this game.
 
Joined
Aug 30, 2006
Messages
11,223
Hum. As a coder I use malloc and calloc a lot; though I guess these days we are doing more with new and delete.

That is what I meant. Having said that, C is still at the heart of efficient programming and is still taught in engineering for embedded systems programming and (to a lesser degree) in computer science.
 
Joined
Feb 2, 2011
Messages
2,818
Location
United Kingdom
Back
Top Bottom