Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!kth.se!cyklop.nada.kth.se!news From: nv89-nun@dront.nada.kth.se (Nicklas Ungman) Newsgroups: comp.sys.amiga.programmer Subject: Re: OOP (was Re: Assembly Language & Programming) Message-ID: Date: 16 Apr 91 23:47:30 GMT References: <67@taloa.unice.fr> Sender: news@nada.kth.se (Mr News) Organization: Royal Institute of Technology, Stockholm, Sweden Lines: 47 In-reply-to: beust@mimosa.unice.fr's message of 16 Apr 91 09:17:33 GMT In article <67@taloa.unice.fr> beust@mimosa.unice.fr (Cedric Beust) writes: The real question for me is "Is there any interest in reusability for games?". Isn't there a risk to see bunches of clones invade the market, that are just different by the colors chosen and their titles? Of course, companies re-use part of their code previously written when they develop a new game, but would it be a large gain if these portions were written in C++ instead of just being simply callable ASM functions? In this article I write: One advantage of reusability is developing time. The reusability is easier to achive in OOP, but for games I think the gain is minimal. Another advantage of reusability is Interface Consistence. In MacApp you can program a text editor with menus, dialogs, windows etc. in less than hundred lines of code. All you have to think about is what your program should do, and MacApp takes care of the interface. This is an advantage also in games, but not as much as in Word Processors, Paint Apps etc. What makes OOP so suitable for games is the view of life. You can create objects and send messages to them, and they can send messages to other objects if they want to. These messages can be any form of action (eg. shoot, hit, talk, run etc.). When an object sends messags to other object these actions become interactions. And interaction is VERY important in games (interaction actually separates games from other forms of media). And the best thing is that objects inherit beheivior of their super classes and hence get many attributes automaticly. Another thing is that if everybody could hack up a perfect Asteroids game in a couple of hundreds of lines of code, we would be spared from all these lousy games that some people make, and even sell for too high prices! (I'm not accusing anyone, 'cause I don't know that you'we made one :-) +------------------------------------------------------------------------+ | Cedric BEUST University of Nice | | INET: beust@mimosa.unice.fr $whoami | | UUCP: llaor.unice.fr!arkonis!beust god (personal alias) | | -- "To be, or not to be...", | | That is illogical, captain! | | -- Spock | +------------------------------------------------------------------------+ /Nixxon