X-Received: by 10.224.110.68 with SMTP id m4mr2451553qap.2.1363744185708; Tue, 19 Mar 2013 18:49:45 -0700 (PDT) X-Received: by 10.50.214.36 with SMTP id nx4mr32275igc.6.1363744185662; Tue, 19 Mar 2013 18:49:45 -0700 (PDT) Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!t2no5095251qal.0!news-out.google.com!k8ni1931qas.0!nntp.google.com!dd2no3087807qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.java.programmer Date: Tue, 19 Mar 2013 18:49:45 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=69.28.149.29; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T NNTP-Posting-Host: 69.28.149.29 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <171686ae-5239-4502-9ef3-65a68e8a1a1d@googlegroups.com> Subject: Re: Final Fantasy 2 based game source code From: Lew Injection-Date: Wed, 20 Mar 2013 01:49:45 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.java.programmer:22972 Turtle Wizard wrote: > Final Fantasy 2 based game written in Java : source code GPLv2 : > http://code.google.com/p/angels-destiny-rpg/ - You should follow the Java Coding Conventions, at least as far as indentation and naming are concerned. - Consider encapsulating the long initialization sequences in methods of the class being initialized. - Sequences like public Image getFirstCharacterLeftImage(int idx) { return firstplayercharacter.getLeftImage(idx); } public Image getSecondCharacterLeftImage(int idx) { return secondplayercharacter.getLeftImage(idx); } public Image getThirdCharacterLeftImage(int idx) { return thirdplayercharacter.getLeftImage(idx); } ... are clumsy programming. Those should be calls the the same method, e.g., 'getLeftImage()', from each of the first, second, third, ... instances of some sort of 'GameCharacter' type. What you've done is the antithesis of object oriented. - Eschew import-on-demand for single-type imports. - Your hierarchies are strange, for example 'CityNameDatabaseBase'. Why is that split into two types? - Speaking of 'CityNameDatabaseBase', protected LinkedList words = new LinkedList(); DO NOT USE RAW TYPES! YECCCH! Declare the variable as a 'List', or 'Set', or 'Collection'. And why did you select 'LinkedList' for the implementation? Didn't 'ArrayList' suffice? And really, shouldn't it be a 'Set' (to avoid duplicates) rather than a 'List'? - Object o = words.get(index); String s = (String)o; This is why you don't use raw types. And 'o' and 's' are nasty variable names. - "Copyright (C) " Really? - This is not how to do i18n: if (language == "Dutch" || language == "dutch") { textlib.addText("Er is onrust in het Oosten.."); textlib.addText("een oud kwaad is aan het herrijzen.."); //set to "-1" for not popping up the learn widget learnvarlib.addText("-1"); learnvarlib.addText("-1"); asktextlib.addText("Aangenaam."); itemtextlib.addText("Hopelijk heb je het niet nodig."); learntextlib.addText("Dulandar is dit elfen dorpje."); learnedanotherwordtextlib.addText("Elfen dansen en zingen graag."); Use resource bundles. That's what they're for. And so on and so on. I don't know how to evaluate beginner projects, but you have a ways to go. You need to learn object-oriented programming, and Java. -- Lew