RPGWatch Forums

RPGWatch Forums (http://www.rpgwatch.com/forums/index.php)
-   News Comments (http://www.rpgwatch.com/forums/forumdisplay.php?f=10)
-   -   Legend of Grimrock 2 - Performance Optimizations (http://www.rpgwatch.com/forums/showthread.php?t=23698)

Myrthos March 12th, 2014 00:27

Legend of Grimrock 2 - Performance Optimizations
 
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….

Quote:

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.

SpoonFULL March 12th, 2014 00:27

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.

you March 12th, 2014 13:39

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).

Myrthos March 13th, 2014 10:55

From the text I understand he wrote his own profiler, dedicated to this game.

SpoonFULL March 13th, 2014 11:33

Quote:

Originally Posted by you (Post 1061245481)
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.


All times are GMT +2. The time now is 14:31.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Copyright by RPGWatch