IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New Re: [Civlike] Anybody see any problems with this structure?
I have a couple of comments. Please take them with a grain of salt, since you know your domain better than I.

(1) sectionAsIso bothers me. It seems you are mixing display logic with the domain logic. I would rather see independent renderers that had renderAsSquare and renderAsIso methods. This could eliminate ISO as a map type and then take a look at the essential differences between square and hex maps (which I don't think is captured in the design so far).

(2) I would suggest Location as a better name for Point (Point brings to mind a mathematical point with no dimensions). Your call however.

(3) Several objects have individual x/y/z attributes. Does it make sense to have this objects have a single Point (or Location) attribute?

Just some general comments ... some of the interfaces look ackward. Have you implemented any of this and used it in a mini application? If not, I suggest you try it out on a small example first before you commit yourself too deeply to this design. Often just the act of trying out an interface will expose holes and misfeatures.
--
-- Jim Weirich jweirich@one.net [link|http://w3.one.net/~jweirich|http://w3.one.net/~jweirich]
---------------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
New Agreement -
what's the relationship between a point and a tile?

(I'd argue that a map is a collection of tiles...and that a tile has a point(x,y,z).)

Next question - is a city a tile? (It is in Civs and SMAC...but to make it a tile, implies that it can't move, and a fantasy type game may allow for cities to move).

New That's why City derives from Placeable.
It's something you stick on top of a tile - not integral to the tile itself. And yes, it does let you create mobile cities. :D

(It also makes it easier to remove the City object when somebody drops a planetbuster on it...)
They say a city in the desert lies/ The vanity of an ancient king/ But the city lies in broken pieces/ Where the wind howls and the vultures sing/ These are the works of man/ This is the sum of our ambition...
New Thanks.
Taken with the salt intended. Exactly the kind of thing I was looking for.

sectionAsIso actually is a workaround for an interesting problem - there are actually two types of "isomorphic" maps. One type is a regular "square" map, displayed in an isometric manner, similar to the maps in X-Com: UFO Defense. These have "flat" edges to the maps. The other is the "jagged" isometric map, that has used in the Civilization games since Civ II. Instead of taking a rectangular map, and rotating it 45 degrees, it rotates each square 45 degrees, then squishes them closer together, creating a jagged, but square edge. You're right, sectionAsIso should probably be offloaded to a display renderer, but it's such an interesting problem, I'm sorely tempted to implement it.

Location does work better than point, thanks. Also, the X/Y/Z variables will be replaced with Point - but I was thinking it would be good to overload the functions so people can toss X/Y/Z coordinates at them if they decide to. Is this a good idea, or bad?

The first thing I'm going to write on this will be the classic game of [link|http://www.classicempire.com/help.html|Empire] - two terrain types, eight military units (IIRC), and no tech tree. Should be simple enough, right? :P

I appreciate the feedback! Thanks!
They say a city in the desert lies/ The vanity of an ancient king/ But the city lies in broken pieces/ Where the wind howls and the vultures sing/ These are the works of man/ This is the sum of our ambition...
New My 2nd favorite song, Thane. Knew you were cool... :)

Many fears are born of stupidity and ignorance -
Which you should be feeding with rumour and generalisation.
BOfH, 2002 "Episode" 10
New My .sig? Yup, great song.
They say a city in the desert lies/ The vanity of an ancient king/ But the city lies in broken pieces/ Where the wind howls and the vultures sing/ These are the works of man/ This is the sum of our ambition...
New Here's one I forgot to mention
I actually jotted this down, but must have lost it in the editting process.

The function ChangeAttribute returns TRUE on success, and throws an exception if the attribute doesn't exist, or if it can't take the new value (for some reason).

Is there any time it could possibly return false? It sounds like you couldn't decide between returning errors via a return flag, or via exceptions and munged the two approaches together. (Not an uncommon problem ... at least one version of the DOM spec had the same issue).
--
-- Jim Weirich jweirich@one.net [link|http://w3.one.net/~jweirich|http://w3.one.net/~jweirich]
---------------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
     [Civlike] Anybody see any problems with this structure? - (inthane-chan) - (12)
         Re: [Civlike] Anybody see any problems with this structure? - (JimWeirich) - (6)
             Agreement - - (Simon_Jester) - (1)
                 That's why City derives from Placeable. - (inthane-chan)
             Thanks. - (inthane-chan) - (2)
                 My 2nd favorite song, Thane. Knew you were cool... :) -NT - (tseliot) - (1)
                     My .sig? Yup, great song. -NT - (inthane-chan)
             Here's one I forgot to mention - (JimWeirich)
         Re: [Civlike] Anybody see any problems with this structure? - (Arkadiy) - (2)
             Good points. Thanks. -NT - (inthane-chan)
             OT: *Great* .sig! (new thread) - (CRConrad)
         Re: [Civlike] Anybody see any problems with this structure? - (JayMehaffey) - (1)
             It may need it's own class... - (Simon_Jester)

He's only an inch tall. He's a little short fat guy who eats way too much pizza.
50 ms