Announcement

Collapse
No announcement yet.

Clash Coding Standards Discussion

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    I'm writing this in relation to what is discussed in the Demo 5 econ model thread. Excuse me if I'm getting OT.

    F_Smith wrote:
    quote:

    I personally think we don't worry about it. We just concentrate on doing it 'right'. I've got a 27 gig hard drive I've loaded down with so much industrial software it isn't funny and I've still got 16 gig free. Within 2 years almost everyone will have 30+ gig hard drives. So even a 20 or 30 meg save file isn't a problem, except for save/reload time issues.
    Now I have a 3 gig HD and it's full to the brim (I have 70 megs free space ). Of course I'm long overdue to an upgrade, but still, notice the difference: not everyone in the world can afford wasting tens or hundereds of megs of drive space on a game.

    Now we want a very detailed game, but that costs. What do we do?
    Reduce detail to keep requirements low? NO
    Increase requirements to keep the detail? NO
    Concentrate on the detail that is perceivable and usable by the player? YES

    Different players have different levels of perceptive ability and like micromanagement (because that's what detail means after all) at different degrees. So to be able to track all those different detail levels, we need flexibility and customisability in the game. In the same time we need to preserve compatibility and keep the requirements low, at least for all those who can do without all that detail. Consequently, not only our interface but also our datamodel needs to be flexible.

    I feel that whatever will not actually fall under the observation of the player is waste and as such it must be eliminated. Although I aknowledge the principal role of economy, society and politics in such a game, I would hate it if a too much detailed govt or econ model would eliminate the possibility of even a simplistic approach of secondary models, such as characters, wonders, ecology and disasters.
    "In a time of universal deceit, telling the truth is a revolutionary act."
    George Orwell

    Comment


    • #17
      Axi:

      I agree completely with every word.

      And since this is rather OT in this thread, I answered more fully in the other.

      Comment


      • #18
        Just a proposal:

        Is everyone okay with using a single 'GameData' class for 'interfacing' with the data? So that anytime, anywhere you need any game data you get it thru that class?

        Methods in the class are things like:

        public MapSquare getMapSquare(int x, int y);
        public Civilization getCiv(String c);
        public Technology getTech(String t);

        That kind of thing?

        That way we can change the datastructures at will, but the game code will never care -- as long as the method signatures stay the same.

        Is this okay by everyone?

        P.S. -- I'm thinking about starting a seperate thread called 'Architecture' or some such, and putting in it a summary of the code approaches, and including a 'sample' of each type of class, mainly for new programmers to get up to speed quickly.

        any objections?

        Comment


        • #19
          Both ideas sound good to me. The overall object in the preexisting code is called Game and has essentially equivalent function to your GameData.
          Project Lead for The Clash of Civilizations
          A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
          Check it out at the Clash Web Site and Forum right here at Apolyton!

          Comment


          • #20
            Mark:

            Do you have a preference on the name of that class? I was thinking GameData would be more descriptive, but I'm easy.

            P.S. -- I was wondering if you thought it might be possible to be rather strict on the new 'architecture' thread.

            Could get the 'architecture' thread stay at the top, when I post it? I was also thinking that thread would not be a place for discussion, but only for posting the architecture basics, so that any programmer that happened by could hopefully take in everything, and possibly be impressed/excited/want to get involved (I am going to spread some posts around a few newsgroups I know of after it's posted, we'll see if anything happens).

            Is it possible to move off-topic posts to another thread, if any get made in that one?

            Comment


            • #21
              F. Smith:

              Please let me think a little bit about the Game/GameData question. In either case it's easy to switch to whichever one (or even a third alternative) we choose to take for the long haul.

              On the Architecture thread...
              Sure, I think we can be strict in keeping things on topic there. But if you want it to be essentially immutable, perhaps the web page is a better place. At least once we get the web page back to functional (Kull doesn't have access for the updates at the moment). While it is getting set up, and we are hashing out details, I think it would be more useful if it is really a discussion thread. We could just keep the current main architecture document at the top of the thread, and update it as needed. Because at least a problem that I foresee is that you will put something up that me or someone else doesn't agree with, and the natural place to discuss it is where the information is... At least that's my suggestion. If you don't think that's appropriate, we can do it your way, and channel the discussion elsewhere.

              In keeping it on top, that's something I need the sys admins to do. For now I would prefer to avoid that, and just bump it up to the top when it gets low. I can delete the "bump" posts when they are no longer relevant so they don't clutter up the thread. If you would like me to start the thread and put stern admonitions against OT posts in a little blurb at the top I would be happy to. I don't really want to get into moving OT things out of the thread by hand. I think a fair way to handle it is if something OT appears in the thread I will stick a warning message on it, and if it isn't removed by one day later, I will delete that part of the post, or the whole thing as appropriate. But to be fair I will also have to also police you and me, who are two of the biggest OT offenders around here . Just tell me what else you would like me to say in the top bit.

              But like I said, long-term the thing should probably go on the web site...

              I think spreading a few posts around the newsgroup is a great idea. I have done so in the past, but with mixed results. We usually get one or two nibbles, but frequently they aren't people that stick around very long. Perhaps you frequent newsgroups with a higher caliber of person . If you want any stuff I've already written up for general info on the project, let me know I will ship it off to you. But mostly it's just variations of the top three paragraphs on the main page of the web page.
              Project Lead for The Clash of Civilizations
              A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
              Check it out at the Clash Web Site and Forum right here at Apolyton!

              Comment


              • #22
                Mark:

                This thread absolutely will only be a repository for completely agreed-upon information. I'm only secratary for the 'architecture' information, not a gatekeeper, or a 'priest' of the architecture.

                Every new addition or change to the 'official' architecture will start as an "is this okay or is it trash?" post. Only after a majority has made a near-unanimous decision does it make it into the book of law -- the 'official' architecture.

                The webpage would be fine, but then I'd likely try and direct coders there first, if that's okay. So I'll wait a bit.

                What we're going to attempt with this thread is a simple, concise list of what we need done in bite-sized little chunks, including how to 'cut' the meat.

                Basically, an entire project architecture. (Yikes!!!).

                With luck, we'll draw in a few of the programmers that might happen by. The way I see it, programmers probably do happen by from time to time, either by chance or when we advertise. By far most don't post (it's the nature of these boards). Either they're too busy, don't think it looks fun, who knows.

                Perhaps by offering a bunch of two or three day tasks (single components that need coding, with templates to follow) we can catch their interest.

                Just a thought.

                P.S. -- my wife is going on another business trip to Dallas next weekend, so I will have 4 or 5 nites I can spend many hours banging. If others can be availabe to critique/debug, we can probably turn out a resonably polished, usable 'govt sub-game'. Maybe even begin playing with actual results, and doing some 'game balancing'.

                I can't wait to put in ruler 'special orders' (I really just can't wait to send the secret police to my political opponents door!!!).

                This means this weekend will be kinda slow. Altho I got an hour or two tonight.

                Ciao.

                Comment


                • #23
                  Sounds good. So you want to hold off on starting the thread? I'd say lets start it now. We can always move the more permanent parts to the web page when its in mostly final form. Also if it is going to contain odd jobs, we should use a title that indicates that: "Program Architecture & Small Coding Tasks" or something (pretty lame, but you get the idea).

                  BTW, can you put up a more-or-less current zip of the Beast soon? I can use it to look at how you're coding up some of the stuff beyond the base architecture to give me ideas other than my 'usual' ways.

                  Yeah I'm really looking forward to the govt sub-game!

                  Don't tell the wife about all that banging you're going to do while she's gone

                  [This message has been edited by Mark_Everson (edited August 12, 2000).]
                  Project Lead for The Clash of Civilizations
                  A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                  Check it out at the Clash Web Site and Forum right here at Apolyton!

                  Comment


                  • #24
                    Recently, F_Smith mentioned something about XML, and I found these two old threads relating to the topic:

                    XML Macro Language?

                    Modified macro language description

                    I think we should reopen discussion about this topic, especially in relation to the object oriented design goals. I of course know nothing about any of this, but I would like to learn.
                    [This message has been edited by Richard Bruns (edited August 12, 2000).]

                    Comment


                    • #25
                      Richard:

                      I'm only using XML for the beast because I had a parser written for work already that was easily modified. I don't think anyone else wanted to use it later. I believe they've got someone else working up a custom scripting language.

                      The XML is only a placeholder. A mere convenience.

                      I only needed it so at least we could save and load data, rather than having to enter everything in by hand every time to test these complex toys.

                      Comment


                      • #26
                        Mark:

                        I'll start the Architecture thread in the morning.

                        Consider this our very first:

                        Architecture Approval Vote



                        I am going to start the 'Official Architecture' thread off with the text I posted above (the quote from the book, the M-V-C stuff).

                        Is that okay with everyone?

                        Any changes?

                        [This message has been edited by F_Smith (edited August 12, 2000).]

                        Comment


                        • #27
                          Go for it...

                          My only question on MVC is if we shouldn't instead use a M-UI (Model - User Interface) model like in Swing. It just seems to me that gets a lot of the advantages of MVC without some of the hassles. Additionally, it is the way most of the existing codebase is written (when I didn't space out...). But I wouldn't wait for that discussion to start the thread.
                          Project Lead for The Clash of Civilizations
                          A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                          Check it out at the Clash Web Site and Forum right here at Apolyton!

                          Comment


                          • #28
                            Mark:

                            Actually, I believe we might be talking about the same thing.

                            In 'M-V-C', the 'V' refers to the 'view' of the data -- which is what Swing provides. Swing itself is built using an M-V-C approach, for example 'table models' and 'list models', which seperate the 'view' of the data (the JList) from the data model specifically.

                            The 'controller' code is the turnhandler, file IO and other 'utility' classes, and this is the only difference between the two approaches. These really should be seperated into their own classes, don't you think? Like 'Listeners'? They don't have to be, as you say, but for ease of programming wouldn't the benefits be many?

                            It's okay, I don't mind discussing this before moving forward. I think we should.

                            Comment


                            • #29
                              Well, I guess my code is basically MVC then already! But without the finer points :-)

                              But I do things like put the hotkey handlers in with the MapCanvas class. Is that a no-no or legit by your def of MVC?
                              Project Lead for The Clash of Civilizations
                              A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                              Check it out at the Clash Web Site and Forum right here at Apolyton!

                              Comment


                              • #30
                                MVC? XML? Swing? All of this makes no sense to me. Can someone point me to some reference material so I have some idea of what this is?

                                Comment

                                Working...
                                X