Path: chuka.playstation.co.uk!scea!greg_labrec@interactive.sony.com From: Nick Porcino Newsgroups: scea.yaroze.freetalk Subject: Re: object-oriented support? Date: Thu, 24 Jul 1997 09:21:52 -0800 Organization: SCEA Net Yaroze News Lines: 28 Message-ID: <33D78F2F.42C9@bc.sympatico.ca> References: <33b69d9c.138132316@news.scea.sony.com> <5p81kr$fv57@chuka.playstation.co.uk> <33D702CE.22A9@hubcap.clemson.edu> <5r7c25$5na47@chuka.playstation.co.uk> <33D77A4E.3BDB@hubcap.clemson.edu> NNTP-Posting-Host: vcta01m01-18.bctel.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01-C-SYMPA (Macintosh; I; PPC) I hate wading in on a C vs. C++ fest, but the overhead of C++ is way overrated. The temporary objects Mike is talking about are there to a certain degree, but as Gil points out, your constructors shouldn't be doing anything that takes any time. The temps are created on the stack as well, so you're not waiting for someone's poor excuse of a memory manager to find space for them. And you can code so that they are seldom produced anyway. Our game engine at Disney is coded in C++ and we are getting better performance than when it was coded in C, on the same machines. I've double checked the assembly code for our sprite renderers, and the C++ generates better code because it is better able to deal with pointer aliasing and other optimization problems that are difficult to resolve with C. We've got a particle system running a quarter million antialiased blurred transparent particle sprites a second, all implemented in C++ with virtual base classes and templates galore. Of course we've written our own memory manager because the stuff that ships with the compilers is in general slower than spit. You'd be surprised how many professional game shops use C++. Try programming a game like Sim City in C, and in C++... One of the two would be a nightmare. Oh well, rant mode off. - nick