[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: c code vs c++ code
Thomas Hentschel Lund wrote:
> Very potentially religious question.
Yes - absolutely - tread carefully!
> When running profiler tools you discover that you propably are spending
> most time in external libs or the kernel. So what does it matter what
> you coded you game in.
That depends a LOT on the nature of the game.
In 3D games, if you have a modern graphics card with hardware T&L,
relatively little of your CPU time needs to be in the graphics - and
ander 1% should be in the OS or the music/sound libs.
Where the CPU time goes in a modern 3D game is in the physics and
collision detection...also in scripting if an interpreted scripting
language is widely used.
If you write those yourself then you certainly need to pay careful
attention to performance.
If you hand those over to a library to implement - then that library
had better be written by someone who cares about performance.
Of course if you are writing 2D stuff and not using available hardware
to push the pixels then you might be in trouble at high display
resolutions - but generally you can run pretty good 2D games on
your cellphone these days - so I doubt CPU-side optimisation matters
---------------------------- Steve Baker -------------------------
HomeEmail: <firstname.lastname@example.org> WorkEmail: <email@example.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net http://tuxaqfh.sf.net