Path: chuka.playstation.co.uk!news From: daniel@reichardt.ch (Daniel Hartmeier) Newsgroups: scea.yaroze.freetalk Subject: Re: Net Yaroze C++ Examples Date: Fri, 28 May 1999 08:47:40 GMT Organization: Reichardt Informatik AG Lines: 44 Message-ID: <37505449.1115333@news.playstation.co.uk> References: <374c6512.1232873@news.scea.sony.com> <374E06E4.5D701DDC@identicalsoftware.com> NNTP-Posting-Host: dial-in-21.magnet.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Newsreader: Forte Agent 1.5/32.451 On Thu, 27 May 1999 23:00:52 -0400, Dennis Payne wrote: > Chris Blackwell put up some instructions on using C++. Although his > page is old I assume it still applies. > http://www.scea.sony.com/net/yaroze/pages/cblackwell2.html Yes, this page helped me a lot getting CodeWarrior to compile C++ code. Also, Metrowerks support is very good and helpful, even though they don't officially support C++ anymore. > I like the OOP of C++ but don't use it for the yaroze. Mainly because > the limited memory requirements don't allow you to make use of the C++ > features. In particular yaroze programs tend to use static variables > over dynamic allocation which I feel eliminates alot of the uses of C++. I can't confirm that. I use many of the C++ features (classes, inheritance, polymorphism, templates, dynamic allocation) and have never experienced any real drawbacks (like waste of memory or reduced speed). In fact, I find that the NetYaroze primitives like sprites and self-built extensions like collision detection are good candidates for OO design. They could be used as examples in a textbook introducing OO design, IMHO. If you want doubly-linked lists for different data types (like background tiles, enemies or levels) for instance, you'll really appreciate templates (even though you have to write them yourself, as there is no standard template library ;-) And features like enhanced type-safety, const-ness, etc. safe me a lot of debugging time. If you have speed-critical pieces of code, you can still implement them in assembler or pure C (if this is really noticeably faster). Different views welcome. Regards, -- Daniel Hartmeier PGP 6A3A7409 ICQ# 12742482 "The woods are lovely, dark and deep. But I have promises to keep, And lines to code before I sleep, And lines to code before I sleep."